From f65f17ae7fcb52af6ab413f88629d6e95e8c17e9 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 13 Jul 2026 10:45:34 +0530 Subject: [PATCH 1/8] chore: update Web SDK to 26.2.0 --- .github/workflows/publish.yml | 3 +- CHANGELOG.md | 10 +- README.md | 2 +- package-lock.json | 327 ++++++++++++++++++++-------------- package.json | 8 +- src/client.ts | 46 +++-- src/enums/o-auth-provider.ts | 1 + src/models.ts | 46 ++++- src/query.ts | 30 ++++ src/services/account.ts | 8 +- 10 files changed, 316 insertions(+), 165 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ee63d526..48121d67 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,9 +34,10 @@ jobs: echo "tag=latest" >> "$GITHUB_OUTPUT" fi - - name: Install dependencies and build + - name: Install dependencies, audit, and build run: | npm ci + npm audit --audit-level=high --omit=dev npm run build - name: Publish diff --git a/CHANGELOG.md b/CHANGELOG.md index dac266ea..41263c70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,17 @@ # Change Log +## 26.2.0 + +* Added: `Client.setBearer()` to authenticate requests with an OAuth access token +* Added: `appwrite` value to `OAuthProvider` enum +* Added: `Query.vectorDot`, `Query.vectorCosine`, `Query.vectorEuclidean` vector similarity query helpers +* Added: geolocation and network fields (`city`, `timeZone`, `latitude`, `isp`, ASN, connection info) to `Locale` model +* Fixed: `AppwriteException` message now falls back to response text when missing + ## 26.1.0 * Added: Realtime connections now send the configured JWT for authentication. * Added: Forwarded `impersonateUserId` on `avatars` and `storage` file requests. -* Fixed: URL-encode path parameters across all services. -* Fixed: `ping` now sends an `Accept: application/json` header. ## 26.0.0 diff --git a/README.md b/README.md index 4516100a..745f5851 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ import { Client, Account } from "appwrite"; To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: ```html - + ``` diff --git a/package-lock.json b/package-lock.json index 2d9dfd07..0b2ef769 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,26 +1,29 @@ { "name": "appwrite", - "version": "26.1.0", + "version": "26.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "appwrite", - "version": "26.1.0", + "version": "26.2.0", "license": "BSD-3-Clause", "dependencies": { "json-bigint": "1.0.0" }, "devDependencies": { - "@rollup/plugin-commonjs": "29.0.2", + "@rollup/plugin-commonjs": "29.0.3", "@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-typescript": "12.3.0", "@types/json-bigint": "1.0.4", "playwright": "1.56.1", - "rollup": "4.60.1", + "rollup": "4.62.2", "serve-handler": "6.1.7", "tslib": "2.8.1", - "typescript": "5.7.3" + "typescript": "5.9.3" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -31,9 +34,9 @@ "license": "MIT" }, "node_modules/@rollup/plugin-commonjs": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.2.tgz", - "integrity": "sha512-S/ggWH1LU7jTyi9DxZOKyxpVd4hF/OZ0JrEbeLjXk/DFXwRny0tjD2c992zOUYQobLrVkRVMDdmHP16HKP7GRg==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz", + "integrity": "sha512-ZaOxZceP7SOUW7Lqw5IRVweSQYWaeIPnXIGLiB690EBA3FGJTO40EEr2L5yZplJWsgTCogILRSpcAe7+U0Otdg==", "dev": true, "license": "MIT", "dependencies": { @@ -110,9 +113,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", - "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz", + "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==", "dev": true, "license": "MIT", "dependencies": { @@ -133,9 +136,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.1.tgz", - "integrity": "sha512-d6FinEBLdIiK+1uACUttJKfgZREXrF0Qc2SmLII7W2AD8FfiZ9Wjd+rD/iRuf5s5dWrr1GgwXCvPqOuDquOowA==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.2.tgz", + "integrity": "sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==", "cpu": [ "arm" ], @@ -147,9 +150,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.1.tgz", - "integrity": "sha512-YjG/EwIDvvYI1YvYbHvDz/BYHtkY4ygUIXHnTdLhG+hKIQFBiosfWiACWortsKPKU/+dUwQQCKQM3qrDe8c9BA==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.2.tgz", + "integrity": "sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==", "cpu": [ "arm64" ], @@ -161,9 +164,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.1.tgz", - "integrity": "sha512-mjCpF7GmkRtSJwon+Rq1N8+pI+8l7w5g9Z3vWj4T7abguC4Czwi3Yu/pFaLvA3TTeMVjnu3ctigusqWUfjZzvw==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.2.tgz", + "integrity": "sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==", "cpu": [ "arm64" ], @@ -175,9 +178,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.1.tgz", - "integrity": "sha512-haZ7hJ1JT4e9hqkoT9R/19XW2QKqjfJVv+i5AGg57S+nLk9lQnJ1F/eZloRO3o9Scy9CM3wQ9l+dkXtcBgN5Ew==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.2.tgz", + "integrity": "sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==", "cpu": [ "x64" ], @@ -189,9 +192,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.1.tgz", - "integrity": "sha512-czw90wpQq3ZsAVBlinZjAYTKduOjTywlG7fEeWKUA7oCmpA8xdTkxZZlwNJKWqILlq0wehoZcJYfBvOyhPTQ6w==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.2.tgz", + "integrity": "sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==", "cpu": [ "arm64" ], @@ -203,9 +206,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.1.tgz", - "integrity": "sha512-KVB2rqsxTHuBtfOeySEyzEOB7ltlB/ux38iu2rBQzkjbwRVlkhAGIEDiiYnO2kFOkJp+Z7pUXKyrRRFuFUKt+g==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.2.tgz", + "integrity": "sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==", "cpu": [ "x64" ], @@ -217,13 +220,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.1.tgz", - "integrity": "sha512-L+34Qqil+v5uC0zEubW7uByo78WOCIrBvci69E7sFASRl0X7b/MB6Cqd1lky/CtcSVTydWa2WZwFuWexjS5o6g==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.2.tgz", + "integrity": "sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==", "cpu": [ "arm" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -231,13 +237,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.1.tgz", - "integrity": "sha512-n83O8rt4v34hgFzlkb1ycniJh7IR5RCIqt6mz1VRJD6pmhRi0CXdmfnLu9dIUS6buzh60IvACM842Ffb3xd6Gg==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.2.tgz", + "integrity": "sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==", "cpu": [ "arm" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -245,13 +254,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.1.tgz", - "integrity": "sha512-Nql7sTeAzhTAja3QXeAI48+/+GjBJ+QmAH13snn0AJSNL50JsDqotyudHyMbO2RbJkskbMbFJfIJKWA6R1LCJQ==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.2.tgz", + "integrity": "sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -259,13 +271,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.1.tgz", - "integrity": "sha512-+pUymDhd0ys9GcKZPPWlFiZ67sTWV5UU6zOJat02M1+PiuSGDziyRuI/pPue3hoUwm2uGfxdL+trT6Z9rxnlMA==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.2.tgz", + "integrity": "sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -273,13 +288,16 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.1.tgz", - "integrity": "sha512-VSvgvQeIcsEvY4bKDHEDWcpW4Yw7BtlKG1GUT4FzBUlEKQK0rWHYBqQt6Fm2taXS+1bXvJT6kICu5ZwqKCnvlQ==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.2.tgz", + "integrity": "sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==", "cpu": [ "loong64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -287,13 +305,16 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.1.tgz", - "integrity": "sha512-4LqhUomJqwe641gsPp6xLfhqWMbQV04KtPp7/dIp0nzPxAkNY1AbwL5W0MQpcalLYk07vaW9Kp1PBhdpZYYcEw==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.2.tgz", + "integrity": "sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==", "cpu": [ "loong64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -301,13 +322,16 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.1.tgz", - "integrity": "sha512-tLQQ9aPvkBxOc/EUT6j3pyeMD6Hb8QF2BTBnCQWP/uu1lhc9AIrIjKnLYMEroIz/JvtGYgI9dF3AxHZNaEH0rw==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.2.tgz", + "integrity": "sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -315,13 +339,16 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.1.tgz", - "integrity": "sha512-RMxFhJwc9fSXP6PqmAz4cbv3kAyvD1etJFjTx4ONqFP9DkTkXsAMU4v3Vyc5BgzC+anz7nS/9tp4obsKfqkDHg==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.2.tgz", + "integrity": "sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -329,13 +356,16 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.1.tgz", - "integrity": "sha512-QKgFl+Yc1eEk6MmOBfRHYF6lTxiiiV3/z/BRrbSiW2I7AFTXoBFvdMEyglohPj//2mZS4hDOqeB0H1ACh3sBbg==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.2.tgz", + "integrity": "sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==", "cpu": [ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -343,13 +373,16 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.1.tgz", - "integrity": "sha512-RAjXjP/8c6ZtzatZcA1RaQr6O1TRhzC+adn8YZDnChliZHviqIjmvFwHcxi4JKPSDAt6Uhf/7vqcBzQJy0PDJg==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.2.tgz", + "integrity": "sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==", "cpu": [ "riscv64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -357,13 +390,16 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.1.tgz", - "integrity": "sha512-wcuocpaOlaL1COBYiA89O6yfjlp3RwKDeTIA0hM7OpmhR1Bjo9j31G1uQVpDlTvwxGn2nQs65fBFL5UFd76FcQ==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.2.tgz", + "integrity": "sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -371,13 +407,16 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.1.tgz", - "integrity": "sha512-77PpsFQUCOiZR9+LQEFg9GClyfkNXj1MP6wRnzYs0EeWbPcHs02AXu4xuUbM1zhwn3wqaizle3AEYg5aeoohhg==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.2.tgz", + "integrity": "sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -385,13 +424,16 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.1.tgz", - "integrity": "sha512-5cIATbk5vynAjqqmyBjlciMJl1+R/CwX9oLk/EyiFXDWd95KpHdrOJT//rnUl4cUcskrd0jCCw3wpZnhIHdD9w==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.2.tgz", + "integrity": "sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -399,9 +441,9 @@ ] }, "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.1.tgz", - "integrity": "sha512-cl0w09WsCi17mcmWqqglez9Gk8isgeWvoUZ3WiJFYSR3zjBQc2J5/ihSjpl+VLjPqjQ/1hJRcqBfLjssREQILw==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.2.tgz", + "integrity": "sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==", "cpu": [ "x64" ], @@ -413,9 +455,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.1.tgz", - "integrity": "sha512-4Cv23ZrONRbNtbZa37mLSueXUCtN7MXccChtKpUnQNgF010rjrjfHx3QxkS2PI7LqGT5xXyYs1a7LbzAwT0iCA==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.2.tgz", + "integrity": "sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==", "cpu": [ "arm64" ], @@ -427,9 +469,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.1.tgz", - "integrity": "sha512-i1okWYkA4FJICtr7KpYzFpRTHgy5jdDbZiWfvny21iIKky5YExiDXP+zbXzm3dUcFpkEeYNHgQ5fuG236JPq0g==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.2.tgz", + "integrity": "sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==", "cpu": [ "arm64" ], @@ -441,9 +483,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.1.tgz", - "integrity": "sha512-u09m3CuwLzShA0EYKMNiFgcjjzwqtUMLmuCJLeZWjjOYA3IT2Di09KaxGBTP9xVztWyIWjVdsB2E9goMjZvTQg==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.2.tgz", + "integrity": "sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==", "cpu": [ "ia32" ], @@ -455,9 +497,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.1.tgz", - "integrity": "sha512-k+600V9Zl1CM7eZxJgMyTUzmrmhB/0XZnF4pRypKAlAgxmedUA+1v9R+XOFv56W4SlHEzfeMtzujLJD22Uz5zg==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.2.tgz", + "integrity": "sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==", "cpu": [ "x64" ], @@ -469,9 +511,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.1.tgz", - "integrity": "sha512-lWMnixq/QzxyhTV6NjQJ4SFo1J6PvOX8vUx5Wb4bBPsEb+8xZ89Bz6kOXpfXj9ak9AHTQVQzlgzBEc1SyM27xQ==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.2.tgz", + "integrity": "sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==", "cpu": [ "x64" ], @@ -483,9 +525,9 @@ ] }, "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, "license": "MIT" }, @@ -520,9 +562,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", - "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", "dev": true, "license": "MIT", "dependencies": { @@ -574,6 +616,16 @@ "node": ">=0.10.0" } }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -625,9 +677,9 @@ } }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", "dev": true, "license": "MIT", "dependencies": { @@ -638,13 +690,13 @@ } }, "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.2" + "hasown": "^2.0.3" }, "engines": { "node": ">= 0.4" @@ -747,9 +799,9 @@ "license": "MIT" }, "node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", "dev": true, "license": "MIT", "engines": { @@ -802,12 +854,13 @@ } }, "node_modules/resolve": { - "version": "1.22.11", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", - "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", "dev": true, "license": "MIT", "dependencies": { + "es-errors": "^1.3.0", "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" @@ -823,13 +876,13 @@ } }, "node_modules/rollup": { - "version": "4.60.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.1.tgz", - "integrity": "sha512-VmtB2rFU/GroZ4oL8+ZqXgSA38O6GR8KSIvWmEFv63pQ0G6KaBH9s07PO8XTXP4vI+3UJUEypOfjkGfmSBBR0w==", + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.2.tgz", + "integrity": "sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.8" + "@types/estree": "1.0.9" }, "bin": { "rollup": "dist/bin/rollup" @@ -839,31 +892,31 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.60.1", - "@rollup/rollup-android-arm64": "4.60.1", - "@rollup/rollup-darwin-arm64": "4.60.1", - "@rollup/rollup-darwin-x64": "4.60.1", - "@rollup/rollup-freebsd-arm64": "4.60.1", - "@rollup/rollup-freebsd-x64": "4.60.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.60.1", - "@rollup/rollup-linux-arm-musleabihf": "4.60.1", - "@rollup/rollup-linux-arm64-gnu": "4.60.1", - "@rollup/rollup-linux-arm64-musl": "4.60.1", - "@rollup/rollup-linux-loong64-gnu": "4.60.1", - "@rollup/rollup-linux-loong64-musl": "4.60.1", - "@rollup/rollup-linux-ppc64-gnu": "4.60.1", - "@rollup/rollup-linux-ppc64-musl": "4.60.1", - "@rollup/rollup-linux-riscv64-gnu": "4.60.1", - "@rollup/rollup-linux-riscv64-musl": "4.60.1", - "@rollup/rollup-linux-s390x-gnu": "4.60.1", - "@rollup/rollup-linux-x64-gnu": "4.60.1", - "@rollup/rollup-linux-x64-musl": "4.60.1", - "@rollup/rollup-openbsd-x64": "4.60.1", - "@rollup/rollup-openharmony-arm64": "4.60.1", - "@rollup/rollup-win32-arm64-msvc": "4.60.1", - "@rollup/rollup-win32-ia32-msvc": "4.60.1", - "@rollup/rollup-win32-x64-gnu": "4.60.1", - "@rollup/rollup-win32-x64-msvc": "4.60.1", + "@rollup/rollup-android-arm-eabi": "4.62.2", + "@rollup/rollup-android-arm64": "4.62.2", + "@rollup/rollup-darwin-arm64": "4.62.2", + "@rollup/rollup-darwin-x64": "4.62.2", + "@rollup/rollup-freebsd-arm64": "4.62.2", + "@rollup/rollup-freebsd-x64": "4.62.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.62.2", + "@rollup/rollup-linux-arm-musleabihf": "4.62.2", + "@rollup/rollup-linux-arm64-gnu": "4.62.2", + "@rollup/rollup-linux-arm64-musl": "4.62.2", + "@rollup/rollup-linux-loong64-gnu": "4.62.2", + "@rollup/rollup-linux-loong64-musl": "4.62.2", + "@rollup/rollup-linux-ppc64-gnu": "4.62.2", + "@rollup/rollup-linux-ppc64-musl": "4.62.2", + "@rollup/rollup-linux-riscv64-gnu": "4.62.2", + "@rollup/rollup-linux-riscv64-musl": "4.62.2", + "@rollup/rollup-linux-s390x-gnu": "4.62.2", + "@rollup/rollup-linux-x64-gnu": "4.62.2", + "@rollup/rollup-linux-x64-musl": "4.62.2", + "@rollup/rollup-openbsd-x64": "4.62.2", + "@rollup/rollup-openharmony-arm64": "4.62.2", + "@rollup/rollup-win32-arm64-msvc": "4.62.2", + "@rollup/rollup-win32-ia32-msvc": "4.62.2", + "@rollup/rollup-win32-x64-gnu": "4.62.2", + "@rollup/rollup-win32-x64-msvc": "4.62.2", "fsevents": "~2.3.2" } }, @@ -904,9 +957,9 @@ "license": "0BSD" }, "node_modules/typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index 432f9498..5627f4c5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "appwrite", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API", - "version": "26.1.0", + "version": "26.2.0", "license": "BSD-3-Clause", "main": "dist/cjs/sdk.js", "exports": { @@ -35,15 +35,15 @@ "json-bigint": "1.0.0" }, "devDependencies": { - "@rollup/plugin-commonjs": "29.0.2", + "@rollup/plugin-commonjs": "29.0.3", "@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-typescript": "12.3.0", "@types/json-bigint": "1.0.4", "playwright": "1.56.1", - "rollup": "4.60.1", + "rollup": "4.62.2", "serve-handler": "6.1.7", "tslib": "2.8.1", - "typescript": "5.7.3" + "typescript": "5.9.3" }, "jsdelivr": "dist/iife/sdk.js", "unpkg": "dist/iife/sdk.js" diff --git a/src/client.ts b/src/client.ts index 2ad91692..626891fd 100644 --- a/src/client.ts +++ b/src/client.ts @@ -355,6 +355,7 @@ class Client { endpointRealtime: string; project: string; jwt: string; + bearer: string; locale: string; session: string; devkey: string; @@ -367,6 +368,7 @@ class Client { endpointRealtime: '', project: '', jwt: '', + bearer: '', locale: '', session: '', devkey: '', @@ -382,7 +384,7 @@ class Client { 'x-sdk-name': 'Web', 'x-sdk-platform': 'client', 'x-sdk-language': 'web', - 'x-sdk-version': '26.1.0', + 'x-sdk-version': '26.2.0', 'X-Appwrite-Response-Format': '1.9.5', }; @@ -469,6 +471,20 @@ class Client { this.config.jwt = value; return this; } + /** + * Set Bearer + * + * The OAuth access token to authenticate with + * + * @param value string + * + * @return {this} + */ + setBearer(value: string): this { + this.headers['Authorization'] = value; + this.config.bearer = value; + return this; + } /** * Set Locale * @@ -692,19 +708,19 @@ class Client { case 'connected': { const messageData = message.data; - let session = this.config.session; - if (!session) { - const cookie = JSONbig.parse(window.localStorage.getItem('cookieFallback') ?? '{}'); - session = cookie?.[`a_session_${this.config.project}`]; - } - if (session && !messageData?.user) { - this.realtime.socket?.send(JSONbig.stringify({ - type: 'authentication', - data: { - session - } - })); - } + let session = this.config.session; + if (!session) { + const cookie = JSONbig.parse(window.localStorage.getItem('cookieFallback') ?? '{}'); + session = cookie?.[`a_session_${this.config.project}`]; + } + if (session && !messageData?.user) { + this.realtime.socket?.send(JSONbig.stringify({ + type: 'authentication', + data: { + session + } + })); + } this.realtime.subscriptions.forEach((sub, subscriptionId) => { this.realtime.pendingSubscribes.set(subscriptionId, { @@ -1091,7 +1107,7 @@ class Client { } else { responseText = data?.message; } - throw new AppwriteException(data?.message, response.status, data?.type, responseText); + throw new AppwriteException(data?.message ?? responseText, response.status, data?.type, responseText); } const cookieFallback = response.headers.get('X-Fallback-Cookies'); diff --git a/src/enums/o-auth-provider.ts b/src/enums/o-auth-provider.ts index cc9e340b..e7136d69 100644 --- a/src/enums/o-auth-provider.ts +++ b/src/enums/o-auth-provider.ts @@ -1,6 +1,7 @@ export enum OAuthProvider { Amazon = 'amazon', Apple = 'apple', + Appwrite = 'appwrite', Auth0 = 'auth0', Authentik = 'authentik', Autodesk = 'autodesk', diff --git a/src/models.ts b/src/models.ts index 3eb788c4..713eb779 100644 --- a/src/models.ts +++ b/src/models.ts @@ -391,7 +391,7 @@ export namespace Models { */ mode: string; /** - * User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization. + * User type who triggered the audit log. Possible values: user, admin, guest, hidden, keyProject, keyAccount, keyOrganization. */ userType: string; /** @@ -931,6 +931,50 @@ export namespace Models { * Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format */ currency: string; + /** + * City + */ + city?: string; + /** + * Name of timezone + */ + timeZone?: string; + /** + * Postal code + */ + postalCode?: string; + /** + * Latitude + */ + latitude?: number; + /** + * Longitude + */ + longitude?: number; + /** + * Autonomous System Number (ASN) of the IP + */ + autonomousSystemNumber?: string; + /** + * Organization that owns the ASN + */ + autonomousSystemOrganization?: string; + /** + * Internet service provider of the IP + */ + isp?: string; + /** + * Connection type of the IP (e.g. cable, cellular, corporate) + */ + connectionType?: string; + /** + * User type classification of the IP (e.g. residential, business, hosting) + */ + connectionUsageType?: string; + /** + * Registered organization of the IP + */ + connectionOrganization?: string; } /** diff --git a/src/query.ts b/src/query.ts index fdd9f407..e0e97257 100644 --- a/src/query.ts +++ b/src/query.ts @@ -494,6 +494,36 @@ export class Query { static distanceLessThan = (attribute: string, values: any[], distance: number, meters: boolean = true): string => new Query("distanceLessThan", attribute, [[values, distance, meters]] as QueryTypesList).toString(); + /** + * Filter resources using vector dot product similarity. + * + * @param {string} attribute + * @param {number[]} vector + * @returns {string} + */ + static vectorDot = (attribute: string, vector: number[]): string => + new Query("vectorDot", attribute, [vector] as QueryTypesList).toString(); + + /** + * Filter resources using vector cosine similarity. + * + * @param {string} attribute + * @param {number[]} vector + * @returns {string} + */ + static vectorCosine = (attribute: string, vector: number[]): string => + new Query("vectorCosine", attribute, [vector] as QueryTypesList).toString(); + + /** + * Filter resources using vector Euclidean distance. + * + * @param {string} attribute + * @param {number[]} vector + * @returns {string} + */ + static vectorEuclidean = (attribute: string, vector: number[]): string => + new Query("vectorEuclidean", attribute, [vector] as QueryTypesList).toString(); + /** * Filter resources where attribute intersects with the given geometry. * diff --git a/src/services/account.ts b/src/services/account.ts index 9122ef44..a20ffcc5 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -1935,7 +1935,7 @@ export class Account { * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * - * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. @@ -1951,7 +1951,7 @@ export class Account { * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * - * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. @@ -2710,7 +2710,7 @@ export class Account { * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * - * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. @@ -2725,7 +2725,7 @@ export class Account { * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * - * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. From 837239a4dff5070617568cc0fc0d94f057c88a82 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 13 Jul 2026 12:09:19 +0530 Subject: [PATCH 2/8] chore: update Web SDK to 26.2.0 --- src/client.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/client.ts b/src/client.ts index 626891fd..8b910354 100644 --- a/src/client.ts +++ b/src/client.ts @@ -481,7 +481,7 @@ class Client { * @return {this} */ setBearer(value: string): this { - this.headers['Authorization'] = value; + this.headers['Authorization'] = `Bearer ${value}`; this.config.bearer = value; return this; } @@ -708,19 +708,19 @@ class Client { case 'connected': { const messageData = message.data; - let session = this.config.session; - if (!session) { - const cookie = JSONbig.parse(window.localStorage.getItem('cookieFallback') ?? '{}'); - session = cookie?.[`a_session_${this.config.project}`]; - } - if (session && !messageData?.user) { - this.realtime.socket?.send(JSONbig.stringify({ - type: 'authentication', - data: { - session - } - })); - } + let session = this.config.session; + if (!session) { + const cookie = JSONbig.parse(window.localStorage.getItem('cookieFallback') ?? '{}'); + session = cookie?.[`a_session_${this.config.project}`]; + } + if (session && !messageData?.user) { + this.realtime.socket?.send(JSONbig.stringify({ + type: 'authentication', + data: { + session + } + })); + } this.realtime.subscriptions.forEach((sub, subscriptionId) => { this.realtime.pendingSubscribes.set(subscriptionId, { From 0eae2ac01e0c16bfd5230c5df1ea1843f82f8157 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 7 Sep 2026 15:57:57 +0100 Subject: [PATCH 3/8] chore: update Web SDK to 27.0.0 --- .github/workflows/publish.yml | 4 +- .prettierignore | 13 + .prettierrc | 4 + CHANGELOG.md | 18 + README.md | 11 +- dist/cjs/package.json | 2 +- dist/esm/package.json | 2 +- .../account/create-anonymous-session.md | 2 +- .../account/create-email-password-session.md | 4 +- docs/examples/account/create-email-token.md | 4 +- .../account/create-email-verification.md | 4 +- docs/examples/account/create-jwt.md | 4 +- .../account/create-magic-url-token.md | 4 +- .../account/create-mfa-authenticator.md | 4 +- docs/examples/account/create-mfa-challenge.md | 4 +- .../account/create-mfa-recovery-codes.md | 2 +- .../account/create-o-auth-2-session.md | 5 +- .../examples/account/create-o-auth-2-token.md | 5 +- docs/examples/account/create-phone-token.md | 4 +- .../account/create-phone-verification.md | 2 +- docs/examples/account/create-push-target.md | 4 +- docs/examples/account/create-recovery.md | 4 +- docs/examples/account/create-session.md | 4 +- docs/examples/account/create-verification.md | 4 +- docs/examples/account/create.md | 4 +- docs/examples/account/delete-consent-token.md | 16 + docs/examples/account/delete-consent.md | 15 + docs/examples/account/delete-identity.md | 4 +- .../account/delete-mfa-authenticator.md | 4 +- docs/examples/account/delete-push-target.md | 4 +- docs/examples/account/delete-session.md | 4 +- docs/examples/account/delete-sessions.md | 2 +- docs/examples/account/get-consent-token.md | 16 + docs/examples/account/get-consent.md | 15 + .../account/get-mfa-recovery-codes.md | 2 +- docs/examples/account/get-prefs.md | 2 +- docs/examples/account/get-session.md | 4 +- docs/examples/account/get.md | 2 +- docs/examples/account/list-consent-tokens.md | 17 + docs/examples/account/list-consents.md | 16 + docs/examples/account/list-identities.md | 4 +- docs/examples/account/list-logs.md | 4 +- docs/examples/account/list-mfa-factors.md | 2 +- docs/examples/account/list-sessions.md | 2 +- .../account/update-email-verification.md | 4 +- docs/examples/account/update-email.md | 4 +- .../account/update-magic-url-session.md | 4 +- .../account/update-mfa-authenticator.md | 4 +- docs/examples/account/update-mfa-challenge.md | 4 +- .../account/update-mfa-recovery-codes.md | 2 +- docs/examples/account/update-mfa.md | 4 +- docs/examples/account/update-name.md | 4 +- docs/examples/account/update-password.md | 4 +- docs/examples/account/update-phone-session.md | 4 +- .../account/update-phone-verification.md | 4 +- docs/examples/account/update-phone.md | 4 +- docs/examples/account/update-prefs.md | 10 +- docs/examples/account/update-push-target.md | 4 +- docs/examples/account/update-recovery.md | 4 +- docs/examples/account/update-session.md | 4 +- docs/examples/account/update-status.md | 2 +- docs/examples/account/update-verification.md | 4 +- docs/examples/avatars/get-browser.md | 4 +- docs/examples/avatars/get-credit-card.md | 4 +- docs/examples/avatars/get-favicon.md | 4 +- docs/examples/avatars/get-flag.md | 4 +- docs/examples/avatars/get-image.md | 4 +- docs/examples/avatars/get-initials.md | 4 +- docs/examples/avatars/get-photo.md | 22 + docs/examples/avatars/get-qr.md | 4 +- docs/examples/avatars/get-screenshot.md | 23 +- docs/examples/databases/create-document.md | 14 +- docs/examples/databases/create-operations.md | 22 +- docs/examples/databases/create-transaction.md | 4 +- .../databases/decrement-document-attribute.md | 10 +- docs/examples/databases/delete-document.md | 4 +- docs/examples/databases/delete-transaction.md | 4 +- docs/examples/databases/get-document.md | 4 +- docs/examples/databases/get-transaction.md | 4 +- .../databases/increment-document-attribute.md | 10 +- docs/examples/databases/list-documents.md | 4 +- docs/examples/databases/list-transactions.md | 4 +- docs/examples/databases/update-document.md | 14 +- docs/examples/databases/update-transaction.md | 4 +- docs/examples/databases/upsert-document.md | 14 +- docs/examples/documentsdb/create-document.md | 26 + docs/examples/documentsdb/create-documents.md | 18 + .../examples/documentsdb/create-operations.md | 26 + .../documentsdb/create-transaction.md | 15 + .../decrement-document-attribute.md | 21 + docs/examples/documentsdb/delete-document.md | 18 + .../documentsdb/delete-transaction.md | 15 + docs/examples/documentsdb/get-document.md | 19 + docs/examples/documentsdb/get-transaction.md | 15 + .../increment-document-attribute.md | 21 + docs/examples/documentsdb/list-documents.md | 20 + .../examples/documentsdb/list-transactions.md | 15 + docs/examples/documentsdb/update-document.md | 20 + .../documentsdb/update-transaction.md | 17 + docs/examples/documentsdb/upsert-document.md | 20 + docs/examples/functions/create-execution.md | 4 +- docs/examples/functions/get-execution.md | 4 +- docs/examples/functions/list-executions.md | 4 +- docs/examples/graphql/mutation.md | 4 +- docs/examples/graphql/query.md | 4 +- docs/examples/locale/get.md | 2 +- docs/examples/locale/list-codes.md | 2 +- docs/examples/locale/list-continents.md | 2 +- docs/examples/locale/list-countries-eu.md | 2 +- docs/examples/locale/list-countries-phones.md | 2 +- docs/examples/locale/list-countries.md | 2 +- docs/examples/locale/list-currencies.md | 2 +- docs/examples/locale/list-languages.md | 2 +- docs/examples/messaging/create-subscriber.md | 4 +- docs/examples/messaging/delete-subscriber.md | 4 +- .../organization/create-installation.md | 16 + .../organization/delete-installation.md | 15 + .../examples/organization/get-installation.md | 15 + .../organization/list-installations.md | 16 + .../organization/update-installation.md | 16 + docs/examples/presences/delete.md | 4 +- docs/examples/presences/get.md | 4 +- docs/examples/presences/list.md | 4 +- docs/examples/presences/update.md | 4 +- docs/examples/presences/upsert.md | 4 +- docs/examples/storage/create-file.md | 5 +- docs/examples/storage/delete-file.md | 4 +- docs/examples/storage/get-file-download.md | 4 +- docs/examples/storage/get-file-preview.md | 8 +- docs/examples/storage/get-file-view.md | 4 +- docs/examples/storage/get-file.md | 4 +- docs/examples/storage/list-files.md | 4 +- docs/examples/storage/update-file.md | 4 +- docs/examples/tablesdb/create-operations.md | 22 +- docs/examples/tablesdb/create-row.md | 14 +- docs/examples/tablesdb/create-transaction.md | 4 +- .../examples/tablesdb/decrement-row-column.md | 10 +- docs/examples/tablesdb/delete-row.md | 4 +- docs/examples/tablesdb/delete-transaction.md | 4 +- docs/examples/tablesdb/get-row.md | 4 +- docs/examples/tablesdb/get-transaction.md | 4 +- .../examples/tablesdb/increment-row-column.md | 10 +- docs/examples/tablesdb/list-rows.md | 4 +- docs/examples/tablesdb/list-transactions.md | 4 +- docs/examples/tablesdb/update-row.md | 14 +- docs/examples/tablesdb/update-transaction.md | 4 +- docs/examples/tablesdb/upsert-row.md | 14 +- docs/examples/teams/create-installation.md | 17 + docs/examples/teams/create-membership.md | 4 +- docs/examples/teams/create.md | 4 +- docs/examples/teams/delete-installation.md | 16 + docs/examples/teams/delete-membership.md | 4 +- docs/examples/teams/delete.md | 4 +- docs/examples/teams/get-installation.md | 16 + docs/examples/teams/get-membership.md | 4 +- docs/examples/teams/get-prefs.md | 4 +- docs/examples/teams/get.md | 4 +- docs/examples/teams/list-installations.md | 17 + docs/examples/teams/list-memberships.md | 4 +- docs/examples/teams/list.md | 4 +- docs/examples/teams/update-installation.md | 17 + .../teams/update-membership-status.md | 4 +- docs/examples/teams/update-membership.md | 4 +- docs/examples/teams/update-name.md | 4 +- docs/examples/teams/update-prefs.md | 4 +- docs/examples/vectorsdb/create-document.md | 25 + docs/examples/vectorsdb/create-operations.md | 26 + docs/examples/vectorsdb/create-query.md | 20 + docs/examples/vectorsdb/create-transaction.md | 15 + docs/examples/vectorsdb/delete-document.md | 18 + docs/examples/vectorsdb/delete-transaction.md | 15 + docs/examples/vectorsdb/get-document.md | 19 + docs/examples/vectorsdb/get-transaction.md | 15 + docs/examples/vectorsdb/list-documents.md | 20 + docs/examples/vectorsdb/list-transactions.md | 15 + docs/examples/vectorsdb/update-document.md | 20 + docs/examples/vectorsdb/update-transaction.md | 17 + docs/examples/vectorsdb/upsert-document.md | 20 + eslint.config.mjs | 31 + package-lock.json | 1628 +++++++++-- package.json | 106 +- rollup.config.mjs | 28 +- src/channel.ts | 346 ++- src/client.ts | 407 ++- src/enums/authentication-factor.ts | 3 +- src/enums/authenticator-type.ts | 2 +- src/enums/browser-permission.ts | 2 +- src/enums/browser-theme.ts | 2 +- src/enums/browser.ts | 2 +- src/enums/credit-card.ts | 2 +- src/enums/execution-method.ts | 2 +- src/enums/execution-resource-type.ts | 4 + src/enums/execution-status.ts | 2 +- src/enums/execution-trigger.ts | 2 +- src/enums/flag.ts | 2 +- src/enums/image-format.ts | 2 +- src/enums/image-gravity.ts | 2 +- src/enums/o-auth-provider.ts | 5 +- src/enums/timezone.ts | 2 +- src/id.ts | 7 +- src/index.ts | 19 +- src/models.ts | 343 ++- src/operator.ts | 542 ++-- src/permission.ts | 10 +- src/query.ts | 1242 ++++---- src/role.ts | 61 +- src/service.ts | 6 +- src/services/account.ts | 2586 +++++++++++------ src/services/avatars.ts | 747 +++-- src/services/databases.ts | 1141 ++++++-- src/services/documents-db.ts | 1725 +++++++++++ src/services/functions.ts | 214 +- src/services/graphql.ts | 63 +- src/services/locale.ts | 118 +- src/services/messaging.ts | 124 +- src/services/organization.ts | 342 +++ src/services/presences.ts | 303 +- src/services/realtime.ts | 234 +- src/services/storage.ts | 580 ++-- src/services/tables-db.ts | 1010 +++++-- src/services/teams.ts | 1160 ++++++-- src/services/vectors-db.ts | 1428 +++++++++ tsconfig.json | 4 +- 223 files changed, 13640 insertions(+), 4432 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 docs/examples/account/delete-consent-token.md create mode 100644 docs/examples/account/delete-consent.md create mode 100644 docs/examples/account/get-consent-token.md create mode 100644 docs/examples/account/get-consent.md create mode 100644 docs/examples/account/list-consent-tokens.md create mode 100644 docs/examples/account/list-consents.md create mode 100644 docs/examples/avatars/get-photo.md create mode 100644 docs/examples/documentsdb/create-document.md create mode 100644 docs/examples/documentsdb/create-documents.md create mode 100644 docs/examples/documentsdb/create-operations.md create mode 100644 docs/examples/documentsdb/create-transaction.md create mode 100644 docs/examples/documentsdb/decrement-document-attribute.md create mode 100644 docs/examples/documentsdb/delete-document.md create mode 100644 docs/examples/documentsdb/delete-transaction.md create mode 100644 docs/examples/documentsdb/get-document.md create mode 100644 docs/examples/documentsdb/get-transaction.md create mode 100644 docs/examples/documentsdb/increment-document-attribute.md create mode 100644 docs/examples/documentsdb/list-documents.md create mode 100644 docs/examples/documentsdb/list-transactions.md create mode 100644 docs/examples/documentsdb/update-document.md create mode 100644 docs/examples/documentsdb/update-transaction.md create mode 100644 docs/examples/documentsdb/upsert-document.md create mode 100644 docs/examples/organization/create-installation.md create mode 100644 docs/examples/organization/delete-installation.md create mode 100644 docs/examples/organization/get-installation.md create mode 100644 docs/examples/organization/list-installations.md create mode 100644 docs/examples/organization/update-installation.md create mode 100644 docs/examples/teams/create-installation.md create mode 100644 docs/examples/teams/delete-installation.md create mode 100644 docs/examples/teams/get-installation.md create mode 100644 docs/examples/teams/list-installations.md create mode 100644 docs/examples/teams/update-installation.md create mode 100644 docs/examples/vectorsdb/create-document.md create mode 100644 docs/examples/vectorsdb/create-operations.md create mode 100644 docs/examples/vectorsdb/create-query.md create mode 100644 docs/examples/vectorsdb/create-transaction.md create mode 100644 docs/examples/vectorsdb/delete-document.md create mode 100644 docs/examples/vectorsdb/delete-transaction.md create mode 100644 docs/examples/vectorsdb/get-document.md create mode 100644 docs/examples/vectorsdb/get-transaction.md create mode 100644 docs/examples/vectorsdb/list-documents.md create mode 100644 docs/examples/vectorsdb/list-transactions.md create mode 100644 docs/examples/vectorsdb/update-document.md create mode 100644 docs/examples/vectorsdb/update-transaction.md create mode 100644 docs/examples/vectorsdb/upsert-document.md create mode 100644 eslint.config.mjs create mode 100644 src/enums/execution-resource-type.ts create mode 100644 src/services/documents-db.ts create mode 100644 src/services/organization.ts create mode 100644 src/services/vectors-db.ts diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 48121d67..9f7045da 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Use Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: '24.14.1' registry-url: 'https://registry.npmjs.org' diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..c14dbf09 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,13 @@ +node_modules/ +dist/ +types/ +package-lock.json + +# CI workflow files follow the YAML conventions of the publishing repository, +# not this SDK's source formatting. +.github/ + +# README and CHANGELOG carry caller-supplied markdown verbatim, which this +# SDK's formatter must not rewrite. +README.md +CHANGELOG.md diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..9b0bb437 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "tabWidth": 4, + "singleQuote": true +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 41263c70..708dafbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Change Log +## 27.0.0 + +* Breaking: `Execution.functionId` replaced by `resourceId` and `resourceType` +* Breaking: SDK now targets Appwrite 2.0 (`X-Appwrite-Response-Format: 2.0.0`) +* Added: `DocumentsDB` and `VectorsDB` services for document and vector database access +* Added: `Organization` service with `listInstallations`, `createInstallation`, `getInstallation`, `updateInstallation`, `deleteInstallation` +* Added: `Teams` installation methods `listInstallations`, `createInstallation`, `getInstallation`, `updateInstallation`, `deleteInstallation` +* Added: `Account` consent methods `listConsents`, `getConsent`, `deleteConsent`, `listConsentTokens`, `getConsentToken`, `deleteConsentToken` +* Added: `Avatars.getPhoto` returning the best available user profile photo +* Added: `folder` parameter to `Storage.createFile` and `folder`, `key` fields on `File` +* Added: `ExecutionResourceType` enum with `Functions` and `Sites` +* Added: `AppInstallation`, `Oauth2Consent`, `Oauth2ConsentToken` models and list types +* Added: `Custom` value to `AuthenticationFactor` and `custom` field on `MfaFactors` +* Added: `Cloudflare`, `Huggingface`, `Resend` values to `OAuthProvider` +* Updated: source formatted with Prettier and linted with ESLint +* Fixed: removed unused `apiHeaders` and imports from URL-returning methods + ## 26.2.0 * Added: `Client.setBearer()` to authenticate requests with an OAuth access token @@ -174,3 +191,4 @@ * Fix pong response & chunked upload * Add `ping` support to `Realtime` service + diff --git a/README.md b/README.md index 745f5851..76f9a997 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Appwrite Web SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-web.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.9.5-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-2.0.0-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK is compatible with Appwrite server version 1.9.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-web/releases).** +**This SDK targets Appwrite server version 1.9.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-web/releases) when APIs differ. Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Web SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) @@ -25,7 +25,7 @@ npm install appwrite --save If you're using a bundler (like [Rollup](https://rollupjs.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it: ```js -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; ``` ### CDN @@ -33,10 +33,9 @@ import { Client, Account } from "appwrite"; To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: ```html - + ``` - ## Getting Started ### Add your Web Platform @@ -188,4 +187,4 @@ This library is auto-generated by Appwrite custom [SDK Generator](https://github ## License -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/dist/cjs/package.json b/dist/cjs/package.json index 6a0d2ef2..1cd945a3 100644 --- a/dist/cjs/package.json +++ b/dist/cjs/package.json @@ -1,3 +1,3 @@ { "type": "commonjs" -} \ No newline at end of file +} diff --git a/dist/esm/package.json b/dist/esm/package.json index 96ae6e57..47200257 100644 --- a/dist/esm/package.json +++ b/dist/esm/package.json @@ -1,3 +1,3 @@ { "type": "module" -} \ No newline at end of file +} diff --git a/docs/examples/account/create-anonymous-session.md b/docs/examples/account/create-anonymous-session.md index 818f50a4..45b612e0 100644 --- a/docs/examples/account/create-anonymous-session.md +++ b/docs/examples/account/create-anonymous-session.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/create-email-password-session.md b/docs/examples/account/create-email-password-session.md index 4010b91f..6093aa24 100644 --- a/docs/examples/account/create-email-password-session.md +++ b/docs/examples/account/create-email-password-session.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.createEmailPasswordSession({ email: 'email@example.com', - password: 'password' + password: 'password', }); console.log(result); diff --git a/docs/examples/account/create-email-token.md b/docs/examples/account/create-email-token.md index 940a7f70..a90e9316 100644 --- a/docs/examples/account/create-email-token.md +++ b/docs/examples/account/create-email-token.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const account = new Account(client); const result = await account.createEmailToken({ userId: '', email: 'email@example.com', - phrase: false // optional + phrase: false, // optional }); console.log(result); diff --git a/docs/examples/account/create-email-verification.md b/docs/examples/account/create-email-verification.md index a3e378d2..7b7edd98 100644 --- a/docs/examples/account/create-email-verification.md +++ b/docs/examples/account/create-email-verification.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.createEmailVerification({ - url: 'https://example.com' + url: 'https://example.com', }); console.log(result); diff --git a/docs/examples/account/create-jwt.md b/docs/examples/account/create-jwt.md index 0ba2d266..c17d32c4 100644 --- a/docs/examples/account/create-jwt.md +++ b/docs/examples/account/create-jwt.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.createJWT({ - duration: 0 // optional + duration: 0, // optional }); console.log(result); diff --git a/docs/examples/account/create-magic-url-token.md b/docs/examples/account/create-magic-url-token.md index 59d1aaf0..b1d50a01 100644 --- a/docs/examples/account/create-magic-url-token.md +++ b/docs/examples/account/create-magic-url-token.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await account.createMagicURLToken({ userId: '', email: 'email@example.com', url: 'https://example.com', // optional - phrase: false // optional + phrase: false, // optional }); console.log(result); diff --git a/docs/examples/account/create-mfa-authenticator.md b/docs/examples/account/create-mfa-authenticator.md index cf6a6098..70fa3173 100644 --- a/docs/examples/account/create-mfa-authenticator.md +++ b/docs/examples/account/create-mfa-authenticator.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account, AuthenticatorType } from "appwrite"; +import { Client, Account, AuthenticatorType } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.createMFAAuthenticator({ - type: AuthenticatorType.Totp + type: AuthenticatorType.Totp, }); console.log(result); diff --git a/docs/examples/account/create-mfa-challenge.md b/docs/examples/account/create-mfa-challenge.md index d9d9856d..b59204a8 100644 --- a/docs/examples/account/create-mfa-challenge.md +++ b/docs/examples/account/create-mfa-challenge.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account, AuthenticationFactor } from "appwrite"; +import { Client, Account, AuthenticationFactor } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.createMFAChallenge({ - factor: AuthenticationFactor.Email + factor: AuthenticationFactor.Email, }); console.log(result); diff --git a/docs/examples/account/create-mfa-recovery-codes.md b/docs/examples/account/create-mfa-recovery-codes.md index 3c292f26..a8b9532a 100644 --- a/docs/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/account/create-mfa-recovery-codes.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/create-o-auth-2-session.md b/docs/examples/account/create-o-auth-2-session.md index 734b6972..869e0f37 100644 --- a/docs/examples/account/create-o-auth-2-session.md +++ b/docs/examples/account/create-o-auth-2-session.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account, OAuthProvider } from "appwrite"; +import { Client, Account, OAuthProvider } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,6 @@ account.createOAuth2Session({ provider: OAuthProvider.Amazon, success: 'https://example.com', // optional failure: 'https://example.com', // optional - scopes: [] // optional + scopes: [], // optional }); - ``` diff --git a/docs/examples/account/create-o-auth-2-token.md b/docs/examples/account/create-o-auth-2-token.md index f6187249..1cb7dd5a 100644 --- a/docs/examples/account/create-o-auth-2-token.md +++ b/docs/examples/account/create-o-auth-2-token.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account, OAuthProvider } from "appwrite"; +import { Client, Account, OAuthProvider } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,6 @@ account.createOAuth2Token({ provider: OAuthProvider.Amazon, success: 'https://example.com', // optional failure: 'https://example.com', // optional - scopes: [] // optional + scopes: [], // optional }); - ``` diff --git a/docs/examples/account/create-phone-token.md b/docs/examples/account/create-phone-token.md index 78812e33..b212cf65 100644 --- a/docs/examples/account/create-phone-token.md +++ b/docs/examples/account/create-phone-token.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.createPhoneToken({ userId: '', - phone: '+12065550100' + phone: '+12065550100', }); console.log(result); diff --git a/docs/examples/account/create-phone-verification.md b/docs/examples/account/create-phone-verification.md index 9c0ea143..9e12b6db 100644 --- a/docs/examples/account/create-phone-verification.md +++ b/docs/examples/account/create-phone-verification.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/create-push-target.md b/docs/examples/account/create-push-target.md index 39f4d48a..915780cd 100644 --- a/docs/examples/account/create-push-target.md +++ b/docs/examples/account/create-push-target.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const account = new Account(client); const result = await account.createPushTarget({ targetId: '', identifier: '', - providerId: '' // optional + providerId: '', // optional }); console.log(result); diff --git a/docs/examples/account/create-recovery.md b/docs/examples/account/create-recovery.md index 0f4e7a91..3cae042b 100644 --- a/docs/examples/account/create-recovery.md +++ b/docs/examples/account/create-recovery.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.createRecovery({ email: 'email@example.com', - url: 'https://example.com' + url: 'https://example.com', }); console.log(result); diff --git a/docs/examples/account/create-session.md b/docs/examples/account/create-session.md index 1639c12c..6fba5248 100644 --- a/docs/examples/account/create-session.md +++ b/docs/examples/account/create-session.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.createSession({ userId: '', - secret: '' + secret: '', }); console.log(result); diff --git a/docs/examples/account/create-verification.md b/docs/examples/account/create-verification.md index 0795d0ac..58e2a9aa 100644 --- a/docs/examples/account/create-verification.md +++ b/docs/examples/account/create-verification.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.createVerification({ - url: 'https://example.com' + url: 'https://example.com', }); console.log(result); diff --git a/docs/examples/account/create.md b/docs/examples/account/create.md index 1fb3971a..c9872ec6 100644 --- a/docs/examples/account/create.md +++ b/docs/examples/account/create.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await account.create({ userId: '', email: 'email@example.com', password: 'password', - name: '' // optional + name: '', // optional }); console.log(result); diff --git a/docs/examples/account/delete-consent-token.md b/docs/examples/account/delete-consent-token.md new file mode 100644 index 00000000..d57bdb3f --- /dev/null +++ b/docs/examples/account/delete-consent-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteConsentToken({ + consentId: '', + tokenId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/account/delete-consent.md b/docs/examples/account/delete-consent.md new file mode 100644 index 00000000..c3bd51e3 --- /dev/null +++ b/docs/examples/account/delete-consent.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteConsent({ + consentId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/account/delete-identity.md b/docs/examples/account/delete-identity.md index d63addb7..def2ad62 100644 --- a/docs/examples/account/delete-identity.md +++ b/docs/examples/account/delete-identity.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.deleteIdentity({ - identityId: '' + identityId: '', }); console.log(result); diff --git a/docs/examples/account/delete-mfa-authenticator.md b/docs/examples/account/delete-mfa-authenticator.md index 079f0b95..e785c0ff 100644 --- a/docs/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/account/delete-mfa-authenticator.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account, AuthenticatorType } from "appwrite"; +import { Client, Account, AuthenticatorType } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.deleteMFAAuthenticator({ - type: AuthenticatorType.Totp + type: AuthenticatorType.Totp, }); console.log(result); diff --git a/docs/examples/account/delete-push-target.md b/docs/examples/account/delete-push-target.md index 38d0ed5a..38aaab18 100644 --- a/docs/examples/account/delete-push-target.md +++ b/docs/examples/account/delete-push-target.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.deletePushTarget({ - targetId: '' + targetId: '', }); console.log(result); diff --git a/docs/examples/account/delete-session.md b/docs/examples/account/delete-session.md index 9d2b8f3e..2547e38a 100644 --- a/docs/examples/account/delete-session.md +++ b/docs/examples/account/delete-session.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.deleteSession({ - sessionId: '' + sessionId: '', }); console.log(result); diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md index d7df883e..1bd929a8 100644 --- a/docs/examples/account/delete-sessions.md +++ b/docs/examples/account/delete-sessions.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/get-consent-token.md b/docs/examples/account/get-consent-token.md new file mode 100644 index 00000000..840af7b2 --- /dev/null +++ b/docs/examples/account/get-consent-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getConsentToken({ + consentId: '', + tokenId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/account/get-consent.md b/docs/examples/account/get-consent.md new file mode 100644 index 00000000..c21096c3 --- /dev/null +++ b/docs/examples/account/get-consent.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getConsent({ + consentId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/account/get-mfa-recovery-codes.md b/docs/examples/account/get-mfa-recovery-codes.md index 1d102583..07c4eb78 100644 --- a/docs/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/account/get-mfa-recovery-codes.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/get-prefs.md b/docs/examples/account/get-prefs.md index 9e2d5e25..81feeeab 100644 --- a/docs/examples/account/get-prefs.md +++ b/docs/examples/account/get-prefs.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/get-session.md b/docs/examples/account/get-session.md index 83ac4b0a..f32fb12c 100644 --- a/docs/examples/account/get-session.md +++ b/docs/examples/account/get-session.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.getSession({ - sessionId: '' + sessionId: '', }); console.log(result); diff --git a/docs/examples/account/get.md b/docs/examples/account/get.md index 0b6c59e3..bf317547 100644 --- a/docs/examples/account/get.md +++ b/docs/examples/account/get.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/list-consent-tokens.md b/docs/examples/account/list-consent-tokens.md new file mode 100644 index 00000000..4e0cedfe --- /dev/null +++ b/docs/examples/account/list-consent-tokens.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listConsentTokens({ + consentId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/account/list-consents.md b/docs/examples/account/list-consents.md new file mode 100644 index 00000000..042dfd98 --- /dev/null +++ b/docs/examples/account/list-consents.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listConsents({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/account/list-identities.md b/docs/examples/account/list-identities.md index 8dee4b39..015e9496 100644 --- a/docs/examples/account/list-identities.md +++ b/docs/examples/account/list-identities.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.listIdentities({ queries: [], // optional - total: false // optional + total: false, // optional }); console.log(result); diff --git a/docs/examples/account/list-logs.md b/docs/examples/account/list-logs.md index 91be728f..180448ea 100644 --- a/docs/examples/account/list-logs.md +++ b/docs/examples/account/list-logs.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.listLogs({ queries: [], // optional - total: false // optional + total: false, // optional }); console.log(result); diff --git a/docs/examples/account/list-mfa-factors.md b/docs/examples/account/list-mfa-factors.md index 9950129b..9a151cc0 100644 --- a/docs/examples/account/list-mfa-factors.md +++ b/docs/examples/account/list-mfa-factors.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/list-sessions.md b/docs/examples/account/list-sessions.md index 2dae7488..d07cf48e 100644 --- a/docs/examples/account/list-sessions.md +++ b/docs/examples/account/list-sessions.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/update-email-verification.md b/docs/examples/account/update-email-verification.md index f3e8b619..34b5f4ad 100644 --- a/docs/examples/account/update-email-verification.md +++ b/docs/examples/account/update-email-verification.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updateEmailVerification({ userId: '', - secret: '' + secret: '', }); console.log(result); diff --git a/docs/examples/account/update-email.md b/docs/examples/account/update-email.md index 0bd7d36c..e18c3f82 100644 --- a/docs/examples/account/update-email.md +++ b/docs/examples/account/update-email.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updateEmail({ email: 'email@example.com', - password: 'password' + password: 'password', }); console.log(result); diff --git a/docs/examples/account/update-magic-url-session.md b/docs/examples/account/update-magic-url-session.md index d0598719..2b5f59a9 100644 --- a/docs/examples/account/update-magic-url-session.md +++ b/docs/examples/account/update-magic-url-session.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updateMagicURLSession({ userId: '', - secret: '' + secret: '', }); console.log(result); diff --git a/docs/examples/account/update-mfa-authenticator.md b/docs/examples/account/update-mfa-authenticator.md index bf25c76b..0f350d05 100644 --- a/docs/examples/account/update-mfa-authenticator.md +++ b/docs/examples/account/update-mfa-authenticator.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account, AuthenticatorType } from "appwrite"; +import { Client, Account, AuthenticatorType } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updateMFAAuthenticator({ type: AuthenticatorType.Totp, - otp: '' + otp: '', }); console.log(result); diff --git a/docs/examples/account/update-mfa-challenge.md b/docs/examples/account/update-mfa-challenge.md index a16ea43a..84a76426 100644 --- a/docs/examples/account/update-mfa-challenge.md +++ b/docs/examples/account/update-mfa-challenge.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updateMFAChallenge({ challengeId: '', - otp: '' + otp: '', }); console.log(result); diff --git a/docs/examples/account/update-mfa-recovery-codes.md b/docs/examples/account/update-mfa-recovery-codes.md index 8bc8273c..039640fb 100644 --- a/docs/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/account/update-mfa-recovery-codes.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/update-mfa.md b/docs/examples/account/update-mfa.md index f17ca2b1..75c01137 100644 --- a/docs/examples/account/update-mfa.md +++ b/docs/examples/account/update-mfa.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.updateMFA({ - mfa: false + mfa: false, }); console.log(result); diff --git a/docs/examples/account/update-name.md b/docs/examples/account/update-name.md index 3e184d75..41d3b27f 100644 --- a/docs/examples/account/update-name.md +++ b/docs/examples/account/update-name.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.updateName({ - name: '' + name: '', }); console.log(result); diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index 9918b1d4..b4a002ee 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updatePassword({ password: 'password', - oldPassword: 'password' // optional + oldPassword: 'password', // optional }); console.log(result); diff --git a/docs/examples/account/update-phone-session.md b/docs/examples/account/update-phone-session.md index 5352cf0a..5238cf41 100644 --- a/docs/examples/account/update-phone-session.md +++ b/docs/examples/account/update-phone-session.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updatePhoneSession({ userId: '', - secret: '' + secret: '', }); console.log(result); diff --git a/docs/examples/account/update-phone-verification.md b/docs/examples/account/update-phone-verification.md index 2ddd0f13..e2980824 100644 --- a/docs/examples/account/update-phone-verification.md +++ b/docs/examples/account/update-phone-verification.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updatePhoneVerification({ userId: '', - secret: '' + secret: '', }); console.log(result); diff --git a/docs/examples/account/update-phone.md b/docs/examples/account/update-phone.md index 9f640a12..e564e2ef 100644 --- a/docs/examples/account/update-phone.md +++ b/docs/examples/account/update-phone.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updatePhone({ phone: '+12065550100', - password: 'password' + password: 'password', }); console.log(result); diff --git a/docs/examples/account/update-prefs.md b/docs/examples/account/update-prefs.md index ca2841b7..ab1b9ffc 100644 --- a/docs/examples/account/update-prefs.md +++ b/docs/examples/account/update-prefs.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,10 +9,10 @@ const account = new Account(client); const result = await account.updatePrefs({ prefs: { - "language": "en", - "timezone": "UTC", - "darkTheme": true - } + language: 'en', + timezone: 'UTC', + darkTheme: true, + }, }); console.log(result); diff --git a/docs/examples/account/update-push-target.md b/docs/examples/account/update-push-target.md index 7c14aa3b..83bf217b 100644 --- a/docs/examples/account/update-push-target.md +++ b/docs/examples/account/update-push-target.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updatePushTarget({ targetId: '', - identifier: '' + identifier: '', }); console.log(result); diff --git a/docs/examples/account/update-recovery.md b/docs/examples/account/update-recovery.md index 52da3fb5..a1ca9cf4 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/examples/account/update-recovery.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const account = new Account(client); const result = await account.updateRecovery({ userId: '', secret: '', - password: 'password' + password: 'password', }); console.log(result); diff --git a/docs/examples/account/update-session.md b/docs/examples/account/update-session.md index 9159580f..7b7e88d5 100644 --- a/docs/examples/account/update-session.md +++ b/docs/examples/account/update-session.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const account = new Account(client); const result = await account.updateSession({ - sessionId: '' + sessionId: '', }); console.log(result); diff --git a/docs/examples/account/update-status.md b/docs/examples/account/update-status.md index ac2aa48e..d2ace3ff 100644 --- a/docs/examples/account/update-status.md +++ b/docs/examples/account/update-status.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/account/update-verification.md b/docs/examples/account/update-verification.md index 3b52a83c..c732ca82 100644 --- a/docs/examples/account/update-verification.md +++ b/docs/examples/account/update-verification.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Account } from "appwrite"; +import { Client, Account } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const account = new Account(client); const result = await account.updateVerification({ userId: '', - secret: '' + secret: '', }); console.log(result); diff --git a/docs/examples/avatars/get-browser.md b/docs/examples/avatars/get-browser.md index d4c1a40f..a446f4dc 100644 --- a/docs/examples/avatars/get-browser.md +++ b/docs/examples/avatars/get-browser.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Avatars, Browser } from "appwrite"; +import { Client, Avatars, Browser } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = avatars.getBrowser({ code: Browser.AvantBrowser, width: 0, // optional height: 0, // optional - quality: -1 // optional + quality: -1, // optional }); console.log(result); diff --git a/docs/examples/avatars/get-credit-card.md b/docs/examples/avatars/get-credit-card.md index 57758501..a644fda1 100644 --- a/docs/examples/avatars/get-credit-card.md +++ b/docs/examples/avatars/get-credit-card.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Avatars, CreditCard } from "appwrite"; +import { Client, Avatars, CreditCard } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = avatars.getCreditCard({ code: CreditCard.AmericanExpress, width: 0, // optional height: 0, // optional - quality: -1 // optional + quality: -1, // optional }); console.log(result); diff --git a/docs/examples/avatars/get-favicon.md b/docs/examples/avatars/get-favicon.md index 8b09f65f..8036a9f5 100644 --- a/docs/examples/avatars/get-favicon.md +++ b/docs/examples/avatars/get-favicon.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Avatars } from "appwrite"; +import { Client, Avatars } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const avatars = new Avatars(client); const result = avatars.getFavicon({ - url: 'https://example.com' + url: 'https://example.com', }); console.log(result); diff --git a/docs/examples/avatars/get-flag.md b/docs/examples/avatars/get-flag.md index d24b9b40..5264199e 100644 --- a/docs/examples/avatars/get-flag.md +++ b/docs/examples/avatars/get-flag.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Avatars, Flag } from "appwrite"; +import { Client, Avatars, Flag } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = avatars.getFlag({ code: Flag.Afghanistan, width: 0, // optional height: 0, // optional - quality: -1 // optional + quality: -1, // optional }); console.log(result); diff --git a/docs/examples/avatars/get-image.md b/docs/examples/avatars/get-image.md index f8f33731..d5cd7300 100644 --- a/docs/examples/avatars/get-image.md +++ b/docs/examples/avatars/get-image.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Avatars } from "appwrite"; +import { Client, Avatars } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const avatars = new Avatars(client); const result = avatars.getImage({ url: 'https://example.com', width: 0, // optional - height: 0 // optional + height: 0, // optional }); console.log(result); diff --git a/docs/examples/avatars/get-initials.md b/docs/examples/avatars/get-initials.md index 0722a72d..03c6f9b1 100644 --- a/docs/examples/avatars/get-initials.md +++ b/docs/examples/avatars/get-initials.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Avatars } from "appwrite"; +import { Client, Avatars } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = avatars.getInitials({ name: '', // optional width: 0, // optional height: 0, // optional - background: '' // optional + background: 'FFFFFF', // optional }); console.log(result); diff --git a/docs/examples/avatars/get-photo.md b/docs/examples/avatars/get-photo.md new file mode 100644 index 00000000..1b0567a3 --- /dev/null +++ b/docs/examples/avatars/get-photo.md @@ -0,0 +1,22 @@ +```javascript +import { Client, Avatars } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getPhoto({ + width: 0, // optional + height: 0, // optional + quality: 0, // optional + output: 'png', // optional + rating: 'g', // optional + userId: 'current()', // optional + emailHash: '', // optional + name: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/avatars/get-qr.md b/docs/examples/avatars/get-qr.md index 829c7121..59cda9cf 100644 --- a/docs/examples/avatars/get-qr.md +++ b/docs/examples/avatars/get-qr.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Avatars } from "appwrite"; +import { Client, Avatars } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = avatars.getQR({ text: '', size: 1, // optional margin: 0, // optional - download: false // optional + download: false, // optional }); console.log(result); diff --git a/docs/examples/avatars/get-screenshot.md b/docs/examples/avatars/get-screenshot.md index d45f1e6e..680d225e 100644 --- a/docs/examples/avatars/get-screenshot.md +++ b/docs/examples/avatars/get-screenshot.md @@ -1,5 +1,12 @@ ```javascript -import { Client, Avatars, BrowserTheme, Timezone, BrowserPermission, ImageFormat } from "appwrite"; +import { + Client, + Avatars, + BrowserTheme, + Timezone, + BrowserPermission, + ImageFormat, +} from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,14 +17,15 @@ const avatars = new Avatars(client); const result = avatars.getScreenshot({ url: 'https://example.com', headers: { - "Authorization": "Bearer token123", - "X-Custom-Header": "value" + Authorization: 'Bearer token123', + 'X-Custom-Header': 'value', }, // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional scale: 2, // optional theme: BrowserTheme.Dark, // optional - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional + userAgent: + 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional fullpage: true, // optional locale: 'en-US', // optional timezone: Timezone.AfricaAbidjan, // optional @@ -25,12 +33,15 @@ const result = avatars.getScreenshot({ longitude: -122.4194, // optional accuracy: 100, // optional touch: true, // optional - permissions: [BrowserPermission.Geolocation, BrowserPermission.Notifications], // optional + permissions: [ + BrowserPermission.Geolocation, + BrowserPermission.Notifications, + ], // optional sleep: 3, // optional width: 800, // optional height: 600, // optional quality: 85, // optional - output: ImageFormat.Jpeg // optional + output: ImageFormat.Jpeg, // optional }); console.log(result); diff --git a/docs/examples/databases/create-document.md b/docs/examples/databases/create-document.md index 4d8d7f90..822dd49f 100644 --- a/docs/examples/databases/create-document.md +++ b/docs/examples/databases/create-document.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases, Permission, Role } from "appwrite"; +import { Client, Databases, Permission, Role } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,14 +12,14 @@ const result = await databases.createDocument({ collectionId: '', documentId: '', data: { - "username": "walter.obrien", - "email": "walter.obrien@example.com", - "fullName": "Walter O'Brien", - "age": 30, - "isAdmin": false + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, }, permissions: [Permission.read(Role.any())], // optional - transactionId: '' // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/databases/create-operations.md b/docs/examples/databases/create-operations.md index 48c74718..ff5876bd 100644 --- a/docs/examples/databases/create-operations.md +++ b/docs/examples/databases/create-operations.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,16 +10,16 @@ const databases = new Databases(client); const result = await databases.createOperations({ transactionId: '', operations: [ - { - "action": "create", - "databaseId": "", - "collectionId": "", - "documentId": "", - "data": { - "name": "Walter O'Brien" - } - } - ] // optional + { + action: 'create', + databaseId: '', + collectionId: '', + documentId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional }); console.log(result); diff --git a/docs/examples/databases/create-transaction.md b/docs/examples/databases/create-transaction.md index eab2aa52..075d33b0 100644 --- a/docs/examples/databases/create-transaction.md +++ b/docs/examples/databases/create-transaction.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const databases = new Databases(client); const result = await databases.createTransaction({ - ttl: 60 // optional + ttl: 60, // optional }); console.log(result); diff --git a/docs/examples/databases/decrement-document-attribute.md b/docs/examples/databases/decrement-document-attribute.md index c657bd49..bc5a24bc 100644 --- a/docs/examples/databases/decrement-document-attribute.md +++ b/docs/examples/databases/decrement-document-attribute.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,10 +11,10 @@ const result = await databases.decrementDocumentAttribute({ databaseId: '', collectionId: '', documentId: '', - attribute: '', - value: null, // optional - min: null, // optional - transactionId: '' // optional + attribute: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/databases/delete-document.md b/docs/examples/databases/delete-document.md index 95665088..a5e123f4 100644 --- a/docs/examples/databases/delete-document.md +++ b/docs/examples/databases/delete-document.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await databases.deleteDocument({ databaseId: '', collectionId: '', documentId: '', - transactionId: '' // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/databases/delete-transaction.md b/docs/examples/databases/delete-transaction.md index 2e41d9be..b7f17796 100644 --- a/docs/examples/databases/delete-transaction.md +++ b/docs/examples/databases/delete-transaction.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const databases = new Databases(client); const result = await databases.deleteTransaction({ - transactionId: '' + transactionId: '', }); console.log(result); diff --git a/docs/examples/databases/get-document.md b/docs/examples/databases/get-document.md index ad11eb8d..4d900ffb 100644 --- a/docs/examples/databases/get-document.md +++ b/docs/examples/databases/get-document.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,7 +12,7 @@ const result = await databases.getDocument({ collectionId: '', documentId: '', queries: [], // optional - transactionId: '' // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/databases/get-transaction.md b/docs/examples/databases/get-transaction.md index 2419a8c0..13d5c189 100644 --- a/docs/examples/databases/get-transaction.md +++ b/docs/examples/databases/get-transaction.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const databases = new Databases(client); const result = await databases.getTransaction({ - transactionId: '' + transactionId: '', }); console.log(result); diff --git a/docs/examples/databases/increment-document-attribute.md b/docs/examples/databases/increment-document-attribute.md index 51eec6d5..38fdeee0 100644 --- a/docs/examples/databases/increment-document-attribute.md +++ b/docs/examples/databases/increment-document-attribute.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,10 +11,10 @@ const result = await databases.incrementDocumentAttribute({ databaseId: '', collectionId: '', documentId: '', - attribute: '', - value: null, // optional - max: null, // optional - transactionId: '' // optional + attribute: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/databases/list-documents.md b/docs/examples/databases/list-documents.md index 5444dffb..e10300a9 100644 --- a/docs/examples/databases/list-documents.md +++ b/docs/examples/databases/list-documents.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -13,7 +13,7 @@ const result = await databases.listDocuments({ queries: [], // optional transactionId: '', // optional total: false, // optional - ttl: 0 // optional + ttl: 0, // optional }); console.log(result); diff --git a/docs/examples/databases/list-transactions.md b/docs/examples/databases/list-transactions.md index 6a74afc0..bb8ae2e1 100644 --- a/docs/examples/databases/list-transactions.md +++ b/docs/examples/databases/list-transactions.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const databases = new Databases(client); const result = await databases.listTransactions({ - queries: [] // optional + queries: [], // optional }); console.log(result); diff --git a/docs/examples/databases/update-document.md b/docs/examples/databases/update-document.md index df5651d8..026b9fe1 100644 --- a/docs/examples/databases/update-document.md +++ b/docs/examples/databases/update-document.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases, Permission, Role } from "appwrite"; +import { Client, Databases, Permission, Role } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,14 +12,14 @@ const result = await databases.updateDocument({ collectionId: '', documentId: '', data: { - "username": "walter.obrien", - "email": "walter.obrien@example.com", - "fullName": "Walter O'Brien", - "age": 33, - "isAdmin": false + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, }, // optional permissions: [Permission.read(Role.any())], // optional - transactionId: '' // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/databases/update-transaction.md b/docs/examples/databases/update-transaction.md index 5a50ef67..f7ddf24a 100644 --- a/docs/examples/databases/update-transaction.md +++ b/docs/examples/databases/update-transaction.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases } from "appwrite"; +import { Client, Databases } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const databases = new Databases(client); const result = await databases.updateTransaction({ transactionId: '', commit: false, // optional - rollback: false // optional + rollback: false, // optional }); console.log(result); diff --git a/docs/examples/databases/upsert-document.md b/docs/examples/databases/upsert-document.md index 212964a6..02ef19b1 100644 --- a/docs/examples/databases/upsert-document.md +++ b/docs/examples/databases/upsert-document.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Databases, Permission, Role } from "appwrite"; +import { Client, Databases, Permission, Role } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,14 +12,14 @@ const result = await databases.upsertDocument({ collectionId: '', documentId: '', data: { - "username": "walter.obrien", - "email": "walter.obrien@example.com", - "fullName": "Walter O'Brien", - "age": 30, - "isAdmin": false + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, }, // optional permissions: [Permission.read(Role.any())], // optional - transactionId: '' // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/documentsdb/create-document.md b/docs/examples/documentsdb/create-document.md new file mode 100644 index 00000000..b33c8780 --- /dev/null +++ b/docs/examples/documentsdb/create-document.md @@ -0,0 +1,26 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/create-documents.md b/docs/examples/documentsdb/create-documents.md new file mode 100644 index 00000000..c2830b94 --- /dev/null +++ b/docs/examples/documentsdb/create-documents.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createDocuments({ + databaseId: '', + collectionId: '', + documents: [], + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/create-operations.md b/docs/examples/documentsdb/create-operations.md new file mode 100644 index 00000000..371f4cf3 --- /dev/null +++ b/docs/examples/documentsdb/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createOperations({ + transactionId: '', + operations: [ + { + action: 'create', + databaseId: '', + collectionId: '', + documentId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/create-transaction.md b/docs/examples/documentsdb/create-transaction.md new file mode 100644 index 00000000..5eaf0065 --- /dev/null +++ b/docs/examples/documentsdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/decrement-document-attribute.md b/docs/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 00000000..75f4b038 --- /dev/null +++ b/docs/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/delete-document.md b/docs/examples/documentsdb/delete-document.md new file mode 100644 index 00000000..e8b7e18b --- /dev/null +++ b/docs/examples/documentsdb/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/delete-transaction.md b/docs/examples/documentsdb/delete-transaction.md new file mode 100644 index 00000000..97c1fe6f --- /dev/null +++ b/docs/examples/documentsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.deleteTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/get-document.md b/docs/examples/documentsdb/get-document.md new file mode 100644 index 00000000..daedc268 --- /dev/null +++ b/docs/examples/documentsdb/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/get-transaction.md b/docs/examples/documentsdb/get-transaction.md new file mode 100644 index 00000000..75cdd78f --- /dev/null +++ b/docs/examples/documentsdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.getTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/increment-document-attribute.md b/docs/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 00000000..493b8a68 --- /dev/null +++ b/docs/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,21 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/list-documents.md b/docs/examples/documentsdb/list-documents.md new file mode 100644 index 00000000..26081239 --- /dev/null +++ b/docs/examples/documentsdb/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/list-transactions.md b/docs/examples/documentsdb/list-transactions.md new file mode 100644 index 00000000..161d3880 --- /dev/null +++ b/docs/examples/documentsdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/update-document.md b/docs/examples/documentsdb/update-document.md new file mode 100644 index 00000000..5acecac7 --- /dev/null +++ b/docs/examples/documentsdb/update-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/update-transaction.md b/docs/examples/documentsdb/update-transaction.md new file mode 100644 index 00000000..5f8d74df --- /dev/null +++ b/docs/examples/documentsdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, DocumentsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/documentsdb/upsert-document.md b/docs/examples/documentsdb/upsert-document.md new file mode 100644 index 00000000..3e10833c --- /dev/null +++ b/docs/examples/documentsdb/upsert-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, DocumentsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const documentsDB = new DocumentsDB(client); + +const result = await documentsDB.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/functions/create-execution.md b/docs/examples/functions/create-execution.md index 71dd8cc3..d746df9a 100644 --- a/docs/examples/functions/create-execution.md +++ b/docs/examples/functions/create-execution.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Functions, ExecutionMethod } from "appwrite"; +import { Client, Functions, ExecutionMethod } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,7 +14,7 @@ const result = await functions.createExecution({ xpath: '', // optional method: ExecutionMethod.GET, // optional headers: {}, // optional - scheduledAt: '' // optional + scheduledAt: '', // optional }); console.log(result); diff --git a/docs/examples/functions/get-execution.md b/docs/examples/functions/get-execution.md index a9b22e29..a8c5064e 100644 --- a/docs/examples/functions/get-execution.md +++ b/docs/examples/functions/get-execution.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Functions } from "appwrite"; +import { Client, Functions } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const functions = new Functions(client); const result = await functions.getExecution({ functionId: '', - executionId: '' + executionId: '', }); console.log(result); diff --git a/docs/examples/functions/list-executions.md b/docs/examples/functions/list-executions.md index 55aa3cb7..95f7cd2f 100644 --- a/docs/examples/functions/list-executions.md +++ b/docs/examples/functions/list-executions.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Functions } from "appwrite"; +import { Client, Functions } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const functions = new Functions(client); const result = await functions.listExecutions({ functionId: '', queries: [], // optional - total: false // optional + total: false, // optional }); console.log(result); diff --git a/docs/examples/graphql/mutation.md b/docs/examples/graphql/mutation.md index a0230ef6..abd27e3d 100644 --- a/docs/examples/graphql/mutation.md +++ b/docs/examples/graphql/mutation.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Graphql } from "appwrite"; +import { Client, Graphql } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const graphql = new Graphql(client); const result = await graphql.mutation({ - query: {} + query: {}, }); console.log(result); diff --git a/docs/examples/graphql/query.md b/docs/examples/graphql/query.md index bef786ab..21b353fc 100644 --- a/docs/examples/graphql/query.md +++ b/docs/examples/graphql/query.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Graphql } from "appwrite"; +import { Client, Graphql } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const graphql = new Graphql(client); const result = await graphql.query({ - query: {} + query: {}, }); console.log(result); diff --git a/docs/examples/locale/get.md b/docs/examples/locale/get.md index 95e92c4c..f0bd78be 100644 --- a/docs/examples/locale/get.md +++ b/docs/examples/locale/get.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Locale } from "appwrite"; +import { Client, Locale } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/locale/list-codes.md b/docs/examples/locale/list-codes.md index d6e9d33b..dce429ef 100644 --- a/docs/examples/locale/list-codes.md +++ b/docs/examples/locale/list-codes.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Locale } from "appwrite"; +import { Client, Locale } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/locale/list-continents.md b/docs/examples/locale/list-continents.md index 6af2b7f4..4fde4252 100644 --- a/docs/examples/locale/list-continents.md +++ b/docs/examples/locale/list-continents.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Locale } from "appwrite"; +import { Client, Locale } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/locale/list-countries-eu.md b/docs/examples/locale/list-countries-eu.md index 92b3fa08..91724546 100644 --- a/docs/examples/locale/list-countries-eu.md +++ b/docs/examples/locale/list-countries-eu.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Locale } from "appwrite"; +import { Client, Locale } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/locale/list-countries-phones.md b/docs/examples/locale/list-countries-phones.md index 517a19a3..95ef6e53 100644 --- a/docs/examples/locale/list-countries-phones.md +++ b/docs/examples/locale/list-countries-phones.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Locale } from "appwrite"; +import { Client, Locale } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/locale/list-countries.md b/docs/examples/locale/list-countries.md index f92f9985..7d37e801 100644 --- a/docs/examples/locale/list-countries.md +++ b/docs/examples/locale/list-countries.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Locale } from "appwrite"; +import { Client, Locale } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/locale/list-currencies.md b/docs/examples/locale/list-currencies.md index 50c0f222..b123b178 100644 --- a/docs/examples/locale/list-currencies.md +++ b/docs/examples/locale/list-currencies.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Locale } from "appwrite"; +import { Client, Locale } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/locale/list-languages.md b/docs/examples/locale/list-languages.md index a3afe001..c9abd5dc 100644 --- a/docs/examples/locale/list-languages.md +++ b/docs/examples/locale/list-languages.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Locale } from "appwrite"; +import { Client, Locale } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/messaging/create-subscriber.md b/docs/examples/messaging/create-subscriber.md index c29c2f71..6ff4eddc 100644 --- a/docs/examples/messaging/create-subscriber.md +++ b/docs/examples/messaging/create-subscriber.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Messaging } from "appwrite"; +import { Client, Messaging } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const messaging = new Messaging(client); const result = await messaging.createSubscriber({ topicId: '', subscriberId: '', - targetId: '' + targetId: '', }); console.log(result); diff --git a/docs/examples/messaging/delete-subscriber.md b/docs/examples/messaging/delete-subscriber.md index acd0be51..e933009b 100644 --- a/docs/examples/messaging/delete-subscriber.md +++ b/docs/examples/messaging/delete-subscriber.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Messaging } from "appwrite"; +import { Client, Messaging } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const messaging = new Messaging(client); const result = await messaging.deleteSubscriber({ topicId: '', - subscriberId: '' + subscriberId: '', }); console.log(result); diff --git a/docs/examples/organization/create-installation.md b/docs/examples/organization/create-installation.md new file mode 100644 index 00000000..546f71bb --- /dev/null +++ b/docs/examples/organization/create-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.createInstallation({ + appId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/organization/delete-installation.md b/docs/examples/organization/delete-installation.md new file mode 100644 index 00000000..37969f2c --- /dev/null +++ b/docs/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.deleteInstallation({ + installationId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/organization/get-installation.md b/docs/examples/organization/get-installation.md new file mode 100644 index 00000000..f862572d --- /dev/null +++ b/docs/examples/organization/get-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.getInstallation({ + installationId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/organization/list-installations.md b/docs/examples/organization/list-installations.md new file mode 100644 index 00000000..80be69db --- /dev/null +++ b/docs/examples/organization/list-installations.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.listInstallations({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/organization/update-installation.md b/docs/examples/organization/update-installation.md new file mode 100644 index 00000000..9bcfb9da --- /dev/null +++ b/docs/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.updateInstallation({ + installationId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/presences/delete.md b/docs/examples/presences/delete.md index 05d740bb..5c0d638e 100644 --- a/docs/examples/presences/delete.md +++ b/docs/examples/presences/delete.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Presences } from "appwrite"; +import { Client, Presences } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const presences = new Presences(client); const result = await presences.delete({ - presenceId: '' + presenceId: '', }); console.log(result); diff --git a/docs/examples/presences/get.md b/docs/examples/presences/get.md index dc4f2438..6290f7ed 100644 --- a/docs/examples/presences/get.md +++ b/docs/examples/presences/get.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Presences } from "appwrite"; +import { Client, Presences } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const presences = new Presences(client); const result = await presences.get({ - presenceId: '' + presenceId: '', }); console.log(result); diff --git a/docs/examples/presences/list.md b/docs/examples/presences/list.md index 4e7c8762..c9ac96b8 100644 --- a/docs/examples/presences/list.md +++ b/docs/examples/presences/list.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Presences } from "appwrite"; +import { Client, Presences } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const presences = new Presences(client); const result = await presences.list({ queries: [], // optional total: false, // optional - ttl: 0 // optional + ttl: 0, // optional }); console.log(result); diff --git a/docs/examples/presences/update.md b/docs/examples/presences/update.md index 79e5aa91..44dc92f8 100644 --- a/docs/examples/presences/update.md +++ b/docs/examples/presences/update.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Presences, Permission, Role } from "appwrite"; +import { Client, Presences, Permission, Role } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -13,7 +13,7 @@ const result = await presences.update({ expiresAt: '2020-10-15T06:38:00.000+00:00', // optional metadata: {}, // optional permissions: [Permission.read(Role.any())], // optional - purge: false // optional + purge: false, // optional }); console.log(result); diff --git a/docs/examples/presences/upsert.md b/docs/examples/presences/upsert.md index e8fb6349..7e03206f 100644 --- a/docs/examples/presences/upsert.md +++ b/docs/examples/presences/upsert.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Presences, Permission, Role } from "appwrite"; +import { Client, Presences, Permission, Role } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,7 +12,7 @@ const result = await presences.upsert({ status: '', permissions: [Permission.read(Role.any())], // optional expiresAt: '2020-10-15T06:38:00.000+00:00', // optional - metadata: {} // optional + metadata: {}, // optional }); console.log(result); diff --git a/docs/examples/storage/create-file.md b/docs/examples/storage/create-file.md index b70885b2..f4828d98 100644 --- a/docs/examples/storage/create-file.md +++ b/docs/examples/storage/create-file.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Storage, Permission, Role } from "appwrite"; +import { Client, Storage, Permission, Role } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,8 @@ const result = await storage.createFile({ bucketId: '', fileId: '', file: document.getElementById('uploader').files[0], - permissions: [Permission.read(Role.any())] // optional + permissions: [Permission.read(Role.any())], // optional + folder: 'photos/2026', // optional }); console.log(result); diff --git a/docs/examples/storage/delete-file.md b/docs/examples/storage/delete-file.md index 950003b8..c1ad6504 100644 --- a/docs/examples/storage/delete-file.md +++ b/docs/examples/storage/delete-file.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Storage } from "appwrite"; +import { Client, Storage } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const storage = new Storage(client); const result = await storage.deleteFile({ bucketId: '', - fileId: '' + fileId: '', }); console.log(result); diff --git a/docs/examples/storage/get-file-download.md b/docs/examples/storage/get-file-download.md index 7758c7b4..bd2a7e60 100644 --- a/docs/examples/storage/get-file-download.md +++ b/docs/examples/storage/get-file-download.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Storage } from "appwrite"; +import { Client, Storage } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const storage = new Storage(client); const result = storage.getFileDownload({ bucketId: '', fileId: '', - token: '' // optional + token: '', // optional }); console.log(result); diff --git a/docs/examples/storage/get-file-preview.md b/docs/examples/storage/get-file-preview.md index 4d01ef0c..71025616 100644 --- a/docs/examples/storage/get-file-preview.md +++ b/docs/examples/storage/get-file-preview.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Storage, ImageGravity, ImageFormat } from "appwrite"; +import { Client, Storage, ImageGravity, ImageFormat } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,13 +15,13 @@ const result = storage.getFilePreview({ gravity: ImageGravity.Center, // optional quality: -1, // optional borderWidth: 0, // optional - borderColor: '', // optional + borderColor: 'FFFFFF', // optional borderRadius: 0, // optional opacity: 0, // optional rotation: -360, // optional - background: '', // optional + background: 'FFFFFF', // optional output: ImageFormat.Jpg, // optional - token: '' // optional + token: '', // optional }); console.log(result); diff --git a/docs/examples/storage/get-file-view.md b/docs/examples/storage/get-file-view.md index 682e947c..ba86f7c3 100644 --- a/docs/examples/storage/get-file-view.md +++ b/docs/examples/storage/get-file-view.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Storage } from "appwrite"; +import { Client, Storage } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const storage = new Storage(client); const result = storage.getFileView({ bucketId: '', fileId: '', - token: '' // optional + token: '', // optional }); console.log(result); diff --git a/docs/examples/storage/get-file.md b/docs/examples/storage/get-file.md index 82607140..8045f09c 100644 --- a/docs/examples/storage/get-file.md +++ b/docs/examples/storage/get-file.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Storage } from "appwrite"; +import { Client, Storage } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const storage = new Storage(client); const result = await storage.getFile({ bucketId: '', - fileId: '' + fileId: '', }); console.log(result); diff --git a/docs/examples/storage/list-files.md b/docs/examples/storage/list-files.md index f2dd2f44..d80afccf 100644 --- a/docs/examples/storage/list-files.md +++ b/docs/examples/storage/list-files.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Storage } from "appwrite"; +import { Client, Storage } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await storage.listFiles({ bucketId: '', queries: [], // optional search: '', // optional - total: false // optional + total: false, // optional }); console.log(result); diff --git a/docs/examples/storage/update-file.md b/docs/examples/storage/update-file.md index eef78a1d..fb138390 100644 --- a/docs/examples/storage/update-file.md +++ b/docs/examples/storage/update-file.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Storage, Permission, Role } from "appwrite"; +import { Client, Storage, Permission, Role } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await storage.updateFile({ bucketId: '', fileId: '', name: '', // optional - permissions: [Permission.read(Role.any())] // optional + permissions: [Permission.read(Role.any())], // optional }); console.log(result); diff --git a/docs/examples/tablesdb/create-operations.md b/docs/examples/tablesdb/create-operations.md index 739b4e62..10dff2ce 100644 --- a/docs/examples/tablesdb/create-operations.md +++ b/docs/examples/tablesdb/create-operations.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,16 +10,16 @@ const tablesDB = new TablesDB(client); const result = await tablesDB.createOperations({ transactionId: '', operations: [ - { - "action": "create", - "databaseId": "", - "tableId": "", - "rowId": "", - "data": { - "name": "Walter O'Brien" - } - } - ] // optional + { + action: 'create', + databaseId: '', + tableId: '', + rowId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional }); console.log(result); diff --git a/docs/examples/tablesdb/create-row.md b/docs/examples/tablesdb/create-row.md index 105c4445..9902804e 100644 --- a/docs/examples/tablesdb/create-row.md +++ b/docs/examples/tablesdb/create-row.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB, Permission, Role } from "appwrite"; +import { Client, TablesDB, Permission, Role } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,14 +12,14 @@ const result = await tablesDB.createRow({ tableId: '', rowId: '', data: { - "username": "walter.obrien", - "email": "walter.obrien@example.com", - "fullName": "Walter O'Brien", - "age": 30, - "isAdmin": false + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, }, permissions: [Permission.read(Role.any())], // optional - transactionId: '' // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/tablesdb/create-transaction.md b/docs/examples/tablesdb/create-transaction.md index 333eb80e..df28475c 100644 --- a/docs/examples/tablesdb/create-transaction.md +++ b/docs/examples/tablesdb/create-transaction.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const tablesDB = new TablesDB(client); const result = await tablesDB.createTransaction({ - ttl: 60 // optional + ttl: 60, // optional }); console.log(result); diff --git a/docs/examples/tablesdb/decrement-row-column.md b/docs/examples/tablesdb/decrement-row-column.md index bad89263..c8587f48 100644 --- a/docs/examples/tablesdb/decrement-row-column.md +++ b/docs/examples/tablesdb/decrement-row-column.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,10 +11,10 @@ const result = await tablesDB.decrementRowColumn({ databaseId: '', tableId: '', rowId: '', - column: '', - value: null, // optional - min: null, // optional - transactionId: '' // optional + column: '', + value: 1, // optional + min: 0, // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/tablesdb/delete-row.md b/docs/examples/tablesdb/delete-row.md index 12663286..19321d96 100644 --- a/docs/examples/tablesdb/delete-row.md +++ b/docs/examples/tablesdb/delete-row.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await tablesDB.deleteRow({ databaseId: '', tableId: '', rowId: '', - transactionId: '' // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/tablesdb/delete-transaction.md b/docs/examples/tablesdb/delete-transaction.md index 0c98481c..c0c2da7b 100644 --- a/docs/examples/tablesdb/delete-transaction.md +++ b/docs/examples/tablesdb/delete-transaction.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const tablesDB = new TablesDB(client); const result = await tablesDB.deleteTransaction({ - transactionId: '' + transactionId: '', }); console.log(result); diff --git a/docs/examples/tablesdb/get-row.md b/docs/examples/tablesdb/get-row.md index 14316385..4940f56b 100644 --- a/docs/examples/tablesdb/get-row.md +++ b/docs/examples/tablesdb/get-row.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,7 +12,7 @@ const result = await tablesDB.getRow({ tableId: '', rowId: '', queries: [], // optional - transactionId: '' // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/tablesdb/get-transaction.md b/docs/examples/tablesdb/get-transaction.md index 00e72497..e940f421 100644 --- a/docs/examples/tablesdb/get-transaction.md +++ b/docs/examples/tablesdb/get-transaction.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const tablesDB = new TablesDB(client); const result = await tablesDB.getTransaction({ - transactionId: '' + transactionId: '', }); console.log(result); diff --git a/docs/examples/tablesdb/increment-row-column.md b/docs/examples/tablesdb/increment-row-column.md index 2fa3354b..c4e7954c 100644 --- a/docs/examples/tablesdb/increment-row-column.md +++ b/docs/examples/tablesdb/increment-row-column.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,10 +11,10 @@ const result = await tablesDB.incrementRowColumn({ databaseId: '', tableId: '', rowId: '', - column: '', - value: null, // optional - max: null, // optional - transactionId: '' // optional + column: '', + value: 1, // optional + max: 100, // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/tablesdb/list-rows.md b/docs/examples/tablesdb/list-rows.md index 455ec6fe..9a73c453 100644 --- a/docs/examples/tablesdb/list-rows.md +++ b/docs/examples/tablesdb/list-rows.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -13,7 +13,7 @@ const result = await tablesDB.listRows({ queries: [], // optional transactionId: '', // optional total: false, // optional - ttl: 0 // optional + ttl: 0, // optional }); console.log(result); diff --git a/docs/examples/tablesdb/list-transactions.md b/docs/examples/tablesdb/list-transactions.md index b6448518..20f0dba5 100644 --- a/docs/examples/tablesdb/list-transactions.md +++ b/docs/examples/tablesdb/list-transactions.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const tablesDB = new TablesDB(client); const result = await tablesDB.listTransactions({ - queries: [] // optional + queries: [], // optional }); console.log(result); diff --git a/docs/examples/tablesdb/update-row.md b/docs/examples/tablesdb/update-row.md index 77a775b3..633e3803 100644 --- a/docs/examples/tablesdb/update-row.md +++ b/docs/examples/tablesdb/update-row.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB, Permission, Role } from "appwrite"; +import { Client, TablesDB, Permission, Role } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,14 +12,14 @@ const result = await tablesDB.updateRow({ tableId: '', rowId: '', data: { - "username": "walter.obrien", - "email": "walter.obrien@example.com", - "fullName": "Walter O'Brien", - "age": 33, - "isAdmin": false + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, }, // optional permissions: [Permission.read(Role.any())], // optional - transactionId: '' // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/tablesdb/update-transaction.md b/docs/examples/tablesdb/update-transaction.md index 80a8b89d..c64ea2ad 100644 --- a/docs/examples/tablesdb/update-transaction.md +++ b/docs/examples/tablesdb/update-transaction.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const tablesDB = new TablesDB(client); const result = await tablesDB.updateTransaction({ transactionId: '', commit: false, // optional - rollback: false // optional + rollback: false, // optional }); console.log(result); diff --git a/docs/examples/tablesdb/upsert-row.md b/docs/examples/tablesdb/upsert-row.md index fb971043..d7543441 100644 --- a/docs/examples/tablesdb/upsert-row.md +++ b/docs/examples/tablesdb/upsert-row.md @@ -1,5 +1,5 @@ ```javascript -import { Client, TablesDB, Permission, Role } from "appwrite"; +import { Client, TablesDB, Permission, Role } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,14 +12,14 @@ const result = await tablesDB.upsertRow({ tableId: '', rowId: '', data: { - "username": "walter.obrien", - "email": "walter.obrien@example.com", - "fullName": "Walter O'Brien", - "age": 33, - "isAdmin": false + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 33, + isAdmin: false, }, // optional permissions: [Permission.read(Role.any())], // optional - transactionId: '' // optional + transactionId: '', // optional }); console.log(result); diff --git a/docs/examples/teams/create-installation.md b/docs/examples/teams/create-installation.md new file mode 100644 index 00000000..f70ea5bc --- /dev/null +++ b/docs/examples/teams/create-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createInstallation({ + teamId: '', + appId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index 5a23e078..d8f15f3d 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/examples/teams/create-membership.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,7 +14,7 @@ const result = await teams.createMembership({ userId: '', // optional phone: '+12065550100', // optional url: 'https://example.com', // optional - name: '' // optional + name: '', // optional }); console.log(result); diff --git a/docs/examples/teams/create.md b/docs/examples/teams/create.md index 2c72bcdf..00668a7f 100644 --- a/docs/examples/teams/create.md +++ b/docs/examples/teams/create.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const teams = new Teams(client); const result = await teams.create({ teamId: '', name: '', - roles: [] // optional + roles: [], // optional }); console.log(result); diff --git a/docs/examples/teams/delete-installation.md b/docs/examples/teams/delete-installation.md new file mode 100644 index 00000000..17f5ae5a --- /dev/null +++ b/docs/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteInstallation({ + teamId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/teams/delete-membership.md b/docs/examples/teams/delete-membership.md index 2fe13278..f3205737 100644 --- a/docs/examples/teams/delete-membership.md +++ b/docs/examples/teams/delete-membership.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const teams = new Teams(client); const result = await teams.deleteMembership({ teamId: '', - membershipId: '' + membershipId: '', }); console.log(result); diff --git a/docs/examples/teams/delete.md b/docs/examples/teams/delete.md index 054e34ef..92900b3f 100644 --- a/docs/examples/teams/delete.md +++ b/docs/examples/teams/delete.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const teams = new Teams(client); const result = await teams.delete({ - teamId: '' + teamId: '', }); console.log(result); diff --git a/docs/examples/teams/get-installation.md b/docs/examples/teams/get-installation.md new file mode 100644 index 00000000..40ff94fa --- /dev/null +++ b/docs/examples/teams/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getInstallation({ + teamId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/teams/get-membership.md b/docs/examples/teams/get-membership.md index bdd6c784..a09e27df 100644 --- a/docs/examples/teams/get-membership.md +++ b/docs/examples/teams/get-membership.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const teams = new Teams(client); const result = await teams.getMembership({ teamId: '', - membershipId: '' + membershipId: '', }); console.log(result); diff --git a/docs/examples/teams/get-prefs.md b/docs/examples/teams/get-prefs.md index bf20ed47..2023c9fb 100644 --- a/docs/examples/teams/get-prefs.md +++ b/docs/examples/teams/get-prefs.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const teams = new Teams(client); const result = await teams.getPrefs({ - teamId: '' + teamId: '', }); console.log(result); diff --git a/docs/examples/teams/get.md b/docs/examples/teams/get.md index 836a8e08..71fc061f 100644 --- a/docs/examples/teams/get.md +++ b/docs/examples/teams/get.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -8,7 +8,7 @@ const client = new Client() const teams = new Teams(client); const result = await teams.get({ - teamId: '' + teamId: '', }); console.log(result); diff --git a/docs/examples/teams/list-installations.md b/docs/examples/teams/list-installations.md new file mode 100644 index 00000000..fc1dc206 --- /dev/null +++ b/docs/examples/teams/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listInstallations({ + teamId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/teams/list-memberships.md b/docs/examples/teams/list-memberships.md index fd3fcd30..b2733127 100644 --- a/docs/examples/teams/list-memberships.md +++ b/docs/examples/teams/list-memberships.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await teams.listMemberships({ teamId: '', queries: [], // optional search: '', // optional - total: false // optional + total: false, // optional }); console.log(result); diff --git a/docs/examples/teams/list.md b/docs/examples/teams/list.md index 3406925f..9f414045 100644 --- a/docs/examples/teams/list.md +++ b/docs/examples/teams/list.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const teams = new Teams(client); const result = await teams.list({ queries: [], // optional search: '', // optional - total: false // optional + total: false, // optional }); console.log(result); diff --git a/docs/examples/teams/update-installation.md b/docs/examples/teams/update-installation.md new file mode 100644 index 00000000..5b6a439c --- /dev/null +++ b/docs/examples/teams/update-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateInstallation({ + teamId: '', + installationId: '', + authorizationDetails: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/teams/update-membership-status.md b/docs/examples/teams/update-membership-status.md index 2ca1c62d..e0039229 100644 --- a/docs/examples/teams/update-membership-status.md +++ b/docs/examples/teams/update-membership-status.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await teams.updateMembershipStatus({ teamId: '', membershipId: '', userId: '', - secret: '' + secret: '', }); console.log(result); diff --git a/docs/examples/teams/update-membership.md b/docs/examples/teams/update-membership.md index ecfd1bc8..a568e304 100644 --- a/docs/examples/teams/update-membership.md +++ b/docs/examples/teams/update-membership.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const teams = new Teams(client); const result = await teams.updateMembership({ teamId: '', membershipId: '', - roles: [] + roles: [], }); console.log(result); diff --git a/docs/examples/teams/update-name.md b/docs/examples/teams/update-name.md index dce11078..d0661b29 100644 --- a/docs/examples/teams/update-name.md +++ b/docs/examples/teams/update-name.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const teams = new Teams(client); const result = await teams.updateName({ teamId: '', - name: '' + name: '', }); console.log(result); diff --git a/docs/examples/teams/update-prefs.md b/docs/examples/teams/update-prefs.md index 2c8a15a1..08b944c0 100644 --- a/docs/examples/teams/update-prefs.md +++ b/docs/examples/teams/update-prefs.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Teams } from "appwrite"; +import { Client, Teams } from 'appwrite'; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const teams = new Teams(client); const result = await teams.updatePrefs({ teamId: '', - prefs: {} + prefs: {}, }); console.log(result); diff --git a/docs/examples/vectorsdb/create-document.md b/docs/examples/vectorsdb/create-document.md new file mode 100644 index 00000000..f68aeef8 --- /dev/null +++ b/docs/examples/vectorsdb/create-document.md @@ -0,0 +1,25 @@ +```javascript +import { Client, VectorsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + key: 'value', + }, + }, + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/create-operations.md b/docs/examples/vectorsdb/create-operations.md new file mode 100644 index 00000000..35fb3d34 --- /dev/null +++ b/docs/examples/vectorsdb/create-operations.md @@ -0,0 +1,26 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createOperations({ + transactionId: '', + operations: [ + { + action: 'create', + databaseId: '', + collectionId: '', + documentId: '', + data: { + name: "Walter O'Brien", + }, + }, + ], // optional +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/create-query.md b/docs/examples/vectorsdb/create-query.md new file mode 100644 index 00000000..e5de0f42 --- /dev/null +++ b/docs/examples/vectorsdb/create-query.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createQuery({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/create-transaction.md b/docs/examples/vectorsdb/create-transaction.md new file mode 100644 index 00000000..7ae265b5 --- /dev/null +++ b/docs/examples/vectorsdb/create-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createTransaction({ + ttl: 60, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/delete-document.md b/docs/examples/vectorsdb/delete-document.md new file mode 100644 index 00000000..c7ccff59 --- /dev/null +++ b/docs/examples/vectorsdb/delete-document.md @@ -0,0 +1,18 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/delete-transaction.md b/docs/examples/vectorsdb/delete-transaction.md new file mode 100644 index 00000000..c03b17dd --- /dev/null +++ b/docs/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.deleteTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/get-document.md b/docs/examples/vectorsdb/get-document.md new file mode 100644 index 00000000..ce4ffc24 --- /dev/null +++ b/docs/examples/vectorsdb/get-document.md @@ -0,0 +1,19 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/get-transaction.md b/docs/examples/vectorsdb/get-transaction.md new file mode 100644 index 00000000..73f9d58a --- /dev/null +++ b/docs/examples/vectorsdb/get-transaction.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.getTransaction({ + transactionId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/list-documents.md b/docs/examples/vectorsdb/list-documents.md new file mode 100644 index 00000000..99a76f3a --- /dev/null +++ b/docs/examples/vectorsdb/list-documents.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/list-transactions.md b/docs/examples/vectorsdb/list-transactions.md new file mode 100644 index 00000000..a39afbc1 --- /dev/null +++ b/docs/examples/vectorsdb/list-transactions.md @@ -0,0 +1,15 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.listTransactions({ + queries: [], // optional +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/update-document.md b/docs/examples/vectorsdb/update-document.md new file mode 100644 index 00000000..56453ccb --- /dev/null +++ b/docs/examples/vectorsdb/update-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/update-transaction.md b/docs/examples/vectorsdb/update-transaction.md new file mode 100644 index 00000000..c3e229fa --- /dev/null +++ b/docs/examples/vectorsdb/update-transaction.md @@ -0,0 +1,17 @@ +```javascript +import { Client, VectorsDB } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/vectorsdb/upsert-document.md b/docs/examples/vectorsdb/upsert-document.md new file mode 100644 index 00000000..a7143a96 --- /dev/null +++ b/docs/examples/vectorsdb/upsert-document.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB, Permission, Role } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: '', // optional +}); + +console.log(result); +``` diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..b8d79f5d --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,31 @@ +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + eslint.configs.recommended, + tseslint.configs.recommended, + { + ignores: ['dist/', 'types/', 'docs/', 'rollup.config.mjs'], + }, + { + rules: { + // The SDK deliberately exposes loosely-typed surfaces (payloads, + // model generics defaulting to open records), so `any` is part of + // its public contract rather than an oversight. + '@typescript-eslint/no-explicit-any': 'off', + // Empty responses are typed `Promise<{}>` and the models are + // published under the `Models` namespace; both are part of the + // SDK's public API and cannot change without a breaking release. + '@typescript-eslint/no-empty-object-type': 'off', + '@typescript-eslint/no-namespace': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + }, + ], + }, + }, +); diff --git a/package-lock.json b/package-lock.json index 0b2ef769..9990a46d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,38 +1,259 @@ { "name": "appwrite", - "version": "26.2.0", + "version": "27.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "appwrite", - "version": "26.2.0", + "version": "27.0.0", "license": "BSD-3-Clause", "dependencies": { "json-bigint": "1.0.0" }, "devDependencies": { + "@eslint/js": "10.0.1", "@rollup/plugin-commonjs": "29.0.3", "@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-typescript": "12.3.0", "@types/json-bigint": "1.0.4", + "eslint": "10.9.1", "playwright": "1.56.1", - "rollup": "4.62.2", + "prettier": "3.9.6", + "rollup": "4.63.1", "serve-handler": "6.1.7", "tslib": "2.8.1", - "typescript": "5.9.3" + "typescript": "5.9.3", + "typescript-eslint": "8.69.0" }, "engines": { "node": ">=18.0.0" + }, + "overrides": { + "brace-expansion": "5.0.9" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz", + "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", "dev": true, "license": "MIT" }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, "node_modules/@rollup/plugin-commonjs": { "version": "29.0.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz", @@ -136,9 +357,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.2.tgz", - "integrity": "sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.1.tgz", + "integrity": "sha512-UZ8sUxPTiHWYX9QNdJedb1kDZSpS1t/VPWBWGSgqHNi9w3Cu6IXvu2mzbhiTiPvtrqgTQJ+zqiAq2iPIPilpaQ==", "cpu": [ "arm" ], @@ -150,9 +371,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.2.tgz", - "integrity": "sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.1.tgz", + "integrity": "sha512-cQ4nFQABN5cDvDpbvJ7bMStCpnaVxynZrRMfUJYgxcIk9Sh54FIO1vtfkg0B69REjER77ioZ/ov+eAApx/KmLQ==", "cpu": [ "arm64" ], @@ -164,9 +385,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.2.tgz", - "integrity": "sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.1.tgz", + "integrity": "sha512-FQNqd1lRy/0QhDk3xeRIkSBiCpXCiDnZO3YLVdcDKN1UBiKToNftCzcXYNLshmPDUMlu2TdeS8tGcsU6f3YF1Q==", "cpu": [ "arm64" ], @@ -178,9 +399,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.2.tgz", - "integrity": "sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.1.tgz", + "integrity": "sha512-pvD16V939D3CloK0+qikpGaxiPrDUXTe7Y5cWOMkMSy7m1cawa8EGy/kXYi/G/cKAC4HDAbSnzCIk1WmsoOKXg==", "cpu": [ "x64" ], @@ -192,9 +413,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.2.tgz", - "integrity": "sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.1.tgz", + "integrity": "sha512-pcFGeL2345VwdTnJhA6zLbew+YgWB0qBG2+dMtXjCicf6+rm6kO6cOoh5VnTe0ZMrMRgRyuHmCJxZWrIdzYuOw==", "cpu": [ "arm64" ], @@ -206,9 +427,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.2.tgz", - "integrity": "sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.1.tgz", + "integrity": "sha512-mRJlqSRulVzcKq/LKA6ICSIc3K/l4fzlVn/gePn2nXIHy8seRi5z/eeRE0d/XMBxcMldiXtQTSpRj0tkkC3g8Q==", "cpu": [ "x64" ], @@ -220,9 +441,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.2.tgz", - "integrity": "sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.1.tgz", + "integrity": "sha512-YDUNvVM85TI3g/1OpnqKP1h4NeW/j64DfWMf+G3M809xNk1bJSnpFp4sh83NpmVE5DXnkh8ULor4LTVZKoYLHw==", "cpu": [ "arm" ], @@ -237,9 +458,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.2.tgz", - "integrity": "sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.1.tgz", + "integrity": "sha512-7Mcn71p9ZuQFAj+h+dhQXy/yeLePRS2yKRnmW1DijA9thKO5qap0GNOIQK4yQ6iP3SU0Mrb/yWo8h8vgRba8lw==", "cpu": [ "arm" ], @@ -254,9 +475,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.2.tgz", - "integrity": "sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.1.tgz", + "integrity": "sha512-4YiLQTX6U4CSl0L9cluep9A9W6UmTfqBDc2/CH6wlu54pl4E7Jn3cOD8oxzvBDEGk/JMKgJ47C8g+radF7mwvg==", "cpu": [ "arm64" ], @@ -271,9 +492,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.2.tgz", - "integrity": "sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.1.tgz", + "integrity": "sha512-2ra8F7w8OquwZN9z2/fKFnli69wa8PLwaVzRMIPGb13ByMJwC28Fbp8YcVGoUhlYMTt7j5j9bNgpysrN2UM+vw==", "cpu": [ "arm64" ], @@ -288,9 +509,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.2.tgz", - "integrity": "sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.1.tgz", + "integrity": "sha512-Sy20ncyhjmBP0Ml+UvQbimjlk6VFgjW5uNP+qqwHB00mTE8Bl2C1TuHTlRwK2YoXeZbee5lP2XevBWVkAQAtSQ==", "cpu": [ "loong64" ], @@ -305,9 +526,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.2.tgz", - "integrity": "sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.1.tgz", + "integrity": "sha512-noITLp8oNjYliPnGWmLyelIHwULGqbHloQHGw1rtxbWhTuWooRpnZarZQJ1y9EUC4szuCusCc+HEpUtxpIwYvA==", "cpu": [ "loong64" ], @@ -322,9 +543,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.2.tgz", - "integrity": "sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.1.tgz", + "integrity": "sha512-hlxxXd+F1mWiAcaFR7Sv9ZQT6m6UfI8+Vy/kFJzztq2pDMU/0wZ9sish0iszNZvsQDo8Gc0i5yuFEOz5dDf6fA==", "cpu": [ "ppc64" ], @@ -339,9 +560,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.2.tgz", - "integrity": "sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.1.tgz", + "integrity": "sha512-EF7OpqQTQ/BvGqLzUi4rEHuagCV9MugAUXSHemwPW5vxZ75RR+jxO/2j95Ph2dalMpFHSVECjRoioHZgA9zOYA==", "cpu": [ "ppc64" ], @@ -356,9 +577,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.2.tgz", - "integrity": "sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.1.tgz", + "integrity": "sha512-wQO3JesW9PRkwlabQ27y7sPfVOOTLRG73I4F2UYHG5PXun3J9U3y+b7ezVKSYbsvSKGQ1k1cq8Qlun4C9kLt3w==", "cpu": [ "riscv64" ], @@ -373,9 +594,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.2.tgz", - "integrity": "sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.1.tgz", + "integrity": "sha512-ouAGwhO6wHRXdnOVCOsB0tRFkA7nhNB2Nwax6oECXN0YiN8EYUTBAOudADOB1PI+yDL61TeNx/u7MVCzksNbkQ==", "cpu": [ "riscv64" ], @@ -390,9 +611,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.2.tgz", - "integrity": "sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.1.tgz", + "integrity": "sha512-q2R38Sn+1J8RxhfJ+T54wSWmyKXWec+9jgDfqO2AtArEqHO5R2aeayp5H5OYLr5UYDVGsVaZPEFUooMhYCdz5A==", "cpu": [ "s390x" ], @@ -407,9 +628,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.2.tgz", - "integrity": "sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.1.tgz", + "integrity": "sha512-gfI5T24WLLuFfSKw7Go/zDXjAAV0fny0swTaDv+WjK7vqcw4cRhFfdsyKL1n+ukI+ooBxn3bVQnyrn06WpI50w==", "cpu": [ "x64" ], @@ -424,9 +645,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.2.tgz", - "integrity": "sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.1.tgz", + "integrity": "sha512-4h6XqthmB4Hspji84wvgk+ElodTsGj+dbZqHJHHtKxj4mYq0ANSEEPX9ys3moJueqsRjwpaJYH7874Itwnj2ow==", "cpu": [ "x64" ], @@ -441,9 +662,9 @@ ] }, "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.2.tgz", - "integrity": "sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.1.tgz", + "integrity": "sha512-dlfCOa87o1VAYegLQ9EKilx2JCeRofiyPGhTCmqnuXZ6bMPiycO1rq1+sKoulAp7pGLIsTIw+1x5R+zgh5LhhA==", "cpu": [ "x64" ], @@ -455,9 +676,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.2.tgz", - "integrity": "sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.1.tgz", + "integrity": "sha512-cjkLbOlfcm3QGhMM1J5zaZjsw1GggbN6rw9UTSSRrPrR1KkcXnN7Uq9rPw34xImQ9VOY9GN+6u2Zj80B9ptkcw==", "cpu": [ "arm64" ], @@ -469,9 +690,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.2.tgz", - "integrity": "sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.1.tgz", + "integrity": "sha512-Li1KdUnWGE4N3e1F/B4RTB1ms+nG4WBgjByO46pkeBVX/2UBsY53xf5vK9WygVmnH3RwncIST7lkSdLSY6P9lg==", "cpu": [ "arm64" ], @@ -483,9 +704,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.2.tgz", - "integrity": "sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.1.tgz", + "integrity": "sha512-t4ZYOSoLTgwhuFMrmTMLx/+i1DQVK7HYqMc6kY46EApwi8X0nIVphzdNoThU3xt6n+N5urG1/gxBdCaKDLavfg==", "cpu": [ "ia32" ], @@ -497,9 +718,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.2.tgz", - "integrity": "sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.1.tgz", + "integrity": "sha512-RgroPfMmKlD1RzSDxvwgcPiy2HNQKoYV7OmwIXDsk73uKW5t6B/V8KIy27SMv/FNXFo/oSBtWc9J0X7t91ezZg==", "cpu": [ "x64" ], @@ -511,9 +732,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.2.tgz", - "integrity": "sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.1.tgz", + "integrity": "sha512-at8QVep6S3h5Y6gSbdGU06bRY5WJkf6WUduM9YtvYMbYhB1MOFfUgc6kehitQXzOtMSaT70q7f9ydPhpqu821w==", "cpu": [ "x64" ], @@ -524,6 +745,13 @@ "win32" ] }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", @@ -538,6 +766,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/resolve": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", @@ -545,166 +780,770 @@ "dev": true, "license": "MIT" }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.69.0.tgz", + "integrity": "sha512-t5jQTKPIgVW1PE6dR6H6Qz5gm8zjMlX5/2gRaOGd9eO6V7J+tQc6iWKukEe7dY8u9HyYasQ0yfF0/FSSTEO2gA==", "dev": true, - "license": "MIT" - }, - "node_modules/bignumber.js": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", - "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.69.0", + "@typescript-eslint/type-utils": "8.69.0", + "@typescript-eslint/utils": "8.69.0", + "@typescript-eslint/visitor-keys": "8.69.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, "engines": { - "node": "*" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.69.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/brace-expansion": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", - "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.8.tgz", + "integrity": "sha512-YYNsSlXBjMk92SKnkwvB5LOVSa6OznlFUGcsvrFgNJbJCd0M1XKeFVRc8ZByeCqz32FivYNHJVooLmdqrmvp/Q==", "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "engines": { + "node": ">= 4" } }, - "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "node_modules/@typescript-eslint/parser": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.69.0.tgz", + "integrity": "sha512-l4b0DhWioGg6Gt2ebGlvfkFMOjRsauxtsnDRwUSRX1qHq3HdTfQHV8wW9zEXeciai6HfeaKOedQn2Zoofx3WBw==", "dev": true, "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.69.0", + "@typescript-eslint/types": "8.69.0", + "@typescript-eslint/typescript-estree": "8.69.0", + "@typescript-eslint/visitor-keys": "8.69.0", + "debug": "^4.4.3" + }, "engines": { - "node": ">= 0.8" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "node_modules/@typescript-eslint/project-service": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.69.0.tgz", + "integrity": "sha512-yi4obFrHMmnsesWehHbkg9zMA7Jt8cXT+mKM08G999pH1yT6nqgsHx7MYm0uY1wAj8CqiBXYRJ7WAT0QdQHQXg==", "dev": true, "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.69.0", + "@typescript-eslint/types": "^8.69.0", + "debug": "^4.4.3" + }, "engines": { - "node": ">= 0.6" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.69.0.tgz", + "integrity": "sha512-ewfspqWvSxKSOaplqAUNbaSFO0eB6w1EtQ+esfYFRm3614Ty4uNtExkcbgd6nWsXphbqKyf9ZYdbZdv2xEoWEQ==", "dev": true, "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.69.0", + "@typescript-eslint/visitor-keys": "8.69.0" + }, "engines": { - "node": ">=0.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.69.0.tgz", + "integrity": "sha512-xNqK7YTDZsLniQMV/4rpFR8Z5JlqeRvVjuG1YgF/mdPVH84HSD19L8CczMA0qg2RfwEV231GHH3VnToJDo4MfQ==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true, - "license": "MIT" - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "node_modules/@typescript-eslint/type-utils": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.69.0.tgz", + "integrity": "sha512-ZfoJAVg3JZndQEpEl9petVlxau3lRuElc4HRMuAlLCf8to04/iHz692RUSNmXKDjEuJmIL+KZ2/BsOcBc16dsA==", "dev": true, "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.69.0", + "@typescript-eslint/typescript-estree": "8.69.0", + "@typescript-eslint/utils": "8.69.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, "engines": { - "node": ">=12.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependencies": { - "picomatch": "^3 || ^4" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "node_modules/@typescript-eslint/types": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.69.0.tgz", + "integrity": "sha512-K3VrubUPhlo9VDBS6QdI8YB5j7ClpqLRdefcz6PFrhnwicehBweqQ9Evhl4l+FYz0HdDmMqIiSX0aldGRYtDCA==", "dev": true, - "hasInstallScript": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.69.0.tgz", + "integrity": "sha512-AdFkgqck3Vudb/kWnxlyafU/4aBhHrbQ9locP2N4psXTy5mOBg0SHJumnLvx7r6g1gV4DKvUFwV2nJZBoqOD8w==", "dev": true, "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.69.0", + "@typescript-eslint/tsconfig-utils": "8.69.0", + "@typescript-eslint/types": "8.69.0", + "@typescript-eslint/visitor-keys": "8.69.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/hasown": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", - "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "node_modules/@typescript-eslint/utils": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.69.0.tgz", + "integrity": "sha512-tUbx60BBqQa31kXF5MCsOOLL5E/WzUuxIn7YpAvq+eaUlqvk8/NXnXMBNAdLCr0icjkzem7iUA5QqWHe/hJ1aw==", "dev": true, "license": "MIT", "dependencies": { - "function-bind": "^1.1.2" + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.69.0", + "@typescript-eslint/types": "8.69.0", + "@typescript-eslint/typescript-estree": "8.69.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/is-core-module": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", - "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.69.0.tgz", + "integrity": "sha512-+rmdgPA+EXkNgKYvHvFfhrs35utXbwaC5PGpDquSXcoXQDKUA5UjV0LmTucG/4JXkM31BTu4TilHtrN8IVBe8w==", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.3" + "@typescript-eslint/types": "8.69.0", + "eslint-visitor-keys": "^5.0.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", + "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", + "dev": true, + "license": "MIT", + "workspaces": [ + "packages/*" + ], + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.2", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -722,6 +1561,13 @@ "@types/estree": "*" } }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, "node_modules/json-bigint": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", @@ -731,6 +1577,67 @@ "bignumber.js": "^9.0.0" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/magic-string": { "version": "0.30.21", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", @@ -765,16 +1672,93 @@ } }, "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^5.0.8" }, "engines": { - "node": "*" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" } }, "node_modules/path-is-inside": { @@ -784,6 +1768,16 @@ "dev": true, "license": "(WTFPL OR MIT)" }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -799,9 +1793,9 @@ "license": "MIT" }, "node_modules/picomatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", - "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -843,6 +1837,42 @@ "node": ">=18" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/range-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", @@ -876,9 +1906,9 @@ } }, "node_modules/rollup": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.2.tgz", - "integrity": "sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.1.tgz", + "integrity": "sha512-3Df9jsstwhccuEfmAMi9l8XUh/GOkVObmFTU7CCVBysEbcOZLl84jCtaAZMcPiMz2EGKsATzQcU+Xr3n/wU6cg==", "dev": true, "license": "MIT", "dependencies": { @@ -892,34 +1922,48 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.62.2", - "@rollup/rollup-android-arm64": "4.62.2", - "@rollup/rollup-darwin-arm64": "4.62.2", - "@rollup/rollup-darwin-x64": "4.62.2", - "@rollup/rollup-freebsd-arm64": "4.62.2", - "@rollup/rollup-freebsd-x64": "4.62.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.62.2", - "@rollup/rollup-linux-arm-musleabihf": "4.62.2", - "@rollup/rollup-linux-arm64-gnu": "4.62.2", - "@rollup/rollup-linux-arm64-musl": "4.62.2", - "@rollup/rollup-linux-loong64-gnu": "4.62.2", - "@rollup/rollup-linux-loong64-musl": "4.62.2", - "@rollup/rollup-linux-ppc64-gnu": "4.62.2", - "@rollup/rollup-linux-ppc64-musl": "4.62.2", - "@rollup/rollup-linux-riscv64-gnu": "4.62.2", - "@rollup/rollup-linux-riscv64-musl": "4.62.2", - "@rollup/rollup-linux-s390x-gnu": "4.62.2", - "@rollup/rollup-linux-x64-gnu": "4.62.2", - "@rollup/rollup-linux-x64-musl": "4.62.2", - "@rollup/rollup-openbsd-x64": "4.62.2", - "@rollup/rollup-openharmony-arm64": "4.62.2", - "@rollup/rollup-win32-arm64-msvc": "4.62.2", - "@rollup/rollup-win32-ia32-msvc": "4.62.2", - "@rollup/rollup-win32-x64-gnu": "4.62.2", - "@rollup/rollup-win32-x64-msvc": "4.62.2", + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.63.1", + "@rollup/rollup-android-arm64": "4.63.1", + "@rollup/rollup-darwin-arm64": "4.63.1", + "@rollup/rollup-darwin-x64": "4.63.1", + "@rollup/rollup-freebsd-arm64": "4.63.1", + "@rollup/rollup-freebsd-x64": "4.63.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.63.1", + "@rollup/rollup-linux-arm-musleabihf": "4.63.1", + "@rollup/rollup-linux-arm64-gnu": "4.63.1", + "@rollup/rollup-linux-arm64-musl": "4.63.1", + "@rollup/rollup-linux-loong64-gnu": "4.63.1", + "@rollup/rollup-linux-loong64-musl": "4.63.1", + "@rollup/rollup-linux-ppc64-gnu": "4.63.1", + "@rollup/rollup-linux-ppc64-musl": "4.63.1", + "@rollup/rollup-linux-riscv64-gnu": "4.63.1", + "@rollup/rollup-linux-riscv64-musl": "4.63.1", + "@rollup/rollup-linux-s390x-gnu": "4.63.1", + "@rollup/rollup-linux-x64-gnu": "4.63.1", + "@rollup/rollup-linux-x64-musl": "4.63.1", + "@rollup/rollup-openbsd-x64": "4.63.1", + "@rollup/rollup-openharmony-arm64": "4.63.1", + "@rollup/rollup-win32-arm64-msvc": "4.63.1", + "@rollup/rollup-win32-ia32-msvc": "4.63.1", + "@rollup/rollup-win32-x64-gnu": "4.63.1", + "@rollup/rollup-win32-x64-msvc": "4.63.1", "fsevents": "~2.3.2" } }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/serve-handler": { "version": "6.1.7", "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz", @@ -936,6 +1980,42 @@ "range-parser": "1.2.0" } }, + "node_modules/serve-handler/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -949,6 +2029,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -956,6 +2066,19 @@ "dev": true, "license": "0BSD" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", @@ -969,6 +2092,79 @@ "engines": { "node": ">=14.17" } + }, + "node_modules/typescript-eslint": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.69.0.tgz", + "integrity": "sha512-B3MltX0VqjUBNEe3b3sSuiRbfa6XrfHFtBiPamjT5AsW/dfq+y+bc0wyuS9DxAS1LyzCxRp2+rxzpLUvqM2BvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.69.0", + "@typescript-eslint/parser": "8.69.0", + "@typescript-eslint/typescript-estree": "8.69.0", + "@typescript-eslint/utils": "8.69.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 5627f4c5..7f56a38b 100644 --- a/package.json +++ b/package.json @@ -1,50 +1,62 @@ { - "name": "appwrite", - "homepage": "https://appwrite.io/support", - "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API", - "version": "26.2.0", - "license": "BSD-3-Clause", - "main": "dist/cjs/sdk.js", - "exports": { - ".": { - "import": "./dist/esm/sdk.js", - "require": "./dist/cjs/sdk.js", - "types": "./types/index.d.ts" + "name": "appwrite", + "homepage": "https://appwrite.io/support", + "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API", + "version": "27.0.0", + "license": "BSD-3-Clause", + "main": "dist/cjs/sdk.js", + "exports": { + ".": { + "import": "./dist/esm/sdk.js", + "require": "./dist/cjs/sdk.js", + "types": "./types/index.d.ts" + }, + "./package.json": "./package.json" }, - "./package.json": "./package.json" - }, - "module": "dist/esm/sdk.js", - "types": "types/index.d.ts", - "files": [ - "dist", - "types" - ], - "repository": { - "type": "git", - "url": "https://github.com/appwrite/sdk-for-web" - }, - "scripts": { - "build": "npm run build:types && npm run build:libs", - "build:types": "tsc --declaration --emitDeclarationOnly --outDir types", - "build:libs": "rollup -c" - }, - "engines": { - "node": ">=18.0.0" - }, - "dependencies": { - "json-bigint": "1.0.0" - }, - "devDependencies": { - "@rollup/plugin-commonjs": "29.0.3", - "@rollup/plugin-node-resolve": "16.0.3", - "@rollup/plugin-typescript": "12.3.0", - "@types/json-bigint": "1.0.4", - "playwright": "1.56.1", - "rollup": "4.62.2", - "serve-handler": "6.1.7", - "tslib": "2.8.1", - "typescript": "5.9.3" - }, - "jsdelivr": "dist/iife/sdk.js", - "unpkg": "dist/iife/sdk.js" + "module": "dist/esm/sdk.js", + "types": "types/index.d.ts", + "files": [ + "dist", + "types" + ], + "repository": { + "type": "git", + "url": "https://github.com/appwrite/sdk-for-web" + }, + "scripts": { + "build": "npm run build:types && npm run build:libs", + "build:types": "tsc --declaration --emitDeclarationOnly --outDir types", + "build:libs": "rollup -c", + "format": "prettier --write .", + "format:check": "prettier --check .", + "lint": "eslint .", + "lint:fix": "eslint --fix .", + "analyse": "tsc --noEmit" + }, + "engines": { + "node": ">=18.0.0" + }, + "dependencies": { + "json-bigint": "1.0.0" + }, + "devDependencies": { + "@eslint/js": "10.0.1", + "@rollup/plugin-commonjs": "29.0.3", + "@rollup/plugin-node-resolve": "16.0.3", + "@rollup/plugin-typescript": "12.3.0", + "@types/json-bigint": "1.0.4", + "eslint": "10.9.1", + "playwright": "1.56.1", + "prettier": "3.9.6", + "rollup": "4.63.1", + "serve-handler": "6.1.7", + "tslib": "2.8.1", + "typescript": "5.9.3", + "typescript-eslint": "8.69.0" + }, + "overrides": { + "brace-expansion": "5.0.9" + }, + "jsdelivr": "dist/iife/sdk.js", + "unpkg": "dist/iife/sdk.js" } diff --git a/rollup.config.mjs b/rollup.config.mjs index eabf435c..0d5864b6 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -1,44 +1,44 @@ -import { readFileSync } from "fs"; -const pkg = JSON.parse(readFileSync("./package.json", "utf8")); -import typescript from "@rollup/plugin-typescript"; -import resolve from "@rollup/plugin-node-resolve"; -import commonjs from "@rollup/plugin-commonjs"; +import { readFileSync } from 'fs'; +const pkg = JSON.parse(readFileSync('./package.json', 'utf8')); +import typescript from '@rollup/plugin-typescript'; +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; const external = Object.keys(pkg.dependencies ?? {}); export default [ { - input: "src/index.ts", + input: 'src/index.ts', external, - plugins: [typescript({ outDir: "dist" })], + plugins: [typescript({ outDir: 'dist' })], output: [ { - format: "cjs", + format: 'cjs', file: pkg.main, esModule: false, sourcemap: true, }, { - format: "es", + format: 'es', file: pkg.module, sourcemap: true, }, ], }, { - input: "src/index.ts", + input: 'src/index.ts', plugins: [ resolve({ browser: true }), commonjs(), - typescript({ outDir: "dist" }) + typescript({ outDir: 'dist' }), ], output: [ { - format: "iife", + format: 'iife', file: pkg.jsdelivr, - name: "Appwrite", + name: 'Appwrite', extend: true, }, ], - } + }, ]; diff --git a/src/channel.ts b/src/channel.ts index d4618a36..b4a55092 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -1,167 +1,201 @@ -interface Root {} -interface Database { _db: any } -interface Collection { _coll: any } -interface Document { _doc: any } -interface TablesDB { _tdb: any } -interface Table { _tbl: any } -interface Row { _row: any } -interface Bucket { _bkt: any } -interface File { _file: any } -interface Func { _fn: any } -interface Execution { _exec: any } -interface Team { _team: any } -interface Membership { _mem: any } -interface Presence { _presence: any } -interface Resolved { _res: any } +interface Database { + _db: any; +} +interface Collection { + _coll: any; +} +interface Document { + _doc: any; +} +interface TablesDB { + _tdb: any; +} +interface Table { + _tbl: any; +} +interface Row { + _row: any; +} +interface Bucket { + _bkt: any; +} +interface File { + _file: any; +} +interface Func { + _fn: any; +} +interface Execution { + _exec: any; +} +interface Team { + _team: any; +} +interface Membership { + _mem: any; +} +interface Presence { + _presence: any; +} +interface Resolved { + _res: any; +} type Actionable = Document | Row | File | Team | Membership | Presence; function normalize(id: string): string { - if (id === undefined || id === null) { - throw new Error("Channel ID is required"); - } - const trimmed = String(id).trim(); - if (trimmed === "") { - throw new Error("Channel ID is required"); - } - return trimmed; + if (id === undefined || id === null) { + throw new Error('Channel ID is required'); + } + const trimmed = String(id).trim(); + if (trimmed === '') { + throw new Error('Channel ID is required'); + } + return trimmed; } export class Channel { - declare _type: T; - - private constructor(private readonly segments: string[]) {} - - private next(segment: string, id?: string): Channel { - const segments = - id === undefined - ? [...this.segments, segment] - : [...this.segments, segment, normalize(id)]; - - return new Channel(segments) as any; - } - - private resolve(action: string): Channel { - return new Channel([...this.segments, action]) as any; - } - - toString(): string { - return this.segments.join("."); - } - - // --- DATABASE ROUTE --- - // Only available on Channel - collection(this: Channel, id: string): Channel { - return this.next("collections", id); - } - - // Only available on Channel - document(this: Channel, id?: string): Channel { - // Default: no document ID segment - return this.next("documents", id); - } - - // --- TABLESDB ROUTE --- - table(this: Channel, id: string): Channel { - return this.next
("tables", id); - } - - row(this: Channel
, id?: string): Channel { - // Default: no row ID segment - return this.next("rows", id); - } - - // --- BUCKET ROUTE --- - file(this: Channel, id?: string): Channel { - // Default: no file ID segment - return this.next("files", id); - } - - // --- TERMINAL ACTIONS --- - // Restricted to the Actionable union - create(this: Channel): Channel { - return this.resolve("create"); - } - - upsert(this: Channel): Channel { - return this.resolve("upsert"); - } - - update(this: Channel): Channel { - return this.resolve("update"); - } - - delete(this: Channel): Channel { - return this.resolve("delete"); - } - - // --- ROOT FACTORIES --- - static database(id: string) { - return new Channel(["databases", normalize(id)]); - } - - static execution(id: string) { - return new Channel(["executions", normalize(id)]); - } - - static tablesdb(id: string) { - return new Channel(["tablesdb", normalize(id)]); - } - - static bucket(id: string) { - return new Channel(["buckets", normalize(id)]); - } - - static function(id: string) { - return new Channel(["functions", normalize(id)]); - } - - static team(id: string) { - return new Channel(["teams", normalize(id)]); - } - - static membership(id: string) { - return new Channel(["memberships", normalize(id)]); - } - - static presence(id: string) { - return new Channel(["presences", normalize(id)]); - } - - static account(): string { - return "account"; - } - - // Global events - static documents(): string { - return "documents"; - } - - static rows(): string { - return "rows"; - } - - static files(): string { - return "files"; - } - - static executions(): string { - return "executions"; - } - - static teams(): string { - return "teams"; - } - - static memberships(): string { - return "memberships"; - } - - static presences(): string { - return "presences"; - } + declare _type: T; + + private constructor(private readonly segments: string[]) {} + + private next(segment: string, id?: string): Channel { + const segments = + id === undefined + ? [...this.segments, segment] + : [...this.segments, segment, normalize(id)]; + + return new Channel(segments) as any; + } + + private resolve(action: string): Channel { + return new Channel([...this.segments, action]) as any; + } + + toString(): string { + return this.segments.join('.'); + } + + // --- DATABASE ROUTE --- + // Only available on Channel + collection(this: Channel, id: string): Channel { + return this.next('collections', id); + } + + // Only available on Channel + document(this: Channel, id?: string): Channel { + // Default: no document ID segment + return this.next('documents', id); + } + + // --- TABLESDB ROUTE --- + table(this: Channel, id: string): Channel
{ + return this.next
('tables', id); + } + + row(this: Channel
, id?: string): Channel { + // Default: no row ID segment + return this.next('rows', id); + } + + // --- BUCKET ROUTE --- + file(this: Channel, id?: string): Channel { + // Default: no file ID segment + return this.next('files', id); + } + + // --- TERMINAL ACTIONS --- + // Restricted to the Actionable union + create(this: Channel): Channel { + return this.resolve('create'); + } + + upsert(this: Channel): Channel { + return this.resolve('upsert'); + } + + update(this: Channel): Channel { + return this.resolve('update'); + } + + delete(this: Channel): Channel { + return this.resolve('delete'); + } + + // --- ROOT FACTORIES --- + static database(id: string) { + return new Channel(['databases', normalize(id)]); + } + + static execution(id: string) { + return new Channel(['executions', normalize(id)]); + } + + static tablesdb(id: string) { + return new Channel(['tablesdb', normalize(id)]); + } + + static bucket(id: string) { + return new Channel(['buckets', normalize(id)]); + } + + static function(id: string) { + return new Channel(['functions', normalize(id)]); + } + + static team(id: string) { + return new Channel(['teams', normalize(id)]); + } + + static membership(id: string) { + return new Channel(['memberships', normalize(id)]); + } + + static presence(id: string) { + return new Channel(['presences', normalize(id)]); + } + + static account(): string { + return 'account'; + } + + // Global events + static documents(): string { + return 'documents'; + } + + static rows(): string { + return 'rows'; + } + + static files(): string { + return 'files'; + } + + static executions(): string { + return 'executions'; + } + + static teams(): string { + return 'teams'; + } + + static memberships(): string { + return 'memberships'; + } + + static presences(): string { + return 'presences'; + } } // Export types for backward compatibility with realtime -export type ActionableChannel = Channel | Channel | Channel | Channel | Channel | Channel | Channel; +export type ActionableChannel = + | Channel + | Channel + | Channel + | Channel + | Channel + | Channel + | Channel; export type ResolvedChannel = Channel; diff --git a/src/client.ts b/src/client.ts index 8b910354..20382a6c 100644 --- a/src/client.ts +++ b/src/client.ts @@ -12,12 +12,14 @@ const MAX_INT64 = BigInt('9223372036854775807'); const MIN_INT64 = BigInt('-9223372036854775808'); function isBigNumber(value: any): boolean { - return value !== null - && typeof value === 'object' - && value._isBigNumber === true - && typeof value.isInteger === 'function' - && typeof value.toFixed === 'function' - && typeof value.toNumber === 'function'; + return ( + value !== null && + typeof value === 'object' && + value._isBigNumber === true && + typeof value.isInteger === 'function' && + typeof value.toFixed === 'function' && + typeof value.toNumber === 'function' + ); } function reviver(_key: string, value: any): any { @@ -40,7 +42,7 @@ function reviver(_key: string, value: any): any { export const JSONbig = { parse: (text: string) => JSONbigParser.parse(text, reviver), - stringify: JSONbigSerializer.stringify + stringify: JSONbigSerializer.stringify, }; /** @@ -48,14 +50,14 @@ export const JSONbig = { */ type Payload = { [key: string]: any; -} +}; /** * Headers type representing a key-value pair with string keys and string values. */ type Headers = { [key: string]: string; -} +}; /** * Realtime response structure with different types. @@ -69,8 +71,13 @@ type RealtimeResponse = { /** * Data associated with the response based on the response type. */ - data: RealtimeResponseAuthenticated | RealtimeResponseConnected | RealtimeResponseError | RealtimeResponseEvent | undefined; -} + data: + | RealtimeResponseAuthenticated + | RealtimeResponseConnected + | RealtimeResponseError + | RealtimeResponseEvent + | undefined; +}; /** * Realtime request structure for authentication. @@ -85,18 +92,18 @@ type RealtimeRequest = { * Data required for authentication. */ data: RealtimeRequestAuthenticate | RealtimeRequestSubscribe[]; -} +}; type RealtimeRequestSubscribe = { subscriptionId: string; channels: string[]; queries: string[]; -} +}; /** * Realtime event response structure with generic payload type. */ -type RealtimeResponseEvent = { +type RealtimeResponseEvent = { /** * List of event names associated with the response. */ @@ -121,7 +128,7 @@ type RealtimeResponseEvent = { * Subscription IDs this event matches (from backend, optional). */ subscriptions?: string[]; -} +}; /** * Realtime response structure for errors. @@ -136,7 +143,7 @@ type RealtimeResponseError = { * Error message describing the encountered error. */ message: string; -} +}; /** * Realtime response structure for a successful connection. @@ -151,7 +158,7 @@ type RealtimeResponseConnected = { * User object representing the connected user (optional). */ user?: object; -} +}; /** * Realtime response structure for authenticated connections. @@ -171,7 +178,7 @@ type RealtimeResponseAuthenticated = { * User object representing the authenticated user. */ user: object; -} +}; /** * Realtime request structure for authentication. @@ -181,7 +188,7 @@ type RealtimeRequestAuthenticate = { * Session identifier for authentication. */ session: string; -} +}; type TimeoutHandle = ReturnType | number; @@ -201,7 +208,7 @@ type Realtime = { /** * Heartbeat interval for the realtime connection. - */ + */ heartbeat?: TimeoutHandle; /** @@ -222,11 +229,14 @@ type Realtime = { /** * Map of subscriptions keyed by client-generated subscriptionId. */ - subscriptions: Map) => void - }>; + subscriptions: Map< + string, + { + channels: string[]; + queries: string[]; + callback: (payload: RealtimeResponseEvent) => void; + } + >; /** * Pending subscribe rows keyed by subscriptionId. Flushed and cleared on each send. @@ -271,7 +281,7 @@ type Realtime = { * @param {MessageEvent} event - Event containing the received message. */ onMessage: (event: MessageEvent) => void; -} +}; /** * Type representing upload progress information. @@ -301,7 +311,7 @@ type UploadProgress = { * Number of chunks that have been successfully uploaded. */ chunksUploaded: number; -} +}; /** * Exception thrown by the package @@ -331,7 +341,12 @@ class AppwriteException extends Error { * @param {string} type - The error type. Default is an empty string. * @param {string} response - The response string. Default is an empty string. */ - constructor(message: string, code: number = 0, type: string = '', response: string = '') { + constructor( + message: string, + code: number = 0, + type: string = '', + response: string = '', + ) { super(message); this.name = 'AppwriteException'; this.message = message; @@ -384,8 +399,8 @@ class Client { 'x-sdk-name': 'Web', 'x-sdk-platform': 'client', 'x-sdk-language': 'web', - 'x-sdk-version': '26.2.0', - 'X-Appwrite-Response-Format': '1.9.5', + 'x-sdk-version': '27.0.0', + 'X-Appwrite-Response-Format': '2.0.0', }; /** @@ -414,12 +429,17 @@ class Client { throw new AppwriteException('Endpoint must be a valid string'); } - if (!endpoint.startsWith('http://') && !endpoint.startsWith('https://')) { + if ( + !endpoint.startsWith('http://') && + !endpoint.startsWith('https://') + ) { throw new AppwriteException('Invalid endpoint URL: ' + endpoint); } this.config.endpoint = endpoint; - this.config.endpointRealtime = endpoint.replace('https://', 'wss://').replace('http://', 'ws://'); + this.config.endpointRealtime = endpoint + .replace('https://', 'wss://') + .replace('http://', 'ws://'); return this; } @@ -436,8 +456,13 @@ class Client { throw new AppwriteException('Endpoint must be a valid string'); } - if (!endpointRealtime.startsWith('ws://') && !endpointRealtime.startsWith('wss://')) { - throw new AppwriteException('Invalid realtime endpoint URL: ' + endpointRealtime); + if ( + !endpointRealtime.startsWith('ws://') && + !endpointRealtime.startsWith('wss://') + ) { + throw new AppwriteException( + 'Invalid realtime endpoint URL: ' + endpointRealtime, + ); } this.config.endpointRealtime = endpointRealtime; @@ -617,9 +642,11 @@ class Client { } this.realtime.heartbeat = window?.setInterval(() => { - this.realtime.socket?.send(JSONbig.stringify({ - type: 'ping' - })); + this.realtime.socket?.send( + JSONbig.stringify({ + type: 'ping', + }), + ); }, 20_000); }, createSocket: () => { @@ -629,15 +656,19 @@ class Client { return; } - const encodedProject = encodeURIComponent((this.config.project as string) ?? ''); + const encodedProject = encodeURIComponent( + (this.config.project as string) ?? '', + ); // URL carries only the project; channels/queries are sent via subscribe message. let queryParams = 'project=' + encodedProject; if (this.config.jwt) { - queryParams += '&jwt=' + encodeURIComponent(this.config.jwt as string); + queryParams += + '&jwt=' + encodeURIComponent(this.config.jwt as string); } - const url = this.config.endpointRealtime + '/realtime?' + queryParams; + const url = + this.config.endpointRealtime + '/realtime?' + queryParams; if ( url !== this.realtime.url || // Check if URL is present @@ -654,37 +685,46 @@ class Client { this.realtime.url = url; this.realtime.socket = new WebSocket(url); - this.realtime.socket.addEventListener('message', this.realtime.onMessage); - this.realtime.socket.addEventListener('open', _event => { + this.realtime.socket.addEventListener( + 'message', + this.realtime.onMessage, + ); + this.realtime.socket.addEventListener('open', (_event) => { this.realtime.reconnectAttempts = 0; this.realtime.createHeartbeat(); }); - this.realtime.socket.addEventListener('close', event => { + this.realtime.socket.addEventListener('close', (event) => { if ( !this.realtime.reconnect || - ( - this.realtime?.lastMessage?.type === 'error' && // Check if last message was of type error - (this.realtime?.lastMessage.data).code === 1008 // Check for policy violation 1008 - ) + (this.realtime?.lastMessage?.type === 'error' && // Check if last message was of type error + (( + this.realtime?.lastMessage.data + )).code === 1008) // Check for policy violation 1008 ) { this.realtime.reconnect = true; return; } const timeout = this.realtime.getTimeout(); - console.error(`Realtime got disconnected. Reconnect will be attempted in ${timeout / 1000} seconds.`, event.reason); + console.error( + `Realtime got disconnected. Reconnect will be attempted in ${timeout / 1000} seconds.`, + event.reason, + ); setTimeout(() => { this.realtime.reconnectAttempts++; this.realtime.createSocket(); }, timeout); - }) + }); } else if (this.realtime.socket?.readyState === WebSocket.OPEN) { this.realtime.sendPendingSubscribes(); } }, sendPendingSubscribes: () => { - if (!this.realtime.socket || this.realtime.socket.readyState !== WebSocket.OPEN) { + if ( + !this.realtime.socket || + this.realtime.socket.readyState !== WebSocket.OPEN + ) { return; } @@ -695,10 +735,12 @@ class Client { const rows = Array.from(this.realtime.pendingSubscribes.values()); this.realtime.pendingSubscribes.clear(); - this.realtime.socket.send(JSONbig.stringify({ - type: 'subscribe', - data: rows - })); + this.realtime.socket.send( + JSONbig.stringify({ + type: 'subscribe', + data: rows, + }), + ); }, onMessage: (event) => { try { @@ -706,29 +748,42 @@ class Client { this.realtime.lastMessage = message; switch (message.type) { case 'connected': { - const messageData = message.data; + const messageData = ( + message.data + ); let session = this.config.session; if (!session) { - const cookie = JSONbig.parse(window.localStorage.getItem('cookieFallback') ?? '{}'); - session = cookie?.[`a_session_${this.config.project}`]; + const cookie = JSONbig.parse( + window.localStorage.getItem('cookieFallback') ?? + '{}', + ); + session = + cookie?.[`a_session_${this.config.project}`]; } if (session && !messageData?.user) { - this.realtime.socket?.send(JSONbig.stringify({ - type: 'authentication', - data: { - session - } - })); + this.realtime.socket?.send( + JSONbig.stringify({ + type: 'authentication', + data: { + session, + }, + }), + ); } - this.realtime.subscriptions.forEach((sub, subscriptionId) => { - this.realtime.pendingSubscribes.set(subscriptionId, { - subscriptionId, - channels: sub.channels, - queries: sub.queries ?? [] - }); - }); + this.realtime.subscriptions.forEach( + (sub, subscriptionId) => { + this.realtime.pendingSubscribes.set( + subscriptionId, + { + subscriptionId, + channels: sub.channels, + queries: sub.queries ?? [], + }, + ); + }, + ); this.realtime.sendPendingSubscribes(); break; } @@ -738,25 +793,44 @@ class Client { // the SDK needs to reconcile. break; case 'event': { - const data = >message.data; + const data = >( + message.data + ); if (!data?.channels) break; const eventSubIds = data.subscriptions; if (eventSubIds && eventSubIds.length > 0) { for (const subscriptionId of eventSubIds) { - const subscription = this.realtime.subscriptions.get(subscriptionId); + const subscription = + this.realtime.subscriptions.get( + subscriptionId, + ); if (subscription) { - setTimeout(() => subscription.callback(data)); + setTimeout(() => + subscription.callback(data), + ); } } } else { - const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel)); + const isSubscribed = data.channels.some((channel) => + this.realtime.channels.has(channel), + ); if (!isSubscribed) break; - this.realtime.subscriptions.forEach(subscription => { - if (data.channels.some(channel => subscription.channels.includes(channel))) { - setTimeout(() => subscription.callback(data)); - } - }); + this.realtime.subscriptions.forEach( + (subscription) => { + if ( + data.channels.some((channel) => + subscription.channels.includes( + channel, + ), + ) + ) { + setTimeout(() => + subscription.callback(data), + ); + } + }, + ); } break; } @@ -770,8 +844,8 @@ class Client { } catch (e) { console.error(e); } - } - } + }, + }; /** * Subscribes to Appwrite events and passes you the payload in realtime. @@ -798,7 +872,7 @@ class Client { * - teams.[ID] * - memberships * - memberships.[ID] - * + * * You can also use Channel builders: * - Channel.database('db').collection('col').document('doc').create() * - Channel.bucket('bucket').file('file').update() @@ -808,14 +882,20 @@ class Client { * @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update. * @returns {() => void} Unsubscribes from events. */ - subscribe( - channels: string | string[] | Channel | ActionableChannel | ResolvedChannel | (Channel | ActionableChannel | ResolvedChannel)[], + subscribe( + channels: + | string + | string[] + | Channel + | ActionableChannel + | ResolvedChannel + | (Channel | ActionableChannel | ResolvedChannel)[], callback: (payload: RealtimeResponseEvent) => void, - queries: (string | Query)[] = [] + queries: (string | Query)[] = [], ): () => void { const channelArray = Array.isArray(channels) ? channels : [channels]; // Convert Channel instances to strings - const channelStrings = channelArray.map(ch => { + const channelStrings = channelArray.map((ch) => { if (typeof ch === 'string') { return ch; } @@ -826,9 +906,13 @@ class Client { // Fallback to generic string conversion return String(ch); }); - channelStrings.forEach(channel => this.realtime.channels.add(channel)); + channelStrings.forEach((channel) => + this.realtime.channels.add(channel), + ); - const queryStrings = (queries ?? []).map(q => typeof q === 'string' ? q : q.toString()); + const queryStrings = (queries ?? []).map((q) => + typeof q === 'string' ? q : q.toString(), + ); let subscriptionId = ''; const attempts = this.realtime.subscriptions.size + 1; @@ -840,17 +924,19 @@ class Client { } } if (subscriptionId === '') { - throw new AppwriteException('Failed to generate unique subscription id'); + throw new AppwriteException( + 'Failed to generate unique subscription id', + ); } this.realtime.subscriptions.set(subscriptionId, { channels: channelStrings, queries: queryStrings, - callback + callback, }); this.realtime.pendingSubscribes.set(subscriptionId, { subscriptionId, channels: channelStrings, - queries: queryStrings + queries: queryStrings, }); this.realtime.connect(); @@ -859,31 +945,37 @@ class Client { this.realtime.subscriptions.delete(subscriptionId); this.realtime.pendingSubscribes.delete(subscriptionId); const stillUsed = new Set(); - this.realtime.subscriptions.forEach(sub => { - sub.channels.forEach(channel => stillUsed.add(channel)); + this.realtime.subscriptions.forEach((sub) => { + sub.channels.forEach((channel) => stillUsed.add(channel)); }); - this.realtime.channels.forEach(channel => { + this.realtime.channels.forEach((channel) => { if (!stillUsed.has(channel)) { this.realtime.channels.delete(channel); } }); this.realtime.connect(); - } + }; } - prepareRequest(method: string, url: URL, headers: Headers = {}, params: Payload = {}): { uri: string, options: RequestInit } { + prepareRequest( + method: string, + url: URL, + headers: Headers = {}, + params: Payload = {}, + ): { uri: string; options: RequestInit } { method = method.toUpperCase(); headers = Object.assign({}, this.headers, headers); if (typeof window !== 'undefined' && window.localStorage) { - const cookieFallback = window.localStorage.getItem('cookieFallback'); + const cookieFallback = + window.localStorage.getItem('cookieFallback'); if (cookieFallback) { headers['X-Fallback-Cookies'] = cookieFallback; } } - let options: RequestInit = { + const options: RequestInit = { method, headers, }; @@ -902,7 +994,7 @@ class Client { options.body = JSONbig.stringify(params); break; - case 'multipart/form-data': + case 'multipart/form-data': { const formData = new FormData(); for (const [key, value] of Object.entries(params)) { @@ -920,14 +1012,24 @@ class Client { options.body = formData; delete headers['content-type']; break; + } } } return { uri: url.toString(), options }; } - async chunkedUpload(method: string, url: URL, headers: Headers = {}, originalPayload: Payload = {}, onProgress: (progress: UploadProgress) => void) { - const [fileParam, file] = Object.entries(originalPayload).find(([_, value]) => value instanceof File) ?? []; + async chunkedUpload( + method: string, + url: URL, + headers: Headers = {}, + originalPayload: Payload = {}, + onProgress: (progress: UploadProgress) => void, + ) { + const [fileParam, file] = + Object.entries(originalPayload).find( + ([_, value]) => value instanceof File, + ) ?? []; if (!file || !fileParam) { throw new Error('File not found in payload'); @@ -941,12 +1043,20 @@ class Client { // Upload first chunk alone to get the upload ID const firstChunkEnd = Math.min(Client.CHUNK_SIZE, file.size); - const firstChunkHeaders = { ...headers, 'content-range': `bytes 0-${firstChunkEnd - 1}/${file.size}` }; + const firstChunkHeaders = { + ...headers, + 'content-range': `bytes 0-${firstChunkEnd - 1}/${file.size}`, + }; const firstChunk = file.slice(0, firstChunkEnd); const firstPayload = { ...originalPayload }; firstPayload[fileParam] = new File([firstChunk], file.name); - let response = await this.call(method, url, firstChunkHeaders, firstPayload); + const response = await this.call( + method, + url, + firstChunkHeaders, + firstPayload, + ); const uploadId = response?.$id; if (onProgress && typeof onProgress === 'function') { @@ -955,7 +1065,7 @@ class Client { progress: Math.round((firstChunkEnd / file.size) * 100), sizeUploaded: firstChunkEnd, chunksTotal: totalChunks, - chunksUploaded: 1 + chunksUploaded: 1, }); } @@ -982,29 +1092,39 @@ class Client { const isUploadComplete = (chunkResponse: any) => { const chunksUploaded = chunkResponse?.chunksUploaded; const chunksTotal = chunkResponse?.chunksTotal ?? totalChunks; - return typeof chunksUploaded === 'number' && typeof chunksTotal === 'number' && chunksUploaded >= chunksTotal; + return ( + typeof chunksUploaded === 'number' && + typeof chunksTotal === 'number' && + chunksUploaded >= chunksTotal + ); }; - const uploadChunk = async (chunk: typeof chunks[0]) => { + const uploadChunk = async (chunk: (typeof chunks)[0]) => { const chunkHeaders = { ...headers }; if (uploadId) { chunkHeaders['x-appwrite-id'] = uploadId; } - chunkHeaders['content-range'] = `bytes ${chunk.start}-${chunk.end - 1}/${file.size}`; - + chunkHeaders['content-range'] = + `bytes ${chunk.start}-${chunk.end - 1}/${file.size}`; + const chunkBlob = file.slice(chunk.start, chunk.end); const chunkPayload = { ...originalPayload }; chunkPayload[fileParam] = new File([chunkBlob], file.name); - const chunkResponse = await this.call(method, url, chunkHeaders, chunkPayload); + const chunkResponse = await this.call( + method, + url, + chunkHeaders, + chunkPayload, + ); if (rejected) { return chunkResponse; } - + completedCount++; - uploadedBytes += (chunk.end - chunk.start); - + uploadedBytes += chunk.end - chunk.start; + lastResponse = chunkResponse; if (isUploadComplete(chunkResponse)) { finalResponse = chunkResponse; @@ -1016,7 +1136,7 @@ class Client { progress: Math.round((uploadedBytes / file.size) * 100), sizeUploaded: uploadedBytes, chunksTotal: totalChunks, - chunksUploaded: completedCount + chunksUploaded: completedCount, }); } @@ -1064,12 +1184,23 @@ class Client { async ping(): Promise { return this.call('GET', new URL(this.config.endpoint + '/ping'), { 'X-Appwrite-Project': this.config.project, - 'accept': 'application/json', + accept: 'application/json', }); } - async call(method: string, url: URL, headers: Headers = {}, params: Payload = {}, responseType = 'json'): Promise { - const { uri, options } = this.prepareRequest(method, url, headers, params); + async call( + method: string, + url: URL, + headers: Headers = {}, + params: Payload = {}, + responseType = 'json', + ): Promise { + const { uri, options } = this.prepareRequest( + method, + url, + headers, + params, + ); let data: any = null; @@ -1080,40 +1211,62 @@ class Client { throw new AppwriteException( `Invalid Origin. Register your new client (${window.location.host}) as a new Web platform on your project console dashboard`, 403, - "forbidden", - "" + 'forbidden', + '', ); } const warnings = response.headers.get('x-appwrite-warning'); if (warnings) { - warnings.split(';').forEach((warning: string) => console.warn('Warning: ' + warning)); + warnings + .split(';') + .forEach((warning: string) => + console.warn('Warning: ' + warning), + ); } - if (response.headers.get('content-type')?.includes('application/json')) { + if ( + response.headers.get('content-type')?.includes('application/json') + ) { data = JSONbig.parse(await response.text()); } else if (responseType === 'arrayBuffer') { data = await response.arrayBuffer(); } else { data = { - message: await response.text() + message: await response.text(), }; } if (400 <= response.status) { - let responseText = ''; - if (response.headers.get('content-type')?.includes('application/json') || responseType === 'arrayBuffer') { + let responseText: string; + if ( + response.headers + .get('content-type') + ?.includes('application/json') || + responseType === 'arrayBuffer' + ) { responseText = JSONbig.stringify(data); } else { responseText = data?.message; } - throw new AppwriteException(data?.message ?? responseText, response.status, data?.type, responseText); + throw new AppwriteException( + data?.message ?? responseText, + response.status, + data?.type, + responseText, + ); } const cookieFallback = response.headers.get('X-Fallback-Cookies'); - if (typeof window !== 'undefined' && window.localStorage && cookieFallback) { - window.console.warn('Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.'); + if ( + typeof window !== 'undefined' && + window.localStorage && + cookieFallback + ) { + window.console.warn( + 'Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.', + ); window.localStorage.setItem('cookieFallback', cookieFallback); } @@ -1133,7 +1286,7 @@ class Client { let output: Payload = {}; for (const [key, value] of Object.entries(data)) { - let finalKey = prefix ? prefix + '[' + key +']' : key; + const finalKey = prefix ? prefix + '[' + key + ']' : key; if (Array.isArray(value)) { output = { ...output, ...Client.flatten(value, finalKey) }; } else { diff --git a/src/enums/authentication-factor.ts b/src/enums/authentication-factor.ts index 928c4074..d16c3fe5 100644 --- a/src/enums/authentication-factor.ts +++ b/src/enums/authentication-factor.ts @@ -3,4 +3,5 @@ export enum AuthenticationFactor { Phone = 'phone', Totp = 'totp', Recoverycode = 'recoverycode', -} \ No newline at end of file + Custom = 'custom', +} diff --git a/src/enums/authenticator-type.ts b/src/enums/authenticator-type.ts index 34db0cca..0c918278 100644 --- a/src/enums/authenticator-type.ts +++ b/src/enums/authenticator-type.ts @@ -1,3 +1,3 @@ export enum AuthenticatorType { Totp = 'totp', -} \ No newline at end of file +} diff --git a/src/enums/browser-permission.ts b/src/enums/browser-permission.ts index 6e2c4cda..a670a6e0 100644 --- a/src/enums/browser-permission.ts +++ b/src/enums/browser-permission.ts @@ -19,4 +19,4 @@ export enum BrowserPermission { Screenwakelock = 'screen-wake-lock', Webshare = 'web-share', Xrspatialtracking = 'xr-spatial-tracking', -} \ No newline at end of file +} diff --git a/src/enums/browser-theme.ts b/src/enums/browser-theme.ts index 9f8c382a..acb8d578 100644 --- a/src/enums/browser-theme.ts +++ b/src/enums/browser-theme.ts @@ -1,4 +1,4 @@ export enum BrowserTheme { Light = 'light', Dark = 'dark', -} \ No newline at end of file +} diff --git a/src/enums/browser.ts b/src/enums/browser.ts index cec52fb6..78762163 100644 --- a/src/enums/browser.ts +++ b/src/enums/browser.ts @@ -13,4 +13,4 @@ export enum Browser { OperaMini = 'om', Opera = 'op', OperaNext = 'on', -} \ No newline at end of file +} diff --git a/src/enums/credit-card.ts b/src/enums/credit-card.ts index e6ce2429..946e4931 100644 --- a/src/enums/credit-card.ts +++ b/src/enums/credit-card.ts @@ -16,4 +16,4 @@ export enum CreditCard { MIR = 'mir', Maestro = 'maestro', Rupay = 'rupay', -} \ No newline at end of file +} diff --git a/src/enums/execution-method.ts b/src/enums/execution-method.ts index 39d4c1e8..a01b6b1a 100644 --- a/src/enums/execution-method.ts +++ b/src/enums/execution-method.ts @@ -6,4 +6,4 @@ export enum ExecutionMethod { DELETE = 'DELETE', OPTIONS = 'OPTIONS', HEAD = 'HEAD', -} \ No newline at end of file +} diff --git a/src/enums/execution-resource-type.ts b/src/enums/execution-resource-type.ts new file mode 100644 index 00000000..f2773e86 --- /dev/null +++ b/src/enums/execution-resource-type.ts @@ -0,0 +1,4 @@ +export enum ExecutionResourceType { + Functions = 'functions', + Sites = 'sites', +} diff --git a/src/enums/execution-status.ts b/src/enums/execution-status.ts index 992d987d..81bd3955 100644 --- a/src/enums/execution-status.ts +++ b/src/enums/execution-status.ts @@ -4,4 +4,4 @@ export enum ExecutionStatus { Completed = 'completed', Failed = 'failed', Scheduled = 'scheduled', -} \ No newline at end of file +} diff --git a/src/enums/execution-trigger.ts b/src/enums/execution-trigger.ts index 1829d514..84fa8f60 100644 --- a/src/enums/execution-trigger.ts +++ b/src/enums/execution-trigger.ts @@ -2,4 +2,4 @@ export enum ExecutionTrigger { Http = 'http', Schedule = 'schedule', Event = 'event', -} \ No newline at end of file +} diff --git a/src/enums/flag.ts b/src/enums/flag.ts index 7e1d8781..ab49b648 100644 --- a/src/enums/flag.ts +++ b/src/enums/flag.ts @@ -194,4 +194,4 @@ export enum Flag { SouthAfrica = 'za', Zambia = 'zm', Zimbabwe = 'zw', -} \ No newline at end of file +} diff --git a/src/enums/image-format.ts b/src/enums/image-format.ts index 758fad74..4c210ffd 100644 --- a/src/enums/image-format.ts +++ b/src/enums/image-format.ts @@ -6,4 +6,4 @@ export enum ImageFormat { Heic = 'heic', Avif = 'avif', Gif = 'gif', -} \ No newline at end of file +} diff --git a/src/enums/image-gravity.ts b/src/enums/image-gravity.ts index 815095dd..a115f3a2 100644 --- a/src/enums/image-gravity.ts +++ b/src/enums/image-gravity.ts @@ -8,4 +8,4 @@ export enum ImageGravity { Bottomleft = 'bottom-left', Bottom = 'bottom', Bottomright = 'bottom-right', -} \ No newline at end of file +} diff --git a/src/enums/o-auth-provider.ts b/src/enums/o-auth-provider.ts index e7136d69..2d838dd4 100644 --- a/src/enums/o-auth-provider.ts +++ b/src/enums/o-auth-provider.ts @@ -8,6 +8,7 @@ export enum OAuthProvider { Bitbucket = 'bitbucket', Bitly = 'bitly', Box = 'box', + Cloudflare = 'cloudflare', Dailymotion = 'dailymotion', Discord = 'discord', Disqus = 'disqus', @@ -19,6 +20,7 @@ export enum OAuthProvider { Github = 'github', Gitlab = 'gitlab', Google = 'google', + Huggingface = 'huggingface', Keycloak = 'keycloak', Kick = 'kick', Linkedin = 'linkedin', @@ -29,6 +31,7 @@ export enum OAuthProvider { Paypal = 'paypal', PaypalSandbox = 'paypalSandbox', Podio = 'podio', + Resend = 'resend', Salesforce = 'salesforce', Slack = 'slack', Spotify = 'spotify', @@ -43,4 +46,4 @@ export enum OAuthProvider { Yandex = 'yandex', Zoho = 'zoho', Zoom = 'zoom', -} \ No newline at end of file +} diff --git a/src/enums/timezone.ts b/src/enums/timezone.ts index 207298a8..24c08db9 100644 --- a/src/enums/timezone.ts +++ b/src/enums/timezone.ts @@ -418,4 +418,4 @@ export enum Timezone { PacificWake = 'pacific/wake', PacificWallis = 'pacific/wallis', Utc = 'utc', -} \ No newline at end of file +} diff --git a/src/id.ts b/src/id.ts index 33495cc8..d9ebe835 100644 --- a/src/id.ts +++ b/src/id.ts @@ -14,7 +14,8 @@ export class ID { const msec = now.getMilliseconds(); // Convert to hexadecimal - const hexTimestamp = sec.toString(16) + msec.toString(16).padStart(5, '0'); + const hexTimestamp = + sec.toString(16) + msec.toString(16).padStart(5, '0'); return hexTimestamp; } @@ -25,12 +26,12 @@ export class ID { * @returns {string} */ public static custom(id: string): string { - return id + return id; } /** * Have Appwrite generate a unique ID for you. - * + * * @param {number} padding. Default is 7. * @returns {string} */ diff --git a/src/index.ts b/src/index.ts index ab6c1550..8956bf18 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,24 +1,34 @@ /** * Appwrite Web SDK * - * This SDK is compatible with Appwrite server version 1.9.x. - * For older versions, please check - * [previous releases](https://github.com/appwrite/sdk-for-web/releases). + * This SDK targets Appwrite server version 2.0.x as shipped on Appwrite Cloud. + * Self-hosted releases can lag behind Cloud — if you run an older self-hosted + * build, use a matching older SDK from + * [previous releases](https://github.com/appwrite/sdk-for-web/releases) + * when APIs differ. */ export { Client, Query, AppwriteException } from './client'; export { Account } from './services/account'; export { Avatars } from './services/avatars'; export { Databases } from './services/databases'; +export { DocumentsDB } from './services/documents-db'; export { Functions } from './services/functions'; export { Graphql } from './services/graphql'; export { Locale } from './services/locale'; export { Messaging } from './services/messaging'; +export { Organization } from './services/organization'; export { Presences } from './services/presences'; export { Storage } from './services/storage'; export { TablesDB } from './services/tables-db'; export { Teams } from './services/teams'; +export { VectorsDB } from './services/vectors-db'; export { Realtime } from './services/realtime'; -export type { Models, Payload, RealtimeResponseEvent, UploadProgress } from './client'; +export type { + Models, + Payload, + RealtimeResponseEvent, + UploadProgress, +} from './client'; export type { RealtimeSubscription } from './services/realtime'; export type { QueryTypes, QueryTypesList } from './query'; export { Permission } from './permission'; @@ -38,5 +48,6 @@ export { BrowserPermission } from './enums/browser-permission'; export { ImageFormat } from './enums/image-format'; export { ExecutionMethod } from './enums/execution-method'; export { ImageGravity } from './enums/image-gravity'; +export { ExecutionResourceType } from './enums/execution-resource-type'; export { ExecutionTrigger } from './enums/execution-trigger'; export { ExecutionStatus } from './enums/execution-status'; diff --git a/src/models.ts b/src/models.ts index 713eb779..0bdf24d9 100644 --- a/src/models.ts +++ b/src/models.ts @@ -1,11 +1,11 @@ -import { ExecutionTrigger } from "./enums/execution-trigger" -import { ExecutionStatus } from "./enums/execution-status" +import { ExecutionResourceType } from './enums/execution-resource-type'; +import { ExecutionTrigger } from './enums/execution-trigger'; +import { ExecutionStatus } from './enums/execution-status'; /** * Appwrite Models */ export namespace Models { - declare const __default: unique symbol; /** @@ -20,12 +20,14 @@ export namespace Models { * List of rows. */ rows: Row[]; - } + }; /** * Documents List */ - export type DocumentList = { + export type DocumentList< + Document extends Models.Document = Models.DefaultDocument, + > = { /** * Total number of documents that matched your query. */ @@ -34,7 +36,7 @@ export namespace Models { * List of documents. */ documents: Document[]; - } + }; /** * Presences List @@ -48,7 +50,7 @@ export namespace Models { * List of presences. */ presences: Presence[]; - } + }; /** * Sessions List @@ -62,7 +64,7 @@ export namespace Models { * List of sessions. */ sessions: Session[]; - } + }; /** * Identities List @@ -76,7 +78,7 @@ export namespace Models { * List of identities. */ identities: Identity[]; - } + }; /** * Logs List @@ -90,7 +92,7 @@ export namespace Models { * List of logs. */ logs: Log[]; - } + }; /** * Files List @@ -104,12 +106,14 @@ export namespace Models { * List of files. */ files: File[]; - } + }; /** * Teams List */ - export type TeamList = { + export type TeamList< + Preferences extends Models.Preferences = Models.DefaultPreferences, + > = { /** * Total number of teams that matched your query. */ @@ -118,7 +122,7 @@ export namespace Models { * List of teams. */ teams: Team[]; - } + }; /** * Memberships List @@ -132,7 +136,7 @@ export namespace Models { * List of memberships. */ memberships: Membership[]; - } + }; /** * Executions List @@ -146,7 +150,7 @@ export namespace Models { * List of executions. */ executions: Execution[]; - } + }; /** * Countries List @@ -160,7 +164,7 @@ export namespace Models { * List of countries. */ countries: Country[]; - } + }; /** * Continents List @@ -174,7 +178,7 @@ export namespace Models { * List of continents. */ continents: Continent[]; - } + }; /** * Languages List @@ -188,7 +192,7 @@ export namespace Models { * List of languages. */ languages: Language[]; - } + }; /** * Currencies List @@ -202,7 +206,7 @@ export namespace Models { * List of currencies. */ currencies: Currency[]; - } + }; /** * Phones List @@ -216,7 +220,7 @@ export namespace Models { * List of phones. */ phones: Phone[]; - } + }; /** * Locale codes list @@ -230,7 +234,7 @@ export namespace Models { * List of localeCodes. */ localeCodes: LocaleCode[]; - } + }; /** * Transaction List @@ -244,7 +248,7 @@ export namespace Models { * List of transactions. */ transactions: Transaction[]; - } + }; /** * Row @@ -278,7 +282,7 @@ export namespace Models { * Row permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; - } + }; export type DefaultRow = Row & { [key: string]: any; @@ -317,7 +321,7 @@ export namespace Models { * Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; - } + }; export type DefaultDocument = Document & { [key: string]: any; @@ -364,7 +368,7 @@ export namespace Models { * Presence metadata. */ metadata?: object; - } + }; /** * Log @@ -458,12 +462,14 @@ export namespace Models { * Country name. */ countryName: string; - } + }; /** * User */ - export type User = { + export type User< + Preferences extends Models.Preferences = Models.DefaultPreferences, + > = { /** * User ID. */ @@ -568,7 +574,7 @@ export namespace Models { * ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data. */ impersonatorUserId?: string; - } + }; /** * AlgoMD5 @@ -578,7 +584,7 @@ export namespace Models { * Algo type. */ type: string; - } + }; /** * AlgoSHA @@ -588,7 +594,7 @@ export namespace Models { * Algo type. */ type: string; - } + }; /** * AlgoPHPass @@ -598,7 +604,7 @@ export namespace Models { * Algo type. */ type: string; - } + }; /** * AlgoBcrypt @@ -608,7 +614,7 @@ export namespace Models { * Algo type. */ type: string; - } + }; /** * AlgoScrypt @@ -634,7 +640,7 @@ export namespace Models { * Length used to compute hash. */ length: number; - } + }; /** * AlgoScryptModified @@ -656,7 +662,7 @@ export namespace Models { * Key used to compute hash. */ signerKey: string; - } + }; /** * AlgoArgon2 @@ -678,13 +684,12 @@ export namespace Models { * Number of threads used to compute hash. */ threads: number; - } + }; /** * Preferences */ - export type Preferences = { - } + export type Preferences = {}; export type DefaultPreferences = Preferences & { [key: string]: any; @@ -811,7 +816,7 @@ export namespace Models { * Most recent date in ISO 8601 format when the session successfully passed MFA challenge. */ mfaUpdatedAt: string; - } + }; /** * Identity @@ -857,7 +862,7 @@ export namespace Models { * Identity Provider Refresh Token. */ providerRefreshToken: string; - } + }; /** * Token @@ -887,7 +892,7 @@ export namespace Models { * Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email. */ phrase: string; - } + }; /** * JWT @@ -897,7 +902,7 @@ export namespace Models { * JWT encoded string. */ jwt: string; - } + }; /** * Locale @@ -975,7 +980,7 @@ export namespace Models { * Registered organization of the IP */ connectionOrganization?: string; - } + }; /** * LocaleCode @@ -989,7 +994,7 @@ export namespace Models { * Locale name */ name: string; - } + }; /** * File @@ -1019,6 +1024,14 @@ export namespace Models { * File name. */ name: string; + /** + * Virtual folder containing the file, with a trailing slash. Empty for the bucket root. + */ + folder: string; + /** + * Full virtual path of the file: the folder followed by the file name. + */ + key: string; /** * File MD5 signature. */ @@ -1051,12 +1064,14 @@ export namespace Models { * Compression algorithm used for the file. Will be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd). */ compression: string; - } + }; /** * Team */ - export type Team = { + export type Team< + Preferences extends Models.Preferences = Models.DefaultPreferences, + > = { /** * Team ID. */ @@ -1081,7 +1096,7 @@ export namespace Models { * Team preferences as a key-value object */ prefs: Preferences; - } + }; /** * Membership @@ -1147,7 +1162,7 @@ export namespace Models { * User list of roles */ roles: string[]; - } + }; /** * Execution @@ -1170,19 +1185,23 @@ export namespace Models { */ $permissions: string[]; /** - * Function ID. + * Function or site ID. + */ + resourceId: string; + /** + * Execution resource type. */ - functionId: string; + resourceType: ExecutionResourceType; /** - * Function's deployment ID used to create the execution. + * Deployment ID used to create the execution. */ deploymentId: string; /** - * The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`. + * The trigger that caused the resource to execute. Possible values can be: `http`, `schedule`, or `event`. */ trigger: ExecutionTrigger; /** - * The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`. + * The status of the resource execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`. */ status: ExecutionStatus; /** @@ -1210,11 +1229,11 @@ export namespace Models { */ responseHeaders: Headers[]; /** - * Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload. + * Resource logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload. */ logs: string; /** - * Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload. + * Resource errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload. */ errors: string; /** @@ -1225,7 +1244,7 @@ export namespace Models { * The scheduled time for execution. If left empty, execution will be queued immediately. */ scheduledAt?: string; - } + }; /** * Country @@ -1239,7 +1258,7 @@ export namespace Models { * Country two-character ISO 3166-1 alpha code. */ code: string; - } + }; /** * Continent @@ -1253,7 +1272,7 @@ export namespace Models { * Continent two letter code. */ code: string; - } + }; /** * Language @@ -1271,7 +1290,7 @@ export namespace Models { * Language native name. */ nativeName: string; - } + }; /** * Currency @@ -1305,7 +1324,7 @@ export namespace Models { * Currency plural name */ namePlural: string; - } + }; /** * Phone @@ -1323,7 +1342,7 @@ export namespace Models { * Country name. */ countryName: string; - } + }; /** * Headers @@ -1337,7 +1356,7 @@ export namespace Models { * Header value. */ value: string; - } + }; /** * MFA Challenge @@ -1359,7 +1378,7 @@ export namespace Models { * Token expiration date in ISO 8601 format. */ expire: string; - } + }; /** * MFA Recovery Codes @@ -1369,7 +1388,7 @@ export namespace Models { * Recovery codes. */ recoveryCodes: string[]; - } + }; /** * MFAType @@ -1383,7 +1402,7 @@ export namespace Models { * URI for authenticator apps. */ uri: string; - } + }; /** * MFAFactors @@ -1405,7 +1424,11 @@ export namespace Models { * Can recovery code be used for MFA challenge for this account. */ recoveryCode: boolean; - } + /** + * Can custom factor be used for MFA challenge for this account. + */ + custom: boolean; + }; /** * Transaction @@ -1435,7 +1458,7 @@ export namespace Models { * Expiration time in ISO 8601 format. */ expiresAt: string; - } + }; /** * Subscriber @@ -1477,7 +1500,7 @@ export namespace Models { * The target provider type. Can be one of the following: `email`, `sms` or `push`. */ providerType: string; - } + }; /** * Target @@ -1519,5 +1542,189 @@ export namespace Models { * Is the target expired. */ expired: boolean; - } + }; + + /** + * AppInstallation + */ + export type AppInstallation = { + /** + * Installation ID. + */ + $id: string; + /** + * Installation creation time in ISO 8601 format. + */ + $createdAt: string; + /** + * Installation update time in ISO 8601 format. + */ + $updatedAt: string; + /** + * ID of the installed application. + */ + appId: string; + /** + * ID of the team the application is installed on. + */ + teamId: string; + /** + * Scopes granted to the application. Snapshot of the application's installation scopes taken when the installation was created or last updated. + */ + scopes: string[]; + /** + * Authorization details granted to the application. Rich authorization request (RFC 9396) style entries; the Appwrite Console stores authorized project IDs here. + */ + authorizationDetails: Record[]; + /** + * ID of the user who created the installation. + */ + createdById: string; + /** + * Name of the user who created the installation. + */ + createdByName: string; + /** + * Time an access token was last issued for the installation in ISO 8601 format. Null if never used. + */ + lastAccessedAt?: string; + }; + + /** + * OAuth2 Consent + */ + export type Oauth2Consent = { + /** + * Consent ID. + */ + $id: string; + /** + * Consent creation time in ISO 8601 format. + */ + $createdAt: string; + /** + * Consent update date in ISO 8601 format. + */ + $updatedAt: string; + /** + * ID of the user the consent belongs to. + */ + userId: string; + /** + * ID of the registered app the consent was given to. Empty for URL-form (CIMD) clients. + */ + appId: string; + /** + * Client ID metadata document URL of the client the consent was given to. Empty for registered apps. + */ + cimdUrl: string; + /** + * OAuth2 scopes the user consented to. + */ + scopes: string[]; + /** + * RFC 8707 resource indicators the user consented to. + */ + resources: string[]; + /** + * Authorization details the user consented to, as a JSON string. Each entry has a `type` plus project-defined fields. + */ + authorizationDetails: string; + /** + * Consent expiration time in ISO 8601 format. Empty when the consent has no token-bound expiry yet. + */ + expire: string; + }; + + /** + * OAuth2 Consent Token + */ + export type Oauth2ConsentToken = { + /** + * Token family ID. + */ + $id: string; + /** + * Token creation time in ISO 8601 format. + */ + $createdAt: string; + /** + * Token update date in ISO 8601 format. Refreshing the token family updates this. + */ + $updatedAt: string; + /** + * ID of the consent the token family was issued under. + */ + consentId: string; + /** + * ID of the user the token family belongs to. + */ + userId: string; + /** + * ID of the registered app the token family was issued to. Empty for URL-form (CIMD) clients. + */ + appId: string; + /** + * Client ID metadata document URL of the client the token family was issued to. Empty for registered apps. + */ + cimdUrl: string; + /** + * OAuth2 scopes granted on the token family. + */ + scopes: string[]; + /** + * RFC 8707 resource indicators granted on the token family. + */ + resources: string[]; + /** + * Authorization details granted on the token family, as a JSON string. Each entry has a `type` plus project-defined fields. + */ + authorizationDetails: string; + /** + * Expiration time of the current access token of this family in ISO 8601 format. + */ + expire: string; + }; + + /** + * OAuth2 consents list + */ + export type Oauth2ConsentList = { + /** + * Total number of consents that matched your query. + */ + total: number; + /** + * List of consents. + */ + consents: Oauth2Consent[]; + }; + + /** + * OAuth2 consent tokens list + */ + export type Oauth2ConsentTokenList = { + /** + * Total number of tokens that matched your query. + */ + total: number; + /** + * List of tokens. + */ + tokens: Oauth2ConsentToken[]; + }; + + /** + * App installations list + */ + export type AppInstallationList = { + /** + * Total number of installations that matched your query. + */ + total: number; + /** + * List of installations. + */ + installations: AppInstallation[]; + }; } diff --git a/src/operator.ts b/src/operator.ts index 2386a6c4..86b59205 100644 --- a/src/operator.ts +++ b/src/operator.ts @@ -3,306 +3,304 @@ export type OperatorValuesList = string[] | number[] | boolean[] | any[]; export type OperatorValues = OperatorValuesSingle | OperatorValuesList; export enum Condition { - Equal = "equal", - NotEqual = "notEqual", - GreaterThan = "greaterThan", - GreaterThanEqual = "greaterThanEqual", - LessThan = "lessThan", - LessThanEqual = "lessThanEqual", - Contains = "contains", - IsNull = "isNull", - IsNotNull = "isNotNull", + Equal = 'equal', + NotEqual = 'notEqual', + GreaterThan = 'greaterThan', + GreaterThanEqual = 'greaterThanEqual', + LessThan = 'lessThan', + LessThanEqual = 'lessThanEqual', + Contains = 'contains', + IsNull = 'isNull', + IsNotNull = 'isNotNull', } /** * Helper class to generate operator strings for atomic operations. */ export class Operator { - method: string; - values: OperatorValuesList | undefined; + method: string; + values: OperatorValuesList | undefined; - /** - * Constructor for Operator class. - * - * @param {string} method - * @param {OperatorValues} values - */ - constructor( - method: string, - values?: OperatorValues - ) { - this.method = method; + /** + * Constructor for Operator class. + * + * @param {string} method + * @param {OperatorValues} values + */ + constructor(method: string, values?: OperatorValues) { + this.method = method; - if (values !== undefined) { - if (Array.isArray(values)) { - this.values = values; - } else { - this.values = [values] as OperatorValuesList; - } + if (values !== undefined) { + if (Array.isArray(values)) { + this.values = values; + } else { + this.values = [values] as OperatorValuesList; + } + } } - } - /** - * Convert the operator object to a JSON string. - * - * @returns {string} - */ - toString(): string { - return JSON.stringify({ - method: this.method, - values: this.values, - }); - } - - /** - * Increment a numeric attribute by a specified value. - * - * @param {number} value - * @param {number} max - * @returns {string} - */ - static increment = (value: number = 1, max?: number): string => { - if (isNaN(value) || !isFinite(value)) { - throw new Error("Value cannot be NaN or Infinity"); - } - if (max !== undefined && (isNaN(max) || !isFinite(max))) { - throw new Error("Max cannot be NaN or Infinity"); - } - const values: any[] = [value]; - if (max !== undefined) { - values.push(max); + /** + * Convert the operator object to a JSON string. + * + * @returns {string} + */ + toString(): string { + return JSON.stringify({ + method: this.method, + values: this.values, + }); } - return new Operator("increment", values).toString(); - }; - /** - * Decrement a numeric attribute by a specified value. - * - * @param {number} value - * @param {number} min - * @returns {string} - */ - static decrement = (value: number = 1, min?: number): string => { - if (isNaN(value) || !isFinite(value)) { - throw new Error("Value cannot be NaN or Infinity"); - } - if (min !== undefined && (isNaN(min) || !isFinite(min))) { - throw new Error("Min cannot be NaN or Infinity"); - } - const values: any[] = [value]; - if (min !== undefined) { - values.push(min); - } - return new Operator("decrement", values).toString(); - }; + /** + * Increment a numeric attribute by a specified value. + * + * @param {number} value + * @param {number} max + * @returns {string} + */ + static increment = (value: number = 1, max?: number): string => { + if (isNaN(value) || !isFinite(value)) { + throw new Error('Value cannot be NaN or Infinity'); + } + if (max !== undefined && (isNaN(max) || !isFinite(max))) { + throw new Error('Max cannot be NaN or Infinity'); + } + const values: any[] = [value]; + if (max !== undefined) { + values.push(max); + } + return new Operator('increment', values).toString(); + }; - /** - * Multiply a numeric attribute by a specified factor. - * - * @param {number} factor - * @param {number} max - * @returns {string} - */ - static multiply = (factor: number, max?: number): string => { - if (isNaN(factor) || !isFinite(factor)) { - throw new Error("Factor cannot be NaN or Infinity"); - } - if (max !== undefined && (isNaN(max) || !isFinite(max))) { - throw new Error("Max cannot be NaN or Infinity"); - } - const values: any[] = [factor]; - if (max !== undefined) { - values.push(max); - } - return new Operator("multiply", values).toString(); - }; + /** + * Decrement a numeric attribute by a specified value. + * + * @param {number} value + * @param {number} min + * @returns {string} + */ + static decrement = (value: number = 1, min?: number): string => { + if (isNaN(value) || !isFinite(value)) { + throw new Error('Value cannot be NaN or Infinity'); + } + if (min !== undefined && (isNaN(min) || !isFinite(min))) { + throw new Error('Min cannot be NaN or Infinity'); + } + const values: any[] = [value]; + if (min !== undefined) { + values.push(min); + } + return new Operator('decrement', values).toString(); + }; - /** - * Divide a numeric attribute by a specified divisor. - * - * @param {number} divisor - * @param {number} min - * @returns {string} - */ - static divide = (divisor: number, min?: number): string => { - if (isNaN(divisor) || !isFinite(divisor)) { - throw new Error("Divisor cannot be NaN or Infinity"); - } - if (min !== undefined && (isNaN(min) || !isFinite(min))) { - throw new Error("Min cannot be NaN or Infinity"); - } - if (divisor === 0) { - throw new Error("Divisor cannot be zero"); - } - const values: any[] = [divisor]; - if (min !== undefined) { - values.push(min); - } - return new Operator("divide", values).toString(); - }; + /** + * Multiply a numeric attribute by a specified factor. + * + * @param {number} factor + * @param {number} max + * @returns {string} + */ + static multiply = (factor: number, max?: number): string => { + if (isNaN(factor) || !isFinite(factor)) { + throw new Error('Factor cannot be NaN or Infinity'); + } + if (max !== undefined && (isNaN(max) || !isFinite(max))) { + throw new Error('Max cannot be NaN or Infinity'); + } + const values: any[] = [factor]; + if (max !== undefined) { + values.push(max); + } + return new Operator('multiply', values).toString(); + }; - /** - * Apply modulo operation on a numeric attribute. - * - * @param {number} divisor - * @returns {string} - */ - static modulo = (divisor: number): string => { - if (isNaN(divisor) || !isFinite(divisor)) { - throw new Error("Divisor cannot be NaN or Infinity"); - } - if (divisor === 0) { - throw new Error("Divisor cannot be zero"); - } - return new Operator("modulo", [divisor]).toString(); - }; + /** + * Divide a numeric attribute by a specified divisor. + * + * @param {number} divisor + * @param {number} min + * @returns {string} + */ + static divide = (divisor: number, min?: number): string => { + if (isNaN(divisor) || !isFinite(divisor)) { + throw new Error('Divisor cannot be NaN or Infinity'); + } + if (min !== undefined && (isNaN(min) || !isFinite(min))) { + throw new Error('Min cannot be NaN or Infinity'); + } + if (divisor === 0) { + throw new Error('Divisor cannot be zero'); + } + const values: any[] = [divisor]; + if (min !== undefined) { + values.push(min); + } + return new Operator('divide', values).toString(); + }; - /** - * Raise a numeric attribute to a specified power. - * - * @param {number} exponent - * @param {number} max - * @returns {string} - */ - static power = (exponent: number, max?: number): string => { - if (isNaN(exponent) || !isFinite(exponent)) { - throw new Error("Exponent cannot be NaN or Infinity"); - } - if (max !== undefined && (isNaN(max) || !isFinite(max))) { - throw new Error("Max cannot be NaN or Infinity"); - } - const values: any[] = [exponent]; - if (max !== undefined) { - values.push(max); - } - return new Operator("power", values).toString(); - }; + /** + * Apply modulo operation on a numeric attribute. + * + * @param {number} divisor + * @returns {string} + */ + static modulo = (divisor: number): string => { + if (isNaN(divisor) || !isFinite(divisor)) { + throw new Error('Divisor cannot be NaN or Infinity'); + } + if (divisor === 0) { + throw new Error('Divisor cannot be zero'); + } + return new Operator('modulo', [divisor]).toString(); + }; + + /** + * Raise a numeric attribute to a specified power. + * + * @param {number} exponent + * @param {number} max + * @returns {string} + */ + static power = (exponent: number, max?: number): string => { + if (isNaN(exponent) || !isFinite(exponent)) { + throw new Error('Exponent cannot be NaN or Infinity'); + } + if (max !== undefined && (isNaN(max) || !isFinite(max))) { + throw new Error('Max cannot be NaN or Infinity'); + } + const values: any[] = [exponent]; + if (max !== undefined) { + values.push(max); + } + return new Operator('power', values).toString(); + }; - /** - * Append values to an array attribute. - * - * @param {any[]} values - * @returns {string} - */ - static arrayAppend = (values: any[]): string => - new Operator("arrayAppend", values).toString(); + /** + * Append values to an array attribute. + * + * @param {any[]} values + * @returns {string} + */ + static arrayAppend = (values: any[]): string => + new Operator('arrayAppend', values).toString(); - /** - * Prepend values to an array attribute. - * - * @param {any[]} values - * @returns {string} - */ - static arrayPrepend = (values: any[]): string => - new Operator("arrayPrepend", values).toString(); + /** + * Prepend values to an array attribute. + * + * @param {any[]} values + * @returns {string} + */ + static arrayPrepend = (values: any[]): string => + new Operator('arrayPrepend', values).toString(); - /** - * Insert a value at a specific index in an array attribute. - * - * @param {number} index - * @param {any} value - * @returns {string} - */ - static arrayInsert = (index: number, value: any): string => - new Operator("arrayInsert", [index, value]).toString(); + /** + * Insert a value at a specific index in an array attribute. + * + * @param {number} index + * @param {any} value + * @returns {string} + */ + static arrayInsert = (index: number, value: any): string => + new Operator('arrayInsert', [index, value]).toString(); - /** - * Remove a value from an array attribute. - * - * @param {any} value - * @returns {string} - */ - static arrayRemove = (value: any): string => - new Operator("arrayRemove", [value]).toString(); + /** + * Remove a value from an array attribute. + * + * @param {any} value + * @returns {string} + */ + static arrayRemove = (value: any): string => + new Operator('arrayRemove', [value]).toString(); - /** - * Remove duplicate values from an array attribute. - * - * @returns {string} - */ - static arrayUnique = (): string => - new Operator("arrayUnique", []).toString(); + /** + * Remove duplicate values from an array attribute. + * + * @returns {string} + */ + static arrayUnique = (): string => + new Operator('arrayUnique', []).toString(); - /** - * Keep only values that exist in both the current array and the provided array. - * - * @param {any[]} values - * @returns {string} - */ - static arrayIntersect = (values: any[]): string => - new Operator("arrayIntersect", values).toString(); + /** + * Keep only values that exist in both the current array and the provided array. + * + * @param {any[]} values + * @returns {string} + */ + static arrayIntersect = (values: any[]): string => + new Operator('arrayIntersect', values).toString(); - /** - * Remove values from the array that exist in the provided array. - * - * @param {any[]} values - * @returns {string} - */ - static arrayDiff = (values: any[]): string => - new Operator("arrayDiff", values).toString(); + /** + * Remove values from the array that exist in the provided array. + * + * @param {any[]} values + * @returns {string} + */ + static arrayDiff = (values: any[]): string => + new Operator('arrayDiff', values).toString(); - /** - * Filter array values based on a condition. - * - * @param {Condition} condition - * @param {any} value - * @returns {string} - */ - static arrayFilter = (condition: Condition, value?: any): string => { - const values: any[] = [condition as string, value === undefined ? null : value]; - return new Operator("arrayFilter", values).toString(); - }; + /** + * Filter array values based on a condition. + * + * @param {Condition} condition + * @param {any} value + * @returns {string} + */ + static arrayFilter = (condition: Condition, value?: any): string => { + const values: any[] = [ + condition as string, + value === undefined ? null : value, + ]; + return new Operator('arrayFilter', values).toString(); + }; - /** - * Concatenate a value to a string or array attribute. - * - * @param {any} value - * @returns {string} - */ - static stringConcat = (value: any): string => - new Operator("stringConcat", [value]).toString(); + /** + * Concatenate a value to a string or array attribute. + * + * @param {any} value + * @returns {string} + */ + static stringConcat = (value: any): string => + new Operator('stringConcat', [value]).toString(); - /** - * Replace occurrences of a search string with a replacement string. - * - * @param {string} search - * @param {string} replace - * @returns {string} - */ - static stringReplace = (search: string, replace: string): string => - new Operator("stringReplace", [search, replace]).toString(); + /** + * Replace occurrences of a search string with a replacement string. + * + * @param {string} search + * @param {string} replace + * @returns {string} + */ + static stringReplace = (search: string, replace: string): string => + new Operator('stringReplace', [search, replace]).toString(); - /** - * Toggle a boolean attribute. - * - * @returns {string} - */ - static toggle = (): string => - new Operator("toggle", []).toString(); + /** + * Toggle a boolean attribute. + * + * @returns {string} + */ + static toggle = (): string => new Operator('toggle', []).toString(); - /** - * Add days to a date attribute. - * - * @param {number} days - * @returns {string} - */ - static dateAddDays = (days: number): string => - new Operator("dateAddDays", [days]).toString(); + /** + * Add days to a date attribute. + * + * @param {number} days + * @returns {string} + */ + static dateAddDays = (days: number): string => + new Operator('dateAddDays', [days]).toString(); - /** - * Subtract days from a date attribute. - * - * @param {number} days - * @returns {string} - */ - static dateSubDays = (days: number): string => - new Operator("dateSubDays", [days]).toString(); + /** + * Subtract days from a date attribute. + * + * @param {number} days + * @returns {string} + */ + static dateSubDays = (days: number): string => + new Operator('dateSubDays', [days]).toString(); - /** - * Set a date attribute to the current date and time. - * - * @returns {string} - */ - static dateSetNow = (): string => - new Operator("dateSetNow", []).toString(); + /** + * Set a date attribute to the current date and time. + * + * @returns {string} + */ + static dateSetNow = (): string => new Operator('dateSetNow', []).toString(); } diff --git a/src/permission.ts b/src/permission.ts index 94d9cedd..758211bf 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -10,7 +10,7 @@ export class Permission { */ static read = (role: string): string => { return `read("${role}")`; - } + }; /** * Generate write permission string for the provided role. @@ -23,7 +23,7 @@ export class Permission { */ static write = (role: string): string => { return `write("${role}")`; - } + }; /** * Generate create permission string for the provided role. @@ -33,7 +33,7 @@ export class Permission { */ static create = (role: string): string => { return `create("${role}")`; - } + }; /** * Generate update permission string for the provided role. @@ -43,7 +43,7 @@ export class Permission { */ static update = (role: string): string => { return `update("${role}")`; - } + }; /** * Generate delete permission string for the provided role. @@ -53,5 +53,5 @@ export class Permission { */ static delete = (role: string): string => { return `delete("${role}")`; - } + }; } diff --git a/src/query.ts b/src/query.ts index e0e97257..7a7da885 100644 --- a/src/query.ts +++ b/src/query.ts @@ -2,7 +2,8 @@ import JSONbigModule from 'json-bigint'; const JSONbig = JSONbigModule({ useNativeBigInt: true }); type QueryTypesSingle = string | number | bigint | boolean; -export type QueryTypesList = string[] | number[] | bigint[] | boolean[] | Query[] | any[]; +export type QueryTypesList = + string[] | number[] | bigint[] | boolean[] | Query[] | any[]; export type QueryTypes = QueryTypesSingle | QueryTypesList; type AttributesTypes = string | string[]; @@ -10,597 +11,652 @@ type AttributesTypes = string | string[]; * Helper class to generate query strings. */ export class Query { - method: string; - attribute: AttributesTypes | undefined; - values: QueryTypesList | undefined; - - /** - * Constructor for Query class. - * - * @param {string} method - * @param {AttributesTypes} attribute - * @param {QueryTypes} values - */ - constructor( - method: string, - attribute?: AttributesTypes, - values?: QueryTypes - ) { - this.method = method; - this.attribute = attribute; - - if (values !== undefined) { - if (Array.isArray(values)) { - this.values = values; - } else { - this.values = [values] as QueryTypesList; - } + method: string; + attribute: AttributesTypes | undefined; + values: QueryTypesList | undefined; + + /** + * Constructor for Query class. + * + * @param {string} method + * @param {AttributesTypes} attribute + * @param {QueryTypes} values + */ + constructor( + method: string, + attribute?: AttributesTypes, + values?: QueryTypes, + ) { + this.method = method; + this.attribute = attribute; + + if (values !== undefined) { + if (Array.isArray(values)) { + this.values = values; + } else { + this.values = [values] as QueryTypesList; + } + } } - } - - /** - * Convert the query object to a JSON string. - * - * @returns {string} - */ - toString(): string { - return JSONbig.stringify({ - method: this.method, - attribute: this.attribute, - values: this.values, - }); - } - - /** - * Filter resources where attribute is equal to value. - * - * @param {string} attribute - * @param {QueryTypes} value - * @returns {string} - */ - static equal = (attribute: string, value: QueryTypes): string => - new Query("equal", attribute, value).toString(); - - /** - * Filter resources where attribute is not equal to value. - * - * @param {string} attribute - * @param {QueryTypes} value - * @returns {string} - */ - static notEqual = (attribute: string, value: QueryTypes): string => - new Query("notEqual", attribute, value).toString(); - - /** - * Filter resources where attribute matches a regular expression pattern. - * - * @param {string} attribute The attribute to filter on. - * @param {string} pattern The regular expression pattern to match. - * @returns {string} - */ - static regex = (attribute: string, pattern: string): string => - new Query("regex", attribute, pattern).toString(); - - /** - * Filter resources where attribute is less than value. - * - * @param {string} attribute - * @param {QueryTypes} value - * @returns {string} - */ - static lessThan = (attribute: string, value: QueryTypes): string => - new Query("lessThan", attribute, value).toString(); - - /** - * Filter resources where attribute is less than or equal to value. - * - * @param {string} attribute - * @param {QueryTypes} value - * @returns {string} - */ - static lessThanEqual = (attribute: string, value: QueryTypes): string => - new Query("lessThanEqual", attribute, value).toString(); - - /** - * Filter resources where attribute is greater than value. - * - * @param {string} attribute - * @param {QueryTypes} value - * @returns {string} - */ - static greaterThan = (attribute: string, value: QueryTypes): string => - new Query("greaterThan", attribute, value).toString(); - - /** - * Filter resources where attribute is greater than or equal to value. - * - * @param {string} attribute - * @param {QueryTypes} value - * @returns {string} - */ - static greaterThanEqual = (attribute: string, value: QueryTypes): string => - new Query("greaterThanEqual", attribute, value).toString(); - - /** - * Filter resources where attribute is null. - * - * @param {string} attribute - * @returns {string} - */ - static isNull = (attribute: string): string => - new Query("isNull", attribute).toString(); - - /** - * Filter resources where attribute is not null. - * - * @param {string} attribute - * @returns {string} - */ - static isNotNull = (attribute: string): string => - new Query("isNotNull", attribute).toString(); - - /** - * Filter resources where the specified attributes exist. - * - * @param {string[]} attributes The list of attributes that must exist. - * @returns {string} - */ - static exists = (attributes: string[]): string => - new Query("exists", undefined, attributes).toString(); - - /** - * Filter resources where the specified attributes do not exist. - * - * @param {string[]} attributes The list of attributes that must not exist. - * @returns {string} - */ - static notExists = (attributes: string[]): string => - new Query("notExists", undefined, attributes).toString(); - - /** - * Filter resources where attribute is between start and end (inclusive). - * - * @param {string} attribute - * @param {string | number | bigint} start - * @param {string | number | bigint} end - * @returns {string} - */ - static between = (attribute: string, start: string | number | bigint, end: string | number | bigint): string => - new Query("between", attribute, [start, end] as QueryTypesList).toString(); - - /** - * Filter resources where attribute starts with value. - * - * @param {string} attribute - * @param {string} value - * @returns {string} - */ - static startsWith = (attribute: string, value: string): string => - new Query("startsWith", attribute, value).toString(); - - /** - * Filter resources where attribute ends with value. - * - * @param {string} attribute - * @param {string} value - * @returns {string} - */ - static endsWith = (attribute: string, value: string): string => - new Query("endsWith", attribute, value).toString(); - - /** - * Specify which attributes should be returned by the API call. - * - * @param {string[]} attributes - * @returns {string} - */ - static select = (attributes: string[]): string => - new Query("select", undefined, attributes).toString(); - - /** - * Filter resources by searching attribute for value. - * A fulltext index on attribute is required for this query to work. - * - * @param {string} attribute - * @param {string} value - * @returns {string} - */ - static search = (attribute: string, value: string): string => - new Query("search", attribute, value).toString(); - - /** - * Sort results by attribute descending. - * - * @param {string} attribute - * @returns {string} - */ - static orderDesc = (attribute: string): string => - new Query("orderDesc", attribute).toString(); - - /** - * Sort results by attribute ascending. - * - * @param {string} attribute - * @returns {string} - */ - static orderAsc = (attribute: string): string => - new Query("orderAsc", attribute).toString(); - - /** - * Sort results randomly. - * - * @returns {string} - */ - static orderRandom = (): string => - new Query("orderRandom").toString(); - - /** - * Return results after documentId. - * - * @param {string} documentId - * @returns {string} - */ - static cursorAfter = (documentId: string): string => - new Query("cursorAfter", undefined, documentId).toString(); - - /** - * Return results before documentId. - * - * @param {string} documentId - * @returns {string} - */ - static cursorBefore = (documentId: string): string => - new Query("cursorBefore", undefined, documentId).toString(); - - /** - * Return only limit results. - * - * @param {number} limit - * @returns {string} - */ - static limit = (limit: number): string => - new Query("limit", undefined, limit).toString(); - - /** - * Filter resources by skipping the first offset results. - * - * @param {number} offset - * @returns {string} - */ - static offset = (offset: number): string => - new Query("offset", undefined, offset).toString(); - - /** - * Filter resources where attribute contains the specified value. - * For string attributes, checks if the string contains the substring. - * - * Note: For array attributes, use {@link containsAny} or {@link containsAll} instead. - * @param {string} attribute - * @param {string | string[]} value - * @returns {string} - */ - static contains = (attribute: string, value: string | any[]): string => - new Query("contains", attribute, value).toString(); - - /** - * Filter resources where attribute contains ANY of the specified values. - * For array and relationship attributes, matches documents where the attribute - * contains at least one of the given values. - * - * @param {string} attribute - * @param {any[]} value - * @returns {string} - */ - static containsAny = (attribute: string, value: any[]): string => - new Query("containsAny", attribute, value).toString(); - - /** - * Filter resources where attribute contains ALL of the specified values. - * For array and relationship attributes, matches documents where the attribute - * contains every one of the given values. - * - * @param {string} attribute - * @param {any[]} value - * @returns {string} - */ - static containsAll = (attribute: string, value: any[]): string => - new Query("containsAll", attribute, value).toString(); - - /** - * Filter resources where attribute does not contain the specified value. - * - * @param {string} attribute - * @param {string | any[]} value - * @returns {string} - */ - static notContains = (attribute: string, value: string | any[]): string => - new Query("notContains", attribute, value).toString(); - - /** - * Filter resources by searching attribute for value (inverse of search). - * A fulltext index on attribute is required for this query to work. - * - * @param {string} attribute - * @param {string} value - * @returns {string} - */ - static notSearch = (attribute: string, value: string): string => - new Query("notSearch", attribute, value).toString(); - - /** - * Filter resources where attribute is not between start and end (exclusive). - * - * @param {string} attribute - * @param {string | number | bigint} start - * @param {string | number | bigint} end - * @returns {string} - */ - static notBetween = (attribute: string, start: string | number | bigint, end: string | number | bigint): string => - new Query("notBetween", attribute, [start, end] as QueryTypesList).toString(); - - /** - * Filter resources where attribute does not start with value. - * - * @param {string} attribute - * @param {string} value - * @returns {string} - */ - static notStartsWith = (attribute: string, value: string): string => - new Query("notStartsWith", attribute, value).toString(); - - /** - * Filter resources where attribute does not end with value. - * - * @param {string} attribute - * @param {string} value - * @returns {string} - */ - static notEndsWith = (attribute: string, value: string): string => - new Query("notEndsWith", attribute, value).toString(); - - /** - * Filter resources where document was created before date. - * - * @param {string} value - * @returns {string} - */ - static createdBefore = (value: string): string => - Query.lessThan("$createdAt", value); - - /** - * Filter resources where document was created after date. - * - * @param {string} value - * @returns {string} - */ - static createdAfter = (value: string): string => - Query.greaterThan("$createdAt", value); - - /** - * Filter resources where document was created between dates. - * - * @param {string} start - * @param {string} end - * @returns {string} - */ - static createdBetween = (start: string, end: string): string => - Query.between("$createdAt", start, end); - - /** - * Filter resources where document was updated before date. - * - * @param {string} value - * @returns {string} - */ - static updatedBefore = (value: string): string => - Query.lessThan("$updatedAt", value); - - /** - * Filter resources where document was updated after date. - * - * @param {string} value - * @returns {string} - */ - static updatedAfter = (value: string): string => - Query.greaterThan("$updatedAt", value); - - /** - * Filter resources where document was updated between dates. - * - * @param {string} start - * @param {string} end - * @returns {string} - */ - static updatedBetween = (start: string, end: string): string => - Query.between("$updatedAt", start, end); - - /** - * Combine multiple queries using logical OR operator. - * - * @param {string[]} queries - * @returns {string} - */ - static or = (queries: string[]) => - new Query("or", undefined, queries.map((query) => JSONbig.parse(query))).toString(); - - /** - * Combine multiple queries using logical AND operator. - * - * @param {string[]} queries - * @returns {string} - */ - static and = (queries: string[]) => - new Query("and", undefined, queries.map((query) => JSONbig.parse(query))).toString(); - - /** - * Filter array elements where at least one element matches all the specified queries. - * - * @param {string} attribute The attribute containing the array to filter on. - * @param {string[]} queries The list of query strings to match against array elements. - * @returns {string} - */ - static elemMatch = (attribute: string, queries: string[]): string => - new Query( - "elemMatch", - attribute, - queries.map((query) => JSONbig.parse(query)) - ).toString(); - - /** - * Filter resources where attribute is at a specific distance from the given coordinates. - * - * @param {string} attribute - * @param {any[]} values - * @param {number} distance - * @param {boolean} meters - * @returns {string} - */ - static distanceEqual = (attribute: string, values: any[], distance: number, meters: boolean = true): string => - new Query("distanceEqual", attribute, [[values, distance, meters]] as QueryTypesList).toString(); - - /** - * Filter resources where attribute is not at a specific distance from the given coordinates. - * - * @param {string} attribute - * @param {any[]} values - * @param {number} distance - * @param {boolean} meters - * @returns {string} - */ - static distanceNotEqual = (attribute: string, values: any[], distance: number, meters: boolean = true): string => - new Query("distanceNotEqual", attribute, [[values, distance, meters]] as QueryTypesList).toString(); - - /** - * Filter resources where attribute is at a distance greater than the specified value from the given coordinates. - * - * @param {string} attribute - * @param {any[]} values - * @param {number} distance - * @param {boolean} meters - * @returns {string} - */ - static distanceGreaterThan = (attribute: string, values: any[], distance: number, meters: boolean = true): string => - new Query("distanceGreaterThan", attribute, [[values, distance, meters]] as QueryTypesList).toString(); - - /** - * Filter resources where attribute is at a distance less than the specified value from the given coordinates. - * - * @param {string} attribute - * @param {any[]} values - * @param {number} distance - * @param {boolean} meters - * @returns {string} - */ - static distanceLessThan = (attribute: string, values: any[], distance: number, meters: boolean = true): string => - new Query("distanceLessThan", attribute, [[values, distance, meters]] as QueryTypesList).toString(); - - /** - * Filter resources using vector dot product similarity. - * - * @param {string} attribute - * @param {number[]} vector - * @returns {string} - */ - static vectorDot = (attribute: string, vector: number[]): string => - new Query("vectorDot", attribute, [vector] as QueryTypesList).toString(); - - /** - * Filter resources using vector cosine similarity. - * - * @param {string} attribute - * @param {number[]} vector - * @returns {string} - */ - static vectorCosine = (attribute: string, vector: number[]): string => - new Query("vectorCosine", attribute, [vector] as QueryTypesList).toString(); - - /** - * Filter resources using vector Euclidean distance. - * - * @param {string} attribute - * @param {number[]} vector - * @returns {string} - */ - static vectorEuclidean = (attribute: string, vector: number[]): string => - new Query("vectorEuclidean", attribute, [vector] as QueryTypesList).toString(); - - /** - * Filter resources where attribute intersects with the given geometry. - * - * @param {string} attribute - * @param {any[]} values - * @returns {string} - */ - static intersects = (attribute: string, values: any[]): string => - new Query("intersects", attribute, [values]).toString(); - - /** - * Filter resources where attribute does not intersect with the given geometry. - * - * @param {string} attribute - * @param {any[]} values - * @returns {string} - */ - static notIntersects = (attribute: string, values: any[]): string => - new Query("notIntersects", attribute, [values]).toString(); - - /** - * Filter resources where attribute crosses the given geometry. - * - * @param {string} attribute - * @param {any[]} values - * @returns {string} - */ - static crosses = (attribute: string, values: any[]): string => - new Query("crosses", attribute, [values]).toString(); - - /** - * Filter resources where attribute does not cross the given geometry. - * - * @param {string} attribute - * @param {any[]} values - * @returns {string} - */ - static notCrosses = (attribute: string, values: any[]): string => - new Query("notCrosses", attribute, [values]).toString(); - - /** - * Filter resources where attribute overlaps with the given geometry. - * - * @param {string} attribute - * @param {any[]} values - * @returns {string} - */ - static overlaps = (attribute: string, values: any[]): string => - new Query("overlaps", attribute, [values]).toString(); - - /** - * Filter resources where attribute does not overlap with the given geometry. - * - * @param {string} attribute - * @param {any[]} values - * @returns {string} - */ - static notOverlaps = (attribute: string, values: any[]): string => - new Query("notOverlaps", attribute, [values]).toString(); - - /** - * Filter resources where attribute touches the given geometry. - * - * @param {string} attribute - * @param {any[]} values - * @returns {string} - */ - static touches = (attribute: string, values: any[]): string => - new Query("touches", attribute, [values]).toString(); - - /** - * Filter resources where attribute does not touch the given geometry. - * - * @param {string} attribute - * @param {any[]} values - * @returns {string} - */ - static notTouches = (attribute: string, values: any[]): string => - new Query("notTouches", attribute, [values]).toString(); + + /** + * Convert the query object to a JSON string. + * + * @returns {string} + */ + toString(): string { + return JSONbig.stringify({ + method: this.method, + attribute: this.attribute, + values: this.values, + }); + } + + /** + * Filter resources where attribute is equal to value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ + static equal = (attribute: string, value: QueryTypes): string => + new Query('equal', attribute, value).toString(); + + /** + * Filter resources where attribute is not equal to value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ + static notEqual = (attribute: string, value: QueryTypes): string => + new Query('notEqual', attribute, value).toString(); + + /** + * Filter resources where attribute matches a regular expression pattern. + * + * @param {string} attribute The attribute to filter on. + * @param {string} pattern The regular expression pattern to match. + * @returns {string} + */ + static regex = (attribute: string, pattern: string): string => + new Query('regex', attribute, pattern).toString(); + + /** + * Filter resources where attribute is less than value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ + static lessThan = (attribute: string, value: QueryTypes): string => + new Query('lessThan', attribute, value).toString(); + + /** + * Filter resources where attribute is less than or equal to value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ + static lessThanEqual = (attribute: string, value: QueryTypes): string => + new Query('lessThanEqual', attribute, value).toString(); + + /** + * Filter resources where attribute is greater than value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ + static greaterThan = (attribute: string, value: QueryTypes): string => + new Query('greaterThan', attribute, value).toString(); + + /** + * Filter resources where attribute is greater than or equal to value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ + static greaterThanEqual = (attribute: string, value: QueryTypes): string => + new Query('greaterThanEqual', attribute, value).toString(); + + /** + * Filter resources where attribute is null. + * + * @param {string} attribute + * @returns {string} + */ + static isNull = (attribute: string): string => + new Query('isNull', attribute).toString(); + + /** + * Filter resources where attribute is not null. + * + * @param {string} attribute + * @returns {string} + */ + static isNotNull = (attribute: string): string => + new Query('isNotNull', attribute).toString(); + + /** + * Filter resources where the specified attributes exist. + * + * @param {string[]} attributes The list of attributes that must exist. + * @returns {string} + */ + static exists = (attributes: string[]): string => + new Query('exists', undefined, attributes).toString(); + + /** + * Filter resources where the specified attributes do not exist. + * + * @param {string[]} attributes The list of attributes that must not exist. + * @returns {string} + */ + static notExists = (attributes: string[]): string => + new Query('notExists', undefined, attributes).toString(); + + /** + * Filter resources where attribute is between start and end (inclusive). + * + * @param {string} attribute + * @param {string | number | bigint} start + * @param {string | number | bigint} end + * @returns {string} + */ + static between = ( + attribute: string, + start: string | number | bigint, + end: string | number | bigint, + ): string => + new Query('between', attribute, [ + start, + end, + ] as QueryTypesList).toString(); + + /** + * Filter resources where attribute starts with value. + * + * @param {string} attribute + * @param {string} value + * @returns {string} + */ + static startsWith = (attribute: string, value: string): string => + new Query('startsWith', attribute, value).toString(); + + /** + * Filter resources where attribute ends with value. + * + * @param {string} attribute + * @param {string} value + * @returns {string} + */ + static endsWith = (attribute: string, value: string): string => + new Query('endsWith', attribute, value).toString(); + + /** + * Specify which attributes should be returned by the API call. + * + * @param {string[]} attributes + * @returns {string} + */ + static select = (attributes: string[]): string => + new Query('select', undefined, attributes).toString(); + + /** + * Filter resources by searching attribute for value. + * A fulltext index on attribute is required for this query to work. + * + * @param {string} attribute + * @param {string} value + * @returns {string} + */ + static search = (attribute: string, value: string): string => + new Query('search', attribute, value).toString(); + + /** + * Sort results by attribute descending. + * + * @param {string} attribute + * @returns {string} + */ + static orderDesc = (attribute: string): string => + new Query('orderDesc', attribute).toString(); + + /** + * Sort results by attribute ascending. + * + * @param {string} attribute + * @returns {string} + */ + static orderAsc = (attribute: string): string => + new Query('orderAsc', attribute).toString(); + + /** + * Sort results randomly. + * + * @returns {string} + */ + static orderRandom = (): string => new Query('orderRandom').toString(); + + /** + * Return results after documentId. + * + * @param {string} documentId + * @returns {string} + */ + static cursorAfter = (documentId: string): string => + new Query('cursorAfter', undefined, documentId).toString(); + + /** + * Return results before documentId. + * + * @param {string} documentId + * @returns {string} + */ + static cursorBefore = (documentId: string): string => + new Query('cursorBefore', undefined, documentId).toString(); + + /** + * Return only limit results. + * + * @param {number} limit + * @returns {string} + */ + static limit = (limit: number): string => + new Query('limit', undefined, limit).toString(); + + /** + * Filter resources by skipping the first offset results. + * + * @param {number} offset + * @returns {string} + */ + static offset = (offset: number): string => + new Query('offset', undefined, offset).toString(); + + /** + * Filter resources where attribute contains the specified value. + * For string attributes, checks if the string contains the substring. + * + * Note: For array attributes, use {@link containsAny} or {@link containsAll} instead. + * @param {string} attribute + * @param {string | string[]} value + * @returns {string} + */ + static contains = (attribute: string, value: string | any[]): string => + new Query('contains', attribute, value).toString(); + + /** + * Filter resources where attribute contains ANY of the specified values. + * For array and relationship attributes, matches documents where the attribute + * contains at least one of the given values. + * + * @param {string} attribute + * @param {any[]} value + * @returns {string} + */ + static containsAny = (attribute: string, value: any[]): string => + new Query('containsAny', attribute, value).toString(); + + /** + * Filter resources where attribute contains ALL of the specified values. + * For array and relationship attributes, matches documents where the attribute + * contains every one of the given values. + * + * @param {string} attribute + * @param {any[]} value + * @returns {string} + */ + static containsAll = (attribute: string, value: any[]): string => + new Query('containsAll', attribute, value).toString(); + + /** + * Filter resources where attribute does not contain the specified value. + * + * @param {string} attribute + * @param {string | any[]} value + * @returns {string} + */ + static notContains = (attribute: string, value: string | any[]): string => + new Query('notContains', attribute, value).toString(); + + /** + * Filter resources by searching attribute for value (inverse of search). + * A fulltext index on attribute is required for this query to work. + * + * @param {string} attribute + * @param {string} value + * @returns {string} + */ + static notSearch = (attribute: string, value: string): string => + new Query('notSearch', attribute, value).toString(); + + /** + * Filter resources where attribute is not between start and end (exclusive). + * + * @param {string} attribute + * @param {string | number | bigint} start + * @param {string | number | bigint} end + * @returns {string} + */ + static notBetween = ( + attribute: string, + start: string | number | bigint, + end: string | number | bigint, + ): string => + new Query('notBetween', attribute, [ + start, + end, + ] as QueryTypesList).toString(); + + /** + * Filter resources where attribute does not start with value. + * + * @param {string} attribute + * @param {string} value + * @returns {string} + */ + static notStartsWith = (attribute: string, value: string): string => + new Query('notStartsWith', attribute, value).toString(); + + /** + * Filter resources where attribute does not end with value. + * + * @param {string} attribute + * @param {string} value + * @returns {string} + */ + static notEndsWith = (attribute: string, value: string): string => + new Query('notEndsWith', attribute, value).toString(); + + /** + * Filter resources where document was created before date. + * + * @param {string} value + * @returns {string} + */ + static createdBefore = (value: string): string => + Query.lessThan('$createdAt', value); + + /** + * Filter resources where document was created after date. + * + * @param {string} value + * @returns {string} + */ + static createdAfter = (value: string): string => + Query.greaterThan('$createdAt', value); + + /** + * Filter resources where document was created between dates. + * + * @param {string} start + * @param {string} end + * @returns {string} + */ + static createdBetween = (start: string, end: string): string => + Query.between('$createdAt', start, end); + + /** + * Filter resources where document was updated before date. + * + * @param {string} value + * @returns {string} + */ + static updatedBefore = (value: string): string => + Query.lessThan('$updatedAt', value); + + /** + * Filter resources where document was updated after date. + * + * @param {string} value + * @returns {string} + */ + static updatedAfter = (value: string): string => + Query.greaterThan('$updatedAt', value); + + /** + * Filter resources where document was updated between dates. + * + * @param {string} start + * @param {string} end + * @returns {string} + */ + static updatedBetween = (start: string, end: string): string => + Query.between('$updatedAt', start, end); + + /** + * Combine multiple queries using logical OR operator. + * + * @param {string[]} queries + * @returns {string} + */ + static or = (queries: string[]) => + new Query( + 'or', + undefined, + queries.map((query) => JSONbig.parse(query)), + ).toString(); + + /** + * Combine multiple queries using logical AND operator. + * + * @param {string[]} queries + * @returns {string} + */ + static and = (queries: string[]) => + new Query( + 'and', + undefined, + queries.map((query) => JSONbig.parse(query)), + ).toString(); + + /** + * Filter array elements where at least one element matches all the specified queries. + * + * @param {string} attribute The attribute containing the array to filter on. + * @param {string[]} queries The list of query strings to match against array elements. + * @returns {string} + */ + static elemMatch = (attribute: string, queries: string[]): string => + new Query( + 'elemMatch', + attribute, + queries.map((query) => JSONbig.parse(query)), + ).toString(); + + /** + * Filter resources where attribute is at a specific distance from the given coordinates. + * + * @param {string} attribute + * @param {any[]} values + * @param {number} distance + * @param {boolean} meters + * @returns {string} + */ + static distanceEqual = ( + attribute: string, + values: any[], + distance: number, + meters: boolean = true, + ): string => + new Query('distanceEqual', attribute, [ + [values, distance, meters], + ] as QueryTypesList).toString(); + + /** + * Filter resources where attribute is not at a specific distance from the given coordinates. + * + * @param {string} attribute + * @param {any[]} values + * @param {number} distance + * @param {boolean} meters + * @returns {string} + */ + static distanceNotEqual = ( + attribute: string, + values: any[], + distance: number, + meters: boolean = true, + ): string => + new Query('distanceNotEqual', attribute, [ + [values, distance, meters], + ] as QueryTypesList).toString(); + + /** + * Filter resources where attribute is at a distance greater than the specified value from the given coordinates. + * + * @param {string} attribute + * @param {any[]} values + * @param {number} distance + * @param {boolean} meters + * @returns {string} + */ + static distanceGreaterThan = ( + attribute: string, + values: any[], + distance: number, + meters: boolean = true, + ): string => + new Query('distanceGreaterThan', attribute, [ + [values, distance, meters], + ] as QueryTypesList).toString(); + + /** + * Filter resources where attribute is at a distance less than the specified value from the given coordinates. + * + * @param {string} attribute + * @param {any[]} values + * @param {number} distance + * @param {boolean} meters + * @returns {string} + */ + static distanceLessThan = ( + attribute: string, + values: any[], + distance: number, + meters: boolean = true, + ): string => + new Query('distanceLessThan', attribute, [ + [values, distance, meters], + ] as QueryTypesList).toString(); + + /** + * Filter resources using vector dot product similarity. + * + * @param {string} attribute + * @param {number[]} vector + * @returns {string} + */ + static vectorDot = (attribute: string, vector: number[]): string => + new Query('vectorDot', attribute, [ + vector, + ] as QueryTypesList).toString(); + + /** + * Filter resources using vector cosine similarity. + * + * @param {string} attribute + * @param {number[]} vector + * @returns {string} + */ + static vectorCosine = (attribute: string, vector: number[]): string => + new Query('vectorCosine', attribute, [ + vector, + ] as QueryTypesList).toString(); + + /** + * Filter resources using vector Euclidean distance. + * + * @param {string} attribute + * @param {number[]} vector + * @returns {string} + */ + static vectorEuclidean = (attribute: string, vector: number[]): string => + new Query('vectorEuclidean', attribute, [ + vector, + ] as QueryTypesList).toString(); + + /** + * Filter resources where attribute intersects with the given geometry. + * + * @param {string} attribute + * @param {any[]} values + * @returns {string} + */ + static intersects = (attribute: string, values: any[]): string => + new Query('intersects', attribute, [values]).toString(); + + /** + * Filter resources where attribute does not intersect with the given geometry. + * + * @param {string} attribute + * @param {any[]} values + * @returns {string} + */ + static notIntersects = (attribute: string, values: any[]): string => + new Query('notIntersects', attribute, [values]).toString(); + + /** + * Filter resources where attribute crosses the given geometry. + * + * @param {string} attribute + * @param {any[]} values + * @returns {string} + */ + static crosses = (attribute: string, values: any[]): string => + new Query('crosses', attribute, [values]).toString(); + + /** + * Filter resources where attribute does not cross the given geometry. + * + * @param {string} attribute + * @param {any[]} values + * @returns {string} + */ + static notCrosses = (attribute: string, values: any[]): string => + new Query('notCrosses', attribute, [values]).toString(); + + /** + * Filter resources where attribute overlaps with the given geometry. + * + * @param {string} attribute + * @param {any[]} values + * @returns {string} + */ + static overlaps = (attribute: string, values: any[]): string => + new Query('overlaps', attribute, [values]).toString(); + + /** + * Filter resources where attribute does not overlap with the given geometry. + * + * @param {string} attribute + * @param {any[]} values + * @returns {string} + */ + static notOverlaps = (attribute: string, values: any[]): string => + new Query('notOverlaps', attribute, [values]).toString(); + + /** + * Filter resources where attribute touches the given geometry. + * + * @param {string} attribute + * @param {any[]} values + * @returns {string} + */ + static touches = (attribute: string, values: any[]): string => + new Query('touches', attribute, [values]).toString(); + + /** + * Filter resources where attribute does not touch the given geometry. + * + * @param {string} attribute + * @param {any[]} values + * @returns {string} + */ + static notTouches = (attribute: string, values: any[]): string => + new Query('notTouches', attribute, [values]).toString(); } diff --git a/src/role.ts b/src/role.ts index 79f8c6b6..51a05aaf 100644 --- a/src/role.ts +++ b/src/role.ts @@ -2,99 +2,98 @@ * Helper class to generate role strings for `Permission`. */ export class Role { - /** * Grants access to anyone. - * + * * This includes authenticated and unauthenticated users. - * + * * @returns {string} */ public static any(): string { - return 'any' + return 'any'; } /** * Grants access to a specific user by user ID. - * + * * You can optionally pass verified or unverified for * `status` to target specific types of users. * - * @param {string} id - * @param {string} status + * @param {string} id + * @param {string} status * @returns {string} */ public static user(id: string, status: string = ''): string { if (status === '') { - return `user:${id}` + return `user:${id}`; } - return `user:${id}/${status}` + return `user:${id}/${status}`; } /** * Grants access to any authenticated or anonymous user. - * + * * You can optionally pass verified or unverified for * `status` to target specific types of users. - * - * @param {string} status + * + * @param {string} status * @returns {string} */ public static users(status: string = ''): string { if (status === '') { - return 'users' + return 'users'; } - return `users/${status}` + return `users/${status}`; } /** * Grants access to any guest user without a session. - * + * * Authenticated users don't have access to this role. - * + * * @returns {string} */ public static guests(): string { - return 'guests' + return 'guests'; } /** * Grants access to a team by team ID. - * + * * You can optionally pass a role for `role` to target * team members with the specified role. - * - * @param {string} id - * @param {string} role + * + * @param {string} id + * @param {string} role * @returns {string} */ public static team(id: string, role: string = ''): string { if (role === '') { - return `team:${id}` + return `team:${id}`; } - return `team:${id}/${role}` + return `team:${id}/${role}`; } /** * Grants access to a specific member of a team. - * + * * When the member is removed from the team, they will * no longer have access. - * - * @param {string} id + * + * @param {string} id * @returns {string} */ public static member(id: string): string { - return `member:${id}` + return `member:${id}`; } /** * Grants access to a user with the specified label. - * - * @param {string} name + * + * @param {string} name * @returns {string} */ public static label(name: string): string { - return `label:${name}` + return `label:${name}`; } -} \ No newline at end of file +} diff --git a/src/service.ts b/src/service.ts index 8b360685..f6020344 100644 --- a/src/service.ts +++ b/src/service.ts @@ -5,7 +5,7 @@ export class Service { /** * The size for chunked uploads in bytes. */ - static CHUNK_SIZE = 5*1024*1024; // 5MB + static CHUNK_SIZE = 5 * 1024 * 1024; // 5MB client: Client; @@ -17,7 +17,7 @@ export class Service { let output: Payload = {}; for (const [key, value] of Object.entries(data)) { - let finalKey = prefix ? prefix + '[' + key +']' : key; + const finalKey = prefix ? prefix + '[' + key + ']' : key; if (Array.isArray(value)) { output = { ...output, ...Service.flatten(value, finalKey) }; } else { @@ -27,4 +27,4 @@ export class Service { return output; } -} \ No newline at end of file +} diff --git a/src/services/account.ts b/src/services/account.ts index a20ffcc5..8450967b 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -1,11 +1,10 @@ import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; +import { AppwriteException, Client, type Payload } from '../client'; import type { Models } from '../models'; import { AuthenticatorType } from '../enums/authenticator-type'; import { AuthenticationFactor } from '../enums/authentication-factor'; import { OAuthProvider } from '../enums/o-auth-provider'; - export class Account { client: Client; @@ -19,23 +18,19 @@ export class Account { * @throws {AppwriteException} * @returns {Promise>} */ - get(): Promise> { - + get< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(): Promise> { const apiPath = '/account'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -48,7 +43,14 @@ export class Account { * @throws {AppwriteException} * @returns {Promise>} */ - create(params: { userId: string, email: string, password: string, name?: string }): Promise>; + create< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { + userId: string; + email: string; + password: string; + name?: string; + }): Promise>; /** * Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession). * @@ -60,24 +62,45 @@ export class Account { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - create(userId: string, email: string, password: string, name?: string): Promise>; create( - paramsOrFirst: { userId: string, email: string, password: string, name?: string } | string, - ...rest: [(string)?, (string)?, (string)?] + userId: string, + email: string, + password: string, + name?: string, + ): Promise>; + create( + paramsOrFirst: + | { userId: string; email: string; password: string; name?: string } + | string, + ...rest: [string?, string?, string?] ): Promise> { - let params: { userId: string, email: string, password: string, name?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, email: string, password: string, name?: string }; + let params: { + userId: string; + email: string; + password: string; + name?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + email: string; + password: string; + name?: string; + }; } else { params = { userId: paramsOrFirst as string, email: rest[0] as string, password: rest[1] as string, - name: rest[2] as string + name: rest[2] as string, }; } - + const userId = params.userId; const email = params.email; const password = params.password; @@ -90,9 +113,10 @@ export class Account { throw new AppwriteException('Missing required parameter: "email"'); } if (typeof password === 'undefined') { - throw new AppwriteException('Missing required parameter: "password"'); + throw new AppwriteException( + 'Missing required parameter: "password"', + ); } - const apiPath = '/account'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -112,32 +136,442 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get a list of the OAuth2 consents the current user has given to third-party apps. + * + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + */ + listConsents(params?: { + queries?: string[]; + total?: boolean; + }): Promise; + /** + * Get a list of the OAuth2 consents the current user has given to third-party apps. + * + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listConsents( + queries?: string[], + total?: boolean, + ): Promise; + listConsents( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] + ): Promise { + let params: { queries?: string[]; total?: boolean }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; + } else { + params = { + queries: paramsOrFirst as string[], + total: rest[0] as boolean, + }; + } + + const queries = params.queries; + const total = params.total; + + const apiPath = '/account/consents'; + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Get an OAuth2 consent the current user has given to a third-party app by its unique ID. + * + * @param {string} params.consentId - Consent unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + getConsent(params: { consentId: string }): Promise; + /** + * Get an OAuth2 consent the current user has given to a third-party app by its unique ID. + * + * @param {string} consentId - Consent unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getConsent(consentId: string): Promise; + getConsent( + paramsOrFirst: { consentId: string } | string, + ): Promise { + let params: { consentId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { consentId: string }; + } else { + params = { + consentId: paramsOrFirst as string, + }; + } + + const consentId = params.consentId; + + if (typeof consentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "consentId"', + ); + } + const apiPath = '/account/consents/{consentId}'.replace( + '{consentId}', + encodeURIComponent(String(consentId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Delete an OAuth2 consent by its unique ID. All token families issued under the consent are revoked, and the app must ask for consent again to regain access. + * + * @param {string} params.consentId - Consent unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteConsent(params: { consentId: string }): Promise<{}>; + /** + * Delete an OAuth2 consent by its unique ID. All token families issued under the consent are revoked, and the app must ask for consent again to regain access. + * + * @param {string} consentId - Consent unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteConsent(consentId: string): Promise<{}>; + deleteConsent(paramsOrFirst: { consentId: string } | string): Promise<{}> { + let params: { consentId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { consentId: string }; + } else { + params = { + consentId: paramsOrFirst as string, + }; + } + + const consentId = params.consentId; + + if (typeof consentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "consentId"', + ); + } + const apiPath = '/account/consents/{consentId}'.replace( + '{consentId}', + encodeURIComponent(String(consentId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } + + /** + * Get a list of the token families issued under an OAuth2 consent. Each entry represents one authorized device or session; the token secrets themselves are never returned. + * + * @param {string} params.consentId - Consent unique ID. + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + */ + listConsentTokens(params: { + consentId: string; + queries?: string[]; + total?: boolean; + }): Promise; + /** + * Get a list of the token families issued under an OAuth2 consent. Each entry represents one authorized device or session; the token secrets themselves are never returned. + * + * @param {string} consentId - Consent unique ID. + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listConsentTokens( + consentId: string, + queries?: string[], + total?: boolean, + ): Promise; + listConsentTokens( + paramsOrFirst: + { consentId: string; queries?: string[]; total?: boolean } | string, + ...rest: [string[]?, boolean?] + ): Promise { + let params: { consentId: string; queries?: string[]; total?: boolean }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + consentId: string; + queries?: string[]; + total?: boolean; + }; + } else { + params = { + consentId: paramsOrFirst as string, + queries: rest[0] as string[], + total: rest[1] as boolean, + }; } - return this.client.call( - 'post', - uri, - apiHeaders, - payload + const consentId = params.consentId; + const queries = params.queries; + const total = params.total; + + if (typeof consentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "consentId"', + ); + } + const apiPath = '/account/consents/{consentId}/tokens'.replace( + '{consentId}', + encodeURIComponent(String(consentId)), ); + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Get a token family issued under an OAuth2 consent by its unique ID. The token secrets themselves are never returned. + * + * @param {string} params.consentId - Consent unique ID. + * @param {string} params.tokenId - Token unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + getConsentToken(params: { + consentId: string; + tokenId: string; + }): Promise; + /** + * Get a token family issued under an OAuth2 consent by its unique ID. The token secrets themselves are never returned. + * + * @param {string} consentId - Consent unique ID. + * @param {string} tokenId - Token unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getConsentToken( + consentId: string, + tokenId: string, + ): Promise; + getConsentToken( + paramsOrFirst: { consentId: string; tokenId: string } | string, + ...rest: [string?] + ): Promise { + let params: { consentId: string; tokenId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + consentId: string; + tokenId: string; + }; + } else { + params = { + consentId: paramsOrFirst as string, + tokenId: rest[0] as string, + }; + } + + const consentId = params.consentId; + const tokenId = params.tokenId; + + if (typeof consentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "consentId"', + ); + } + if (typeof tokenId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "tokenId"', + ); + } + const apiPath = '/account/consents/{consentId}/tokens/{tokenId}' + .replace('{consentId}', encodeURIComponent(String(consentId))) + .replace('{tokenId}', encodeURIComponent(String(tokenId))); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Delete a token family issued under an OAuth2 consent by its unique ID. The access and refresh tokens of the family stop working immediately; other token families and the consent itself are unaffected. + * + * @param {string} params.consentId - Consent unique ID. + * @param {string} params.tokenId - Token unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteConsentToken(params: { + consentId: string; + tokenId: string; + }): Promise<{}>; + /** + * Delete a token family issued under an OAuth2 consent by its unique ID. The access and refresh tokens of the family stop working immediately; other token families and the consent itself are unaffected. + * + * @param {string} consentId - Consent unique ID. + * @param {string} tokenId - Token unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteConsentToken(consentId: string, tokenId: string): Promise<{}>; + deleteConsentToken( + paramsOrFirst: { consentId: string; tokenId: string } | string, + ...rest: [string?] + ): Promise<{}> { + let params: { consentId: string; tokenId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + consentId: string; + tokenId: string; + }; + } else { + params = { + consentId: paramsOrFirst as string, + tokenId: rest[0] as string, + }; + } + + const consentId = params.consentId; + const tokenId = params.tokenId; + + if (typeof consentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "consentId"', + ); + } + if (typeof tokenId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "tokenId"', + ); + } + const apiPath = '/account/consents/{consentId}/tokens/{tokenId}' + .replace('{consentId}', encodeURIComponent(String(consentId))) + .replace('{tokenId}', encodeURIComponent(String(tokenId))); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); } /** * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request. * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. - * + * * * @param {string} params.email - User email. * @param {string} params.password - User password. Must be at least 8 chars. * @throws {AppwriteException} * @returns {Promise>} */ - updateEmail(params: { email: string, password: string }): Promise>; + updateEmail< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { + email: string; + password: string; + }): Promise>; /** * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request. * This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. - * + * * * @param {string} email - User email. * @param {string} password - User password. Must be at least 8 chars. @@ -145,22 +579,33 @@ export class Account { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - updateEmail(email: string, password: string): Promise>; - updateEmail( - paramsOrFirst: { email: string, password: string } | string, - ...rest: [(string)?] + updateEmail< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(email: string, password: string): Promise>; + updateEmail< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + paramsOrFirst: { email: string; password: string } | string, + ...rest: [string?] ): Promise> { - let params: { email: string, password: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { email: string, password: string }; + let params: { email: string; password: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + email: string; + password: string; + }; } else { params = { email: paramsOrFirst as string, - password: rest[0] as string + password: rest[0] as string, }; } - + const email = params.email; const password = params.password; @@ -168,9 +613,10 @@ export class Account { throw new AppwriteException('Missing required parameter: "email"'); } if (typeof password === 'undefined') { - throw new AppwriteException('Missing required parameter: "password"'); + throw new AppwriteException( + 'Missing required parameter: "password"', + ); } - const apiPath = '/account/email'; const payload: Payload = {}; if (typeof email !== 'undefined') { @@ -184,15 +630,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -203,7 +644,10 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - listIdentities(params?: { queries?: string[], total?: boolean }): Promise; + listIdentities(params?: { + queries?: string[]; + total?: boolean; + }): Promise; /** * Get the list of identities for the currently logged in user. * @@ -213,26 +657,36 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listIdentities(queries?: string[], total?: boolean): Promise; listIdentities( - paramsOrFirst?: { queries?: string[], total?: boolean } | string[], - ...rest: [(boolean)?] + queries?: string[], + total?: boolean, + ): Promise; + listIdentities( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[], total?: boolean }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { queries?: string[], total?: boolean }; + let params: { queries?: string[]; total?: boolean }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], - total: rest[0] as boolean + total: rest[0] as boolean, }; } - + const queries = params.queries; const total = params.total; - const apiPath = '/account/identities'; const payload: Payload = {}; if (typeof queries !== 'undefined') { @@ -245,15 +699,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -274,39 +723,42 @@ export class Account { */ deleteIdentity(identityId: string): Promise<{}>; deleteIdentity( - paramsOrFirst: { identityId: string } | string + paramsOrFirst: { identityId: string } | string, ): Promise<{}> { let params: { identityId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { identityId: string }; } else { params = { - identityId: paramsOrFirst as string + identityId: paramsOrFirst as string, }; } - + const identityId = params.identityId; if (typeof identityId === 'undefined') { - throw new AppwriteException('Missing required parameter: "identityId"'); + throw new AppwriteException( + 'Missing required parameter: "identityId"', + ); } - - const apiPath = '/account/identities/{identityId}'.replace('{identityId}', encodeURIComponent(String(identityId))); + const apiPath = '/account/identities/{identityId}'.replace( + '{identityId}', + encodeURIComponent(String(identityId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** @@ -327,20 +779,24 @@ export class Account { */ createJWT(duration?: number): Promise; createJWT( - paramsOrFirst?: { duration?: number } | number + paramsOrFirst?: { duration?: number } | number, ): Promise { let params: { duration?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { params = (paramsOrFirst || {}) as { duration?: number }; } else { params = { - duration: paramsOrFirst as number + duration: paramsOrFirst as number, }; } - - const duration = params.duration; + const duration = params.duration; const apiPath = '/account/jwts'; const payload: Payload = {}; @@ -352,15 +808,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -371,7 +822,10 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - listLogs(params?: { queries?: string[], total?: boolean }): Promise; + listLogs(params?: { + queries?: string[]; + total?: boolean; + }): Promise; /** * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log. * @@ -383,24 +837,31 @@ export class Account { */ listLogs(queries?: string[], total?: boolean): Promise; listLogs( - paramsOrFirst?: { queries?: string[], total?: boolean } | string[], - ...rest: [(boolean)?] + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[], total?: boolean }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { queries?: string[], total?: boolean }; + let params: { queries?: string[]; total?: boolean }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], - total: rest[0] as boolean + total: rest[0] as boolean, }; } - + const queries = params.queries; const total = params.total; - const apiPath = '/account/logs'; const payload: Payload = {}; if (typeof queries !== 'undefined') { @@ -413,15 +874,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -431,7 +887,9 @@ export class Account { * @throws {AppwriteException} * @returns {Promise>} */ - updateMFA(params: { mfa: boolean }): Promise>; + updateMFA< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { mfa: boolean }): Promise>; /** * Enable or disable MFA on an account. * @@ -440,26 +898,33 @@ export class Account { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - updateMFA(mfa: boolean): Promise>; - updateMFA( - paramsOrFirst: { mfa: boolean } | boolean + updateMFA< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(mfa: boolean): Promise>; + updateMFA< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + paramsOrFirst: { mfa: boolean } | boolean, ): Promise> { let params: { mfa: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { mfa: boolean }; } else { params = { - mfa: paramsOrFirst as boolean + mfa: paramsOrFirst as boolean, }; } - + const mfa = params.mfa; if (typeof mfa === 'undefined') { throw new AppwriteException('Missing required parameter: "mfa"'); } - const apiPath = '/account/mfa'; const payload: Payload = {}; if (typeof mfa !== 'undefined') { @@ -470,15 +935,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -489,7 +949,9 @@ export class Account { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `Account.createMFAAuthenticator` instead. */ - createMfaAuthenticator(params: { type: AuthenticatorType }): Promise; + createMfaAuthenticator(params: { + type: AuthenticatorType; + }): Promise; /** * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method. * @@ -500,40 +962,42 @@ export class Account { */ createMfaAuthenticator(type: AuthenticatorType): Promise; createMfaAuthenticator( - paramsOrFirst: { type: AuthenticatorType } | AuthenticatorType + paramsOrFirst: { type: AuthenticatorType } | AuthenticatorType, ): Promise { let params: { type: AuthenticatorType }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + 'type' in paramsOrFirst + ) { params = (paramsOrFirst || {}) as { type: AuthenticatorType }; } else { params = { - type: paramsOrFirst as AuthenticatorType + type: paramsOrFirst as AuthenticatorType, }; } - + const type = params.type; if (typeof type === 'undefined') { throw new AppwriteException('Missing required parameter: "type"'); } - - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); + const apiPath = '/account/mfa/authenticators/{type}'.replace( + '{type}', + encodeURIComponent(String(type)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -543,7 +1007,9 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - createMFAAuthenticator(params: { type: AuthenticatorType }): Promise; + createMFAAuthenticator(params: { + type: AuthenticatorType; + }): Promise; /** * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method. * @@ -554,40 +1020,42 @@ export class Account { */ createMFAAuthenticator(type: AuthenticatorType): Promise; createMFAAuthenticator( - paramsOrFirst: { type: AuthenticatorType } | AuthenticatorType + paramsOrFirst: { type: AuthenticatorType } | AuthenticatorType, ): Promise { let params: { type: AuthenticatorType }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + 'type' in paramsOrFirst + ) { params = (paramsOrFirst || {}) as { type: AuthenticatorType }; } else { params = { - type: paramsOrFirst as AuthenticatorType + type: paramsOrFirst as AuthenticatorType, }; } - + const type = params.type; if (typeof type === 'undefined') { throw new AppwriteException('Missing required parameter: "type"'); } - - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); + const apiPath = '/account/mfa/authenticators/{type}'.replace( + '{type}', + encodeURIComponent(String(type)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -599,7 +1067,12 @@ export class Account { * @returns {Promise>} * @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateMFAAuthenticator` instead. */ - updateMfaAuthenticator(params: { type: AuthenticatorType, otp: string }): Promise>; + updateMfaAuthenticator< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { + type: AuthenticatorType; + otp: string; + }): Promise>; /** * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. * @@ -609,22 +1082,35 @@ export class Account { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - updateMfaAuthenticator(type: AuthenticatorType, otp: string): Promise>; - updateMfaAuthenticator( - paramsOrFirst: { type: AuthenticatorType, otp: string } | AuthenticatorType, - ...rest: [(string)?] + updateMfaAuthenticator< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(type: AuthenticatorType, otp: string): Promise>; + updateMfaAuthenticator< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + paramsOrFirst: + { type: AuthenticatorType; otp: string } | AuthenticatorType, + ...rest: [string?] ): Promise> { - let params: { type: AuthenticatorType, otp: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) { - params = (paramsOrFirst || {}) as { type: AuthenticatorType, otp: string }; + let params: { type: AuthenticatorType; otp: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + ('type' in paramsOrFirst || 'otp' in paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + type: AuthenticatorType; + otp: string; + }; } else { params = { type: paramsOrFirst as AuthenticatorType, - otp: rest[0] as string + otp: rest[0] as string, }; } - + const type = params.type; const otp = params.otp; @@ -634,8 +1120,10 @@ export class Account { if (typeof otp === 'undefined') { throw new AppwriteException('Missing required parameter: "otp"'); } - - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); + const apiPath = '/account/mfa/authenticators/{type}'.replace( + '{type}', + encodeURIComponent(String(type)), + ); const payload: Payload = {}; if (typeof otp !== 'undefined') { payload['otp'] = otp; @@ -645,15 +1133,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -664,7 +1147,12 @@ export class Account { * @throws {AppwriteException} * @returns {Promise>} */ - updateMFAAuthenticator(params: { type: AuthenticatorType, otp: string }): Promise>; + updateMFAAuthenticator< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { + type: AuthenticatorType; + otp: string; + }): Promise>; /** * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. * @@ -674,22 +1162,35 @@ export class Account { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - updateMFAAuthenticator(type: AuthenticatorType, otp: string): Promise>; - updateMFAAuthenticator( - paramsOrFirst: { type: AuthenticatorType, otp: string } | AuthenticatorType, - ...rest: [(string)?] + updateMFAAuthenticator< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(type: AuthenticatorType, otp: string): Promise>; + updateMFAAuthenticator< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + paramsOrFirst: + { type: AuthenticatorType; otp: string } | AuthenticatorType, + ...rest: [string?] ): Promise> { - let params: { type: AuthenticatorType, otp: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) { - params = (paramsOrFirst || {}) as { type: AuthenticatorType, otp: string }; + let params: { type: AuthenticatorType; otp: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + ('type' in paramsOrFirst || 'otp' in paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + type: AuthenticatorType; + otp: string; + }; } else { params = { type: paramsOrFirst as AuthenticatorType, - otp: rest[0] as string + otp: rest[0] as string, }; } - + const type = params.type; const otp = params.otp; @@ -699,8 +1200,10 @@ export class Account { if (typeof otp === 'undefined') { throw new AppwriteException('Missing required parameter: "otp"'); } - - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); + const apiPath = '/account/mfa/authenticators/{type}'.replace( + '{type}', + encodeURIComponent(String(type)), + ); const payload: Payload = {}; if (typeof otp !== 'undefined') { payload['otp'] = otp; @@ -710,15 +1213,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -740,39 +1238,41 @@ export class Account { */ deleteMfaAuthenticator(type: AuthenticatorType): Promise<{}>; deleteMfaAuthenticator( - paramsOrFirst: { type: AuthenticatorType } | AuthenticatorType + paramsOrFirst: { type: AuthenticatorType } | AuthenticatorType, ): Promise<{}> { let params: { type: AuthenticatorType }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + 'type' in paramsOrFirst + ) { params = (paramsOrFirst || {}) as { type: AuthenticatorType }; } else { params = { - type: paramsOrFirst as AuthenticatorType + type: paramsOrFirst as AuthenticatorType, }; } - + const type = params.type; if (typeof type === 'undefined') { throw new AppwriteException('Missing required parameter: "type"'); } - - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); + const apiPath = '/account/mfa/authenticators/{type}'.replace( + '{type}', + encodeURIComponent(String(type)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** @@ -793,78 +1293,88 @@ export class Account { */ deleteMFAAuthenticator(type: AuthenticatorType): Promise<{}>; deleteMFAAuthenticator( - paramsOrFirst: { type: AuthenticatorType } | AuthenticatorType + paramsOrFirst: { type: AuthenticatorType } | AuthenticatorType, ): Promise<{}> { let params: { type: AuthenticatorType }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + 'type' in paramsOrFirst + ) { params = (paramsOrFirst || {}) as { type: AuthenticatorType }; } else { params = { - type: paramsOrFirst as AuthenticatorType + type: paramsOrFirst as AuthenticatorType, }; } - + const type = params.type; if (typeof type === 'undefined') { throw new AppwriteException('Missing required parameter: "type"'); } - - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); + const apiPath = '/account/mfa/authenticators/{type}'.replace( + '{type}', + encodeURIComponent(String(type)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. * - * @param {AuthenticationFactor} params.factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`. + * @param {AuthenticationFactor} params.factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`, `custom`. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `Account.createMFAChallenge` instead. */ - createMfaChallenge(params: { factor: AuthenticationFactor }): Promise; + createMfaChallenge(params: { + factor: AuthenticationFactor; + }): Promise; /** * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. * - * @param {AuthenticationFactor} factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`. + * @param {AuthenticationFactor} factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`, `custom`. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createMfaChallenge(factor: AuthenticationFactor): Promise; createMfaChallenge( - paramsOrFirst: { factor: AuthenticationFactor } | AuthenticationFactor + factor: AuthenticationFactor, + ): Promise; + createMfaChallenge( + paramsOrFirst: { factor: AuthenticationFactor } | AuthenticationFactor, ): Promise { let params: { factor: AuthenticationFactor }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + 'factor' in paramsOrFirst + ) { params = (paramsOrFirst || {}) as { factor: AuthenticationFactor }; } else { params = { - factor: paramsOrFirst as AuthenticationFactor + factor: paramsOrFirst as AuthenticationFactor, }; } - + const factor = params.factor; if (typeof factor === 'undefined') { throw new AppwriteException('Missing required parameter: "factor"'); } - const apiPath = '/account/mfa/challenges'; const payload: Payload = {}; if (typeof factor !== 'undefined') { @@ -875,53 +1385,56 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. * - * @param {AuthenticationFactor} params.factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`. + * @param {AuthenticationFactor} params.factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`, `custom`. * @throws {AppwriteException} * @returns {Promise} */ - createMFAChallenge(params: { factor: AuthenticationFactor }): Promise; + createMFAChallenge(params: { + factor: AuthenticationFactor; + }): Promise; /** * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. * - * @param {AuthenticationFactor} factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`. + * @param {AuthenticationFactor} factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`, `custom`. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createMFAChallenge(factor: AuthenticationFactor): Promise; createMFAChallenge( - paramsOrFirst: { factor: AuthenticationFactor } | AuthenticationFactor + factor: AuthenticationFactor, + ): Promise; + createMFAChallenge( + paramsOrFirst: { factor: AuthenticationFactor } | AuthenticationFactor, ): Promise { let params: { factor: AuthenticationFactor }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + 'factor' in paramsOrFirst + ) { params = (paramsOrFirst || {}) as { factor: AuthenticationFactor }; } else { params = { - factor: paramsOrFirst as AuthenticationFactor + factor: paramsOrFirst as AuthenticationFactor, }; } - + const factor = params.factor; if (typeof factor === 'undefined') { throw new AppwriteException('Missing required parameter: "factor"'); } - const apiPath = '/account/mfa/challenges'; const payload: Payload = {}; if (typeof factor !== 'undefined') { @@ -932,15 +1445,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -952,7 +1460,10 @@ export class Account { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateMFAChallenge` instead. */ - updateMfaChallenge(params: { challengeId: string, otp: string }): Promise; + updateMfaChallenge(params: { + challengeId: string; + otp: string; + }): Promise; /** * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. * @@ -962,32 +1473,43 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateMfaChallenge(challengeId: string, otp: string): Promise; updateMfaChallenge( - paramsOrFirst: { challengeId: string, otp: string } | string, - ...rest: [(string)?] + challengeId: string, + otp: string, + ): Promise; + updateMfaChallenge( + paramsOrFirst: { challengeId: string; otp: string } | string, + ...rest: [string?] ): Promise { - let params: { challengeId: string, otp: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { challengeId: string, otp: string }; + let params: { challengeId: string; otp: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + challengeId: string; + otp: string; + }; } else { params = { challengeId: paramsOrFirst as string, - otp: rest[0] as string + otp: rest[0] as string, }; } - + const challengeId = params.challengeId; const otp = params.otp; if (typeof challengeId === 'undefined') { - throw new AppwriteException('Missing required parameter: "challengeId"'); + throw new AppwriteException( + 'Missing required parameter: "challengeId"', + ); } if (typeof otp === 'undefined') { throw new AppwriteException('Missing required parameter: "otp"'); } - const apiPath = '/account/mfa/challenges'; const payload: Payload = {}; if (typeof challengeId !== 'undefined') { @@ -1001,15 +1523,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -1020,7 +1537,10 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - updateMFAChallenge(params: { challengeId: string, otp: string }): Promise; + updateMFAChallenge(params: { + challengeId: string; + otp: string; + }): Promise; /** * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. * @@ -1030,32 +1550,43 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateMFAChallenge(challengeId: string, otp: string): Promise; updateMFAChallenge( - paramsOrFirst: { challengeId: string, otp: string } | string, - ...rest: [(string)?] + challengeId: string, + otp: string, + ): Promise; + updateMFAChallenge( + paramsOrFirst: { challengeId: string; otp: string } | string, + ...rest: [string?] ): Promise { - let params: { challengeId: string, otp: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { challengeId: string, otp: string }; + let params: { challengeId: string; otp: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + challengeId: string; + otp: string; + }; } else { params = { challengeId: paramsOrFirst as string, - otp: rest[0] as string + otp: rest[0] as string, }; } - + const challengeId = params.challengeId; const otp = params.otp; if (typeof challengeId === 'undefined') { - throw new AppwriteException('Missing required parameter: "challengeId"'); + throw new AppwriteException( + 'Missing required parameter: "challengeId"', + ); } if (typeof otp === 'undefined') { throw new AppwriteException('Missing required parameter: "otp"'); } - const apiPath = '/account/mfa/challenges'; const payload: Payload = {}; if (typeof challengeId !== 'undefined') { @@ -1069,15 +1600,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -1088,22 +1614,16 @@ export class Account { * @deprecated This API has been deprecated since 1.8.0. Please use `Account.listMFAFactors` instead. */ listMfaFactors(): Promise { - const apiPath = '/account/mfa/factors'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -1113,22 +1633,16 @@ export class Account { * @returns {Promise} */ listMFAFactors(): Promise { - const apiPath = '/account/mfa/factors'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -1139,22 +1653,16 @@ export class Account { * @deprecated This API has been deprecated since 1.8.0. Please use `Account.getMFARecoveryCodes` instead. */ getMfaRecoveryCodes(): Promise { - const apiPath = '/account/mfa/recovery-codes'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -1164,22 +1672,16 @@ export class Account { * @returns {Promise} */ getMFARecoveryCodes(): Promise { - const apiPath = '/account/mfa/recovery-codes'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -1190,7 +1692,6 @@ export class Account { * @deprecated This API has been deprecated since 1.8.0. Please use `Account.createMFARecoveryCodes` instead. */ createMfaRecoveryCodes(): Promise { - const apiPath = '/account/mfa/recovery-codes'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1198,15 +1699,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -1216,7 +1712,6 @@ export class Account { * @returns {Promise} */ createMFARecoveryCodes(): Promise { - const apiPath = '/account/mfa/recovery-codes'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1224,15 +1719,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -1243,7 +1733,6 @@ export class Account { * @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateMFARecoveryCodes` instead. */ updateMfaRecoveryCodes(): Promise { - const apiPath = '/account/mfa/recovery-codes'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1251,15 +1740,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -1269,7 +1753,6 @@ export class Account { * @returns {Promise} */ updateMFARecoveryCodes(): Promise { - const apiPath = '/account/mfa/recovery-codes'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1277,15 +1760,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -1295,7 +1773,9 @@ export class Account { * @throws {AppwriteException} * @returns {Promise>} */ - updateName(params: { name: string }): Promise>; + updateName< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { name: string }): Promise>; /** * Update currently logged in user account name. * @@ -1304,26 +1784,33 @@ export class Account { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - updateName(name: string): Promise>; - updateName( - paramsOrFirst: { name: string } | string + updateName< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(name: string): Promise>; + updateName< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + paramsOrFirst: { name: string } | string, ): Promise> { let params: { name: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { name: string }; } else { params = { - name: paramsOrFirst as string + name: paramsOrFirst as string, }; } - + const name = params.name; if (typeof name === 'undefined') { throw new AppwriteException('Missing required parameter: "name"'); } - const apiPath = '/account/name'; const payload: Payload = {}; if (typeof name !== 'undefined') { @@ -1334,15 +1821,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -1353,7 +1835,12 @@ export class Account { * @throws {AppwriteException} * @returns {Promise>} */ - updatePassword(params: { password: string, oldPassword?: string }): Promise>; + updatePassword< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { + password: string; + oldPassword?: string; + }): Promise>; /** * Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional. * @@ -1363,29 +1850,44 @@ export class Account { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePassword(password: string, oldPassword?: string): Promise>; - updatePassword( - paramsOrFirst: { password: string, oldPassword?: string } | string, - ...rest: [(string)?] + updatePassword< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + password: string, + oldPassword?: string, + ): Promise>; + updatePassword< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + paramsOrFirst: { password: string; oldPassword?: string } | string, + ...rest: [string?] ): Promise> { - let params: { password: string, oldPassword?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { password: string, oldPassword?: string }; + let params: { password: string; oldPassword?: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + password: string; + oldPassword?: string; + }; } else { params = { password: paramsOrFirst as string, - oldPassword: rest[0] as string + oldPassword: rest[0] as string, }; } - + const password = params.password; const oldPassword = params.oldPassword; if (typeof password === 'undefined') { - throw new AppwriteException('Missing required parameter: "password"'); + throw new AppwriteException( + 'Missing required parameter: "password"', + ); } - const apiPath = '/account/password'; const payload: Payload = {}; if (typeof password !== 'undefined') { @@ -1399,15 +1901,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -1418,7 +1915,12 @@ export class Account { * @throws {AppwriteException} * @returns {Promise>} */ - updatePhone(params: { phone: string, password: string }): Promise>; + updatePhone< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { + phone: string; + password: string; + }): Promise>; /** * Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. * @@ -1428,22 +1930,33 @@ export class Account { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePhone(phone: string, password: string): Promise>; - updatePhone( - paramsOrFirst: { phone: string, password: string } | string, - ...rest: [(string)?] + updatePhone< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(phone: string, password: string): Promise>; + updatePhone< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + paramsOrFirst: { phone: string; password: string } | string, + ...rest: [string?] ): Promise> { - let params: { phone: string, password: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { phone: string, password: string }; + let params: { phone: string; password: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + phone: string; + password: string; + }; } else { params = { phone: paramsOrFirst as string, - password: rest[0] as string + password: rest[0] as string, }; } - + const phone = params.phone; const password = params.password; @@ -1451,9 +1964,10 @@ export class Account { throw new AppwriteException('Missing required parameter: "phone"'); } if (typeof password === 'undefined') { - throw new AppwriteException('Missing required parameter: "password"'); + throw new AppwriteException( + 'Missing required parameter: "password"', + ); } - const apiPath = '/account/phone'; const payload: Payload = {}; if (typeof phone !== 'undefined') { @@ -1467,15 +1981,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -1484,23 +1993,19 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - getPrefs(): Promise { - + getPrefs< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(): Promise { const apiPath = '/account/prefs'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -1510,7 +2015,11 @@ export class Account { * @throws {AppwriteException} * @returns {Promise>} */ - updatePrefs(params: { prefs: Partial }): Promise>; + updatePrefs< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { + prefs: Partial; + }): Promise>; /** * Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded. * @@ -1519,26 +2028,34 @@ export class Account { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePrefs(prefs: Partial): Promise>; - updatePrefs( - paramsOrFirst: { prefs: Partial } | Partial + updatePrefs< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(prefs: Partial): Promise>; + updatePrefs< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + paramsOrFirst: { prefs: Partial } | Partial, ): Promise> { let params: { prefs: Partial }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('prefs' in paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + 'prefs' in paramsOrFirst + ) { params = (paramsOrFirst || {}) as { prefs: Partial }; } else { params = { - prefs: paramsOrFirst as Partial + prefs: paramsOrFirst as Partial, }; } - + const prefs = params.prefs; if (typeof prefs === 'undefined') { throw new AppwriteException('Missing required parameter: "prefs"'); } - const apiPath = '/account/prefs'; const payload: Payload = {}; if (typeof prefs !== 'undefined') { @@ -1549,15 +2066,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -1568,7 +2080,10 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - createRecovery(params: { email: string, url: string }): Promise; + createRecovery(params: { + email: string; + url: string; + }): Promise; /** * Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. * @@ -1580,20 +2095,24 @@ export class Account { */ createRecovery(email: string, url: string): Promise; createRecovery( - paramsOrFirst: { email: string, url: string } | string, - ...rest: [(string)?] + paramsOrFirst: { email: string; url: string } | string, + ...rest: [string?] ): Promise { - let params: { email: string, url: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { email: string, url: string }; + let params: { email: string; url: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { email: string; url: string }; } else { params = { email: paramsOrFirst as string, - url: rest[0] as string + url: rest[0] as string, }; } - + const email = params.email; const url = params.url; @@ -1603,7 +2122,6 @@ export class Account { if (typeof url === 'undefined') { throw new AppwriteException('Missing required parameter: "url"'); } - const apiPath = '/account/recovery'; const payload: Payload = {}; if (typeof email !== 'undefined') { @@ -1617,20 +2135,15 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. - * + * * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * * @param {string} params.userId - User ID. @@ -1639,10 +2152,14 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - updateRecovery(params: { userId: string, secret: string, password: string }): Promise; + updateRecovery(params: { + userId: string; + secret: string; + password: string; + }): Promise; /** * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. - * + * * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * * @param {string} userId - User ID. @@ -1652,23 +2169,36 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateRecovery(userId: string, secret: string, password: string): Promise; updateRecovery( - paramsOrFirst: { userId: string, secret: string, password: string } | string, - ...rest: [(string)?, (string)?] + userId: string, + secret: string, + password: string, + ): Promise; + updateRecovery( + paramsOrFirst: + { userId: string; secret: string; password: string } | string, + ...rest: [string?, string?] ): Promise { - let params: { userId: string, secret: string, password: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, secret: string, password: string }; + let params: { userId: string; secret: string; password: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + secret: string; + password: string; + }; } else { params = { userId: paramsOrFirst as string, secret: rest[0] as string, - password: rest[1] as string + password: rest[1] as string, }; } - + const userId = params.userId; const secret = params.secret; const password = params.password; @@ -1680,9 +2210,10 @@ export class Account { throw new AppwriteException('Missing required parameter: "secret"'); } if (typeof password === 'undefined') { - throw new AppwriteException('Missing required parameter: "password"'); + throw new AppwriteException( + 'Missing required parameter: "password"', + ); } - const apiPath = '/account/recovery'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -1699,15 +2230,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -1717,22 +2243,16 @@ export class Account { * @returns {Promise} */ listSessions(): Promise { - const apiPath = '/account/sessions'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -1742,7 +2262,6 @@ export class Account { * @returns {Promise<{}>} */ deleteSessions(): Promise<{}> { - const apiPath = '/account/sessions'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1750,14 +2269,9 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** @@ -1767,7 +2281,6 @@ export class Account { * @returns {Promise} */ createAnonymousSession(): Promise { - const apiPath = '/account/sessions/anonymous'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1775,20 +2288,15 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param {string} params.email - User email. @@ -1796,10 +2304,13 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - createEmailPasswordSession(params: { email: string, password: string }): Promise; + createEmailPasswordSession(params: { + email: string; + password: string; + }): Promise; /** * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param {string} email - User email. @@ -1808,22 +2319,32 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createEmailPasswordSession(email: string, password: string): Promise; createEmailPasswordSession( - paramsOrFirst: { email: string, password: string } | string, - ...rest: [(string)?] + email: string, + password: string, + ): Promise; + createEmailPasswordSession( + paramsOrFirst: { email: string; password: string } | string, + ...rest: [string?] ): Promise { - let params: { email: string, password: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { email: string, password: string }; + let params: { email: string; password: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + email: string; + password: string; + }; } else { params = { email: paramsOrFirst as string, - password: rest[0] as string + password: rest[0] as string, }; } - + const email = params.email; const password = params.password; @@ -1831,9 +2352,10 @@ export class Account { throw new AppwriteException('Missing required parameter: "email"'); } if (typeof password === 'undefined') { - throw new AppwriteException('Missing required parameter: "password"'); + throw new AppwriteException( + 'Missing required parameter: "password"', + ); } - const apiPath = '/account/sessions/email'; const payload: Payload = {}; if (typeof email !== 'undefined') { @@ -1847,15 +2369,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -1867,7 +2384,10 @@ export class Account { * @returns {Promise} * @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead. */ - updateMagicURLSession(params: { userId: string, secret: string }): Promise; + updateMagicURLSession(params: { + userId: string; + secret: string; + }): Promise; /** * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. * @@ -1877,22 +2397,32 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateMagicURLSession(userId: string, secret: string): Promise; updateMagicURLSession( - paramsOrFirst: { userId: string, secret: string } | string, - ...rest: [(string)?] + userId: string, + secret: string, + ): Promise; + updateMagicURLSession( + paramsOrFirst: { userId: string; secret: string } | string, + ...rest: [string?] ): Promise { - let params: { userId: string, secret: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, secret: string }; + let params: { userId: string; secret: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + secret: string; + }; } else { params = { userId: paramsOrFirst as string, - secret: rest[0] as string + secret: rest[0] as string, }; } - + const userId = params.userId; const secret = params.secret; @@ -1902,7 +2432,6 @@ export class Account { if (typeof secret === 'undefined') { throw new AppwriteException('Missing required parameter: "secret"'); } - const apiPath = '/account/sessions/magic-url'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -1916,42 +2445,42 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. - * + * * If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). - * * - * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * + * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. * @throws {AppwriteException} * @returns {void | string} */ - createOAuth2Session(params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] }): void | string; + createOAuth2Session(params: { + provider: OAuthProvider; + success?: string; + failure?: string; + scopes?: string[]; + }): void | string; /** * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. - * + * * If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). - * * - * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * + * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. @@ -1959,34 +2488,68 @@ export class Account { * @returns {void | string} * @deprecated Use the object parameter style method for a better developer experience. */ - createOAuth2Session(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): void | string; createOAuth2Session( - paramsOrFirst: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] } | OAuthProvider, - ...rest: [(string)?, (string)?, (string[])?] + provider: OAuthProvider, + success?: string, + failure?: string, + scopes?: string[], + ): void | string; + createOAuth2Session( + paramsOrFirst: + | { + provider: OAuthProvider; + success?: string; + failure?: string; + scopes?: string[]; + } + | OAuthProvider, + ...rest: [string?, string?, string[]?] ): void | string { - let params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) { - params = (paramsOrFirst || {}) as { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] }; + let params: { + provider: OAuthProvider; + success?: string; + failure?: string; + scopes?: string[]; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + ('provider' in paramsOrFirst || + 'success' in paramsOrFirst || + 'failure' in paramsOrFirst || + 'scopes' in paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + provider: OAuthProvider; + success?: string; + failure?: string; + scopes?: string[]; + }; } else { params = { provider: paramsOrFirst as OAuthProvider, success: rest[0] as string, failure: rest[1] as string, - scopes: rest[2] as string[] + scopes: rest[2] as string[], }; } - + const provider = params.provider; const success = params.success; const failure = params.failure; const scopes = params.scopes; if (typeof provider === 'undefined') { - throw new AppwriteException('Missing required parameter: "provider"'); + throw new AppwriteException( + 'Missing required parameter: "provider"', + ); } - - const apiPath = '/account/sessions/oauth2/{provider}'.replace('{provider}', encodeURIComponent(String(provider))); + const apiPath = '/account/sessions/oauth2/{provider}'.replace( + '{provider}', + encodeURIComponent(String(provider)), + ); const payload: Payload = {}; if (typeof success !== 'undefined') { payload['success'] = success; @@ -1999,17 +2562,12 @@ export class Account { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'text/html', - } - payload['project'] = this.client.config.project; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + if (typeof window !== 'undefined' && window?.location) { window.location.href = uri.toString(); return; @@ -2027,7 +2585,10 @@ export class Account { * @returns {Promise} * @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead. */ - updatePhoneSession(params: { userId: string, secret: string }): Promise; + updatePhoneSession(params: { + userId: string; + secret: string; + }): Promise; /** * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. * @@ -2039,20 +2600,27 @@ export class Account { */ updatePhoneSession(userId: string, secret: string): Promise; updatePhoneSession( - paramsOrFirst: { userId: string, secret: string } | string, - ...rest: [(string)?] + paramsOrFirst: { userId: string; secret: string } | string, + ...rest: [string?] ): Promise { - let params: { userId: string, secret: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, secret: string }; + let params: { userId: string; secret: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + secret: string; + }; } else { params = { userId: paramsOrFirst as string, - secret: rest[0] as string + secret: rest[0] as string, }; } - + const userId = params.userId; const secret = params.secret; @@ -2062,7 +2630,6 @@ export class Account { if (typeof secret === 'undefined') { throw new AppwriteException('Missing required parameter: "secret"'); } - const apiPath = '/account/sessions/phone'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -2076,15 +2643,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -2095,7 +2657,10 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - createSession(params: { userId: string, secret: string }): Promise; + createSession(params: { + userId: string; + secret: string; + }): Promise; /** * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. * @@ -2107,20 +2672,27 @@ export class Account { */ createSession(userId: string, secret: string): Promise; createSession( - paramsOrFirst: { userId: string, secret: string } | string, - ...rest: [(string)?] + paramsOrFirst: { userId: string; secret: string } | string, + ...rest: [string?] ): Promise { - let params: { userId: string, secret: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, secret: string }; + let params: { userId: string; secret: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + secret: string; + }; } else { params = { userId: paramsOrFirst as string, - secret: rest[0] as string + secret: rest[0] as string, }; } - + const userId = params.userId; const secret = params.secret; @@ -2130,7 +2702,6 @@ export class Account { if (typeof secret === 'undefined') { throw new AppwriteException('Missing required parameter: "secret"'); } - const apiPath = '/account/sessions/token'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -2144,15 +2715,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -2173,39 +2739,42 @@ export class Account { */ getSession(sessionId: string): Promise; getSession( - paramsOrFirst: { sessionId: string } | string + paramsOrFirst: { sessionId: string } | string, ): Promise { let params: { sessionId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { sessionId: string }; } else { params = { - sessionId: paramsOrFirst as string + sessionId: paramsOrFirst as string, }; } - + const sessionId = params.sessionId; if (typeof sessionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "sessionId"'); + throw new AppwriteException( + 'Missing required parameter: "sessionId"', + ); } - - const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', encodeURIComponent(String(sessionId))); + const apiPath = '/account/sessions/{sessionId}'.replace( + '{sessionId}', + encodeURIComponent(String(sessionId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -2226,40 +2795,43 @@ export class Account { */ updateSession(sessionId: string): Promise; updateSession( - paramsOrFirst: { sessionId: string } | string + paramsOrFirst: { sessionId: string } | string, ): Promise { let params: { sessionId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { sessionId: string }; } else { params = { - sessionId: paramsOrFirst as string + sessionId: paramsOrFirst as string, }; } - + const sessionId = params.sessionId; if (typeof sessionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "sessionId"'); + throw new AppwriteException( + 'Missing required parameter: "sessionId"', + ); } - - const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', encodeURIComponent(String(sessionId))); + const apiPath = '/account/sessions/{sessionId}'.replace( + '{sessionId}', + encodeURIComponent(String(sessionId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -2279,40 +2851,41 @@ export class Account { * @deprecated Use the object parameter style method for a better developer experience. */ deleteSession(sessionId: string): Promise<{}>; - deleteSession( - paramsOrFirst: { sessionId: string } | string - ): Promise<{}> { + deleteSession(paramsOrFirst: { sessionId: string } | string): Promise<{}> { let params: { sessionId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { sessionId: string }; } else { params = { - sessionId: paramsOrFirst as string + sessionId: paramsOrFirst as string, }; } - + const sessionId = params.sessionId; if (typeof sessionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "sessionId"'); + throw new AppwriteException( + 'Missing required parameter: "sessionId"', + ); } - - const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', encodeURIComponent(String(sessionId))); + const apiPath = '/account/sessions/{sessionId}'.replace( + '{sessionId}', + encodeURIComponent(String(sessionId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** @@ -2321,8 +2894,9 @@ export class Account { * @throws {AppwriteException} * @returns {Promise>} */ - updateStatus(): Promise> { - + updateStatus< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(): Promise> { const apiPath = '/account/status'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2330,15 +2904,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -2350,7 +2919,11 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - createPushTarget(params: { targetId: string, identifier: string, providerId?: string }): Promise; + createPushTarget(params: { + targetId: string; + identifier: string; + providerId?: string; + }): Promise; /** * Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. * @@ -2361,34 +2934,55 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createPushTarget(targetId: string, identifier: string, providerId?: string): Promise; createPushTarget( - paramsOrFirst: { targetId: string, identifier: string, providerId?: string } | string, - ...rest: [(string)?, (string)?] + targetId: string, + identifier: string, + providerId?: string, + ): Promise; + createPushTarget( + paramsOrFirst: + | { targetId: string; identifier: string; providerId?: string } + | string, + ...rest: [string?, string?] ): Promise { - let params: { targetId: string, identifier: string, providerId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { targetId: string, identifier: string, providerId?: string }; + let params: { + targetId: string; + identifier: string; + providerId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + targetId: string; + identifier: string; + providerId?: string; + }; } else { params = { targetId: paramsOrFirst as string, identifier: rest[0] as string, - providerId: rest[1] as string + providerId: rest[1] as string, }; } - + const targetId = params.targetId; const identifier = params.identifier; const providerId = params.providerId; if (typeof targetId === 'undefined') { - throw new AppwriteException('Missing required parameter: "targetId"'); + throw new AppwriteException( + 'Missing required parameter: "targetId"', + ); } if (typeof identifier === 'undefined') { - throw new AppwriteException('Missing required parameter: "identifier"'); + throw new AppwriteException( + 'Missing required parameter: "identifier"', + ); } - const apiPath = '/account/targets/push'; const payload: Payload = {}; if (typeof targetId !== 'undefined') { @@ -2405,15 +2999,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -2424,7 +3013,10 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - updatePushTarget(params: { targetId: string, identifier: string }): Promise; + updatePushTarget(params: { + targetId: string; + identifier: string; + }): Promise; /** * Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead. * @@ -2434,33 +3026,49 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePushTarget(targetId: string, identifier: string): Promise; updatePushTarget( - paramsOrFirst: { targetId: string, identifier: string } | string, - ...rest: [(string)?] + targetId: string, + identifier: string, + ): Promise; + updatePushTarget( + paramsOrFirst: { targetId: string; identifier: string } | string, + ...rest: [string?] ): Promise { - let params: { targetId: string, identifier: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { targetId: string, identifier: string }; + let params: { targetId: string; identifier: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + targetId: string; + identifier: string; + }; } else { params = { targetId: paramsOrFirst as string, - identifier: rest[0] as string + identifier: rest[0] as string, }; } - + const targetId = params.targetId; const identifier = params.identifier; if (typeof targetId === 'undefined') { - throw new AppwriteException('Missing required parameter: "targetId"'); + throw new AppwriteException( + 'Missing required parameter: "targetId"', + ); } if (typeof identifier === 'undefined') { - throw new AppwriteException('Missing required parameter: "identifier"'); + throw new AppwriteException( + 'Missing required parameter: "identifier"', + ); } - - const apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', encodeURIComponent(String(targetId))); + const apiPath = '/account/targets/{targetId}/push'.replace( + '{targetId}', + encodeURIComponent(String(targetId)), + ); const payload: Payload = {}; if (typeof identifier !== 'undefined') { payload['identifier'] = identifier; @@ -2470,15 +3078,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -2499,46 +3102,49 @@ export class Account { */ deletePushTarget(targetId: string): Promise<{}>; deletePushTarget( - paramsOrFirst: { targetId: string } | string + paramsOrFirst: { targetId: string } | string, ): Promise<{}> { let params: { targetId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { targetId: string }; } else { params = { - targetId: paramsOrFirst as string + targetId: paramsOrFirst as string, }; } - + const targetId = params.targetId; if (typeof targetId === 'undefined') { - throw new AppwriteException('Missing required parameter: "targetId"'); + throw new AppwriteException( + 'Missing required parameter: "targetId"', + ); } - - const apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', encodeURIComponent(String(targetId))); + const apiPath = '/account/targets/{targetId}/push'.replace( + '{targetId}', + encodeURIComponent(String(targetId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** * Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). - * + * * * @param {string} params.userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored. * @param {string} params.email - User email. @@ -2546,12 +3152,16 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - createEmailToken(params: { userId: string, email: string, phrase?: boolean }): Promise; + createEmailToken(params: { + userId: string; + email: string; + phrase?: boolean; + }): Promise; /** * Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). - * + * * * @param {string} userId - User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored. * @param {string} email - User email. @@ -2560,23 +3170,36 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createEmailToken(userId: string, email: string, phrase?: boolean): Promise; createEmailToken( - paramsOrFirst: { userId: string, email: string, phrase?: boolean } | string, - ...rest: [(string)?, (boolean)?] + userId: string, + email: string, + phrase?: boolean, + ): Promise; + createEmailToken( + paramsOrFirst: + { userId: string; email: string; phrase?: boolean } | string, + ...rest: [string?, boolean?] ): Promise { - let params: { userId: string, email: string, phrase?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, email: string, phrase?: boolean }; + let params: { userId: string; email: string; phrase?: boolean }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + email: string; + phrase?: boolean; + }; } else { params = { userId: paramsOrFirst as string, email: rest[0] as string, - phrase: rest[1] as boolean + phrase: rest[1] as boolean, }; } - + const userId = params.userId; const email = params.email; const phrase = params.phrase; @@ -2587,7 +3210,6 @@ export class Account { if (typeof email === 'undefined') { throw new AppwriteException('Missing required parameter: "email"'); } - const apiPath = '/account/tokens/email'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -2604,22 +3226,17 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). - * + * * * @param {string} params.userId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored. * @param {string} params.email - User email. @@ -2628,12 +3245,17 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - createMagicURLToken(params: { userId: string, email: string, url?: string, phrase?: boolean }): Promise; + createMagicURLToken(params: { + userId: string; + email: string; + url?: string; + phrase?: boolean; + }): Promise; /** * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). - * + * * * @param {string} userId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored. * @param {string} email - User email. @@ -2643,24 +3265,45 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createMagicURLToken(userId: string, email: string, url?: string, phrase?: boolean): Promise; createMagicURLToken( - paramsOrFirst: { userId: string, email: string, url?: string, phrase?: boolean } | string, - ...rest: [(string)?, (string)?, (boolean)?] + userId: string, + email: string, + url?: string, + phrase?: boolean, + ): Promise; + createMagicURLToken( + paramsOrFirst: + | { userId: string; email: string; url?: string; phrase?: boolean } + | string, + ...rest: [string?, string?, boolean?] ): Promise { - let params: { userId: string, email: string, url?: string, phrase?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, email: string, url?: string, phrase?: boolean }; + let params: { + userId: string; + email: string; + url?: string; + phrase?: boolean; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + email: string; + url?: string; + phrase?: boolean; + }; } else { params = { userId: paramsOrFirst as string, email: rest[0] as string, url: rest[1] as string, - phrase: rest[2] as boolean + phrase: rest[2] as boolean, }; } - + const userId = params.userId; const email = params.email; const url = params.url; @@ -2672,7 +3315,6 @@ export class Account { if (typeof email === 'undefined') { throw new AppwriteException('Missing required parameter: "email"'); } - const apiPath = '/account/tokens/magic-url'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -2692,40 +3334,40 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** - * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. - * + * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. + * * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * - * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. * @throws {AppwriteException} * @returns {void | string} */ - createOAuth2Token(params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] }): void | string; + createOAuth2Token(params: { + provider: OAuthProvider; + success?: string; + failure?: string; + scopes?: string[]; + }): void | string; /** - * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. - * + * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. + * * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * - * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. @@ -2733,34 +3375,68 @@ export class Account { * @returns {void | string} * @deprecated Use the object parameter style method for a better developer experience. */ - createOAuth2Token(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): void | string; createOAuth2Token( - paramsOrFirst: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] } | OAuthProvider, - ...rest: [(string)?, (string)?, (string[])?] + provider: OAuthProvider, + success?: string, + failure?: string, + scopes?: string[], + ): void | string; + createOAuth2Token( + paramsOrFirst: + | { + provider: OAuthProvider; + success?: string; + failure?: string; + scopes?: string[]; + } + | OAuthProvider, + ...rest: [string?, string?, string[]?] ): void | string { - let params: { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) { - params = (paramsOrFirst || {}) as { provider: OAuthProvider, success?: string, failure?: string, scopes?: string[] }; + let params: { + provider: OAuthProvider; + success?: string; + failure?: string; + scopes?: string[]; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + ('provider' in paramsOrFirst || + 'success' in paramsOrFirst || + 'failure' in paramsOrFirst || + 'scopes' in paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + provider: OAuthProvider; + success?: string; + failure?: string; + scopes?: string[]; + }; } else { params = { provider: paramsOrFirst as OAuthProvider, success: rest[0] as string, failure: rest[1] as string, - scopes: rest[2] as string[] + scopes: rest[2] as string[], }; } - + const provider = params.provider; const success = params.success; const failure = params.failure; const scopes = params.scopes; if (typeof provider === 'undefined') { - throw new AppwriteException('Missing required parameter: "provider"'); + throw new AppwriteException( + 'Missing required parameter: "provider"', + ); } - - const apiPath = '/account/tokens/oauth2/{provider}'.replace('{provider}', encodeURIComponent(String(provider))); + const apiPath = '/account/tokens/oauth2/{provider}'.replace( + '{provider}', + encodeURIComponent(String(provider)), + ); const payload: Payload = {}; if (typeof success !== 'undefined') { payload['success'] = success; @@ -2773,17 +3449,12 @@ export class Account { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'text/html', - } - payload['project'] = this.client.config.project; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + if (typeof window !== 'undefined' && window?.location) { window.location.href = uri.toString(); return; @@ -2794,7 +3465,7 @@ export class Account { /** * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param {string} params.userId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored. @@ -2802,10 +3473,13 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - createPhoneToken(params: { userId: string, phone: string }): Promise; + createPhoneToken(params: { + userId: string; + phone: string; + }): Promise; /** * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. - * + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * @param {string} userId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored. @@ -2816,20 +3490,24 @@ export class Account { */ createPhoneToken(userId: string, phone: string): Promise; createPhoneToken( - paramsOrFirst: { userId: string, phone: string } | string, - ...rest: [(string)?] + paramsOrFirst: { userId: string; phone: string } | string, + ...rest: [string?] ): Promise { - let params: { userId: string, phone: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, phone: string }; + let params: { userId: string; phone: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { userId: string; phone: string }; } else { params = { userId: paramsOrFirst as string, - phone: rest[0] as string + phone: rest[0] as string, }; } - + const userId = params.userId; const phone = params.phone; @@ -2839,7 +3517,6 @@ export class Account { if (typeof phone === 'undefined') { throw new AppwriteException('Missing required parameter: "phone"'); } - const apiPath = '/account/tokens/phone'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -2853,22 +3530,17 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. - * + * * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. - * + * * * @param {string} params.url - URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @throws {AppwriteException} @@ -2877,9 +3549,9 @@ export class Account { createEmailVerification(params: { url: string }): Promise; /** * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. - * + * * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. - * + * * * @param {string} url - URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @throws {AppwriteException} @@ -2888,24 +3560,27 @@ export class Account { */ createEmailVerification(url: string): Promise; createEmailVerification( - paramsOrFirst: { url: string } | string + paramsOrFirst: { url: string } | string, ): Promise { let params: { url: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { url: string }; } else { params = { - url: paramsOrFirst as string + url: paramsOrFirst as string, }; } - + const url = params.url; if (typeof url === 'undefined') { throw new AppwriteException('Missing required parameter: "url"'); } - const apiPath = '/account/verifications/email'; const payload: Payload = {}; if (typeof url !== 'undefined') { @@ -2916,22 +3591,17 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. - * + * * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. - * + * * * @param {string} params.url - URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @throws {AppwriteException} @@ -2941,9 +3611,9 @@ export class Account { createVerification(params: { url: string }): Promise; /** * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. - * + * * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. - * + * * * @param {string} url - URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @throws {AppwriteException} @@ -2952,24 +3622,27 @@ export class Account { */ createVerification(url: string): Promise; createVerification( - paramsOrFirst: { url: string } | string + paramsOrFirst: { url: string } | string, ): Promise { let params: { url: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { url: string }; } else { params = { - url: paramsOrFirst as string + url: paramsOrFirst as string, }; } - + const url = params.url; if (typeof url === 'undefined') { throw new AppwriteException('Missing required parameter: "url"'); } - const apiPath = '/account/verifications/email'; const payload: Payload = {}; if (typeof url !== 'undefined') { @@ -2980,15 +3653,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -2999,7 +3667,10 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - updateEmailVerification(params: { userId: string, secret: string }): Promise; + updateEmailVerification(params: { + userId: string; + secret: string; + }): Promise; /** * Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code. * @@ -3009,22 +3680,32 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateEmailVerification(userId: string, secret: string): Promise; updateEmailVerification( - paramsOrFirst: { userId: string, secret: string } | string, - ...rest: [(string)?] + userId: string, + secret: string, + ): Promise; + updateEmailVerification( + paramsOrFirst: { userId: string; secret: string } | string, + ...rest: [string?] ): Promise { - let params: { userId: string, secret: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, secret: string }; + let params: { userId: string; secret: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + secret: string; + }; } else { params = { userId: paramsOrFirst as string, - secret: rest[0] as string + secret: rest[0] as string, }; } - + const userId = params.userId; const secret = params.secret; @@ -3034,7 +3715,6 @@ export class Account { if (typeof secret === 'undefined') { throw new AppwriteException('Missing required parameter: "secret"'); } - const apiPath = '/account/verifications/email'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -3048,15 +3728,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -3068,7 +3743,10 @@ export class Account { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `Account.updateEmailVerification` instead. */ - updateVerification(params: { userId: string, secret: string }): Promise; + updateVerification(params: { + userId: string; + secret: string; + }): Promise; /** * Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code. * @@ -3080,20 +3758,27 @@ export class Account { */ updateVerification(userId: string, secret: string): Promise; updateVerification( - paramsOrFirst: { userId: string, secret: string } | string, - ...rest: [(string)?] + paramsOrFirst: { userId: string; secret: string } | string, + ...rest: [string?] ): Promise { - let params: { userId: string, secret: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, secret: string }; + let params: { userId: string; secret: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + secret: string; + }; } else { params = { userId: paramsOrFirst as string, - secret: rest[0] as string + secret: rest[0] as string, }; } - + const userId = params.userId; const secret = params.secret; @@ -3103,7 +3788,6 @@ export class Account { if (typeof secret === 'undefined') { throw new AppwriteException('Missing required parameter: "secret"'); } - const apiPath = '/account/verifications/email'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -3117,15 +3801,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -3135,7 +3814,6 @@ export class Account { * @returns {Promise} */ createPhoneVerification(): Promise { - const apiPath = '/account/verifications/phone'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -3143,15 +3821,10 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -3162,7 +3835,10 @@ export class Account { * @throws {AppwriteException} * @returns {Promise} */ - updatePhoneVerification(params: { userId: string, secret: string }): Promise; + updatePhoneVerification(params: { + userId: string; + secret: string; + }): Promise; /** * Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code. * @@ -3172,22 +3848,32 @@ export class Account { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePhoneVerification(userId: string, secret: string): Promise; updatePhoneVerification( - paramsOrFirst: { userId: string, secret: string } | string, - ...rest: [(string)?] + userId: string, + secret: string, + ): Promise; + updatePhoneVerification( + paramsOrFirst: { userId: string; secret: string } | string, + ...rest: [string?] ): Promise { - let params: { userId: string, secret: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId: string, secret: string }; + let params: { userId: string; secret: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + secret: string; + }; } else { params = { userId: paramsOrFirst as string, - secret: rest[0] as string + secret: rest[0] as string, }; } - + const userId = params.userId; const secret = params.secret; @@ -3197,7 +3883,6 @@ export class Account { if (typeof secret === 'undefined') { throw new AppwriteException('Missing required parameter: "secret"'); } - const apiPath = '/account/verifications/phone'; const payload: Payload = {}; if (typeof userId !== 'undefined') { @@ -3211,14 +3896,9 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } } diff --git a/src/services/avatars.ts b/src/services/avatars.ts index 151d1123..454ec6b2 100644 --- a/src/services/avatars.ts +++ b/src/services/avatars.ts @@ -1,6 +1,5 @@ import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; -import type { Models } from '../models'; +import { AppwriteException, Client, type Payload } from '../client'; import { Browser } from '../enums/browser'; import { CreditCard } from '../enums/credit-card'; @@ -9,7 +8,6 @@ import { BrowserTheme } from '../enums/browser-theme'; import { Timezone } from '../enums/timezone'; import { BrowserPermission } from '../enums/browser-permission'; import { ImageFormat } from '../enums/image-format'; - export class Avatars { client: Client; @@ -19,7 +17,7 @@ export class Avatars { /** * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings. - * + * * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * * @param {Browser} params.code - Browser Code. @@ -29,10 +27,15 @@ export class Avatars { * @throws {AppwriteException} * @returns {string} */ - getBrowser(params: { code: Browser, width?: number, height?: number, quality?: number }): string; + getBrowser(params: { + code: Browser; + width?: number; + height?: number; + quality?: number; + }): string; /** * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings. - * + * * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. * * @param {Browser} code - Browser Code. @@ -43,24 +46,54 @@ export class Avatars { * @returns {string} * @deprecated Use the object parameter style method for a better developer experience. */ - getBrowser(code: Browser, width?: number, height?: number, quality?: number): string; getBrowser( - paramsOrFirst: { code: Browser, width?: number, height?: number, quality?: number } | Browser, - ...rest: [(number)?, (number)?, (number)?] + code: Browser, + width?: number, + height?: number, + quality?: number, + ): string; + getBrowser( + paramsOrFirst: + | { + code: Browser; + width?: number; + height?: number; + quality?: number; + } + | Browser, + ...rest: [number?, number?, number?] ): string { - let params: { code: Browser, width?: number, height?: number, quality?: number }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) { - params = (paramsOrFirst || {}) as { code: Browser, width?: number, height?: number, quality?: number }; + let params: { + code: Browser; + width?: number; + height?: number; + quality?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + ('code' in paramsOrFirst || + 'width' in paramsOrFirst || + 'height' in paramsOrFirst || + 'quality' in paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + code: Browser; + width?: number; + height?: number; + quality?: number; + }; } else { params = { code: paramsOrFirst as Browser, width: rest[0] as number, height: rest[1] as number, - quality: rest[2] as number + quality: rest[2] as number, }; } - + const code = params.code; const width = params.width; const height = params.height; @@ -69,8 +102,10 @@ export class Avatars { if (typeof code === 'undefined') { throw new AppwriteException('Missing required parameter: "code"'); } - - const apiPath = '/avatars/browsers/{code}'.replace('{code}', encodeURIComponent(String(code))); + const apiPath = '/avatars/browsers/{code}'.replace( + '{code}', + encodeURIComponent(String(code)), + ); const payload: Payload = {}; if (typeof width !== 'undefined') { payload['width'] = width; @@ -83,26 +118,21 @@ export class Avatars { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'image/png', - } - payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } /** * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. - * + * * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * * * @param {CreditCard} params.code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay. * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -111,12 +141,17 @@ export class Avatars { * @throws {AppwriteException} * @returns {string} */ - getCreditCard(params: { code: CreditCard, width?: number, height?: number, quality?: number }): string; + getCreditCard(params: { + code: CreditCard; + width?: number; + height?: number; + quality?: number; + }): string; /** * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. - * + * * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * * * @param {CreditCard} code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay. * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -126,24 +161,54 @@ export class Avatars { * @returns {string} * @deprecated Use the object parameter style method for a better developer experience. */ - getCreditCard(code: CreditCard, width?: number, height?: number, quality?: number): string; getCreditCard( - paramsOrFirst: { code: CreditCard, width?: number, height?: number, quality?: number } | CreditCard, - ...rest: [(number)?, (number)?, (number)?] + code: CreditCard, + width?: number, + height?: number, + quality?: number, + ): string; + getCreditCard( + paramsOrFirst: + | { + code: CreditCard; + width?: number; + height?: number; + quality?: number; + } + | CreditCard, + ...rest: [number?, number?, number?] ): string { - let params: { code: CreditCard, width?: number, height?: number, quality?: number }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) { - params = (paramsOrFirst || {}) as { code: CreditCard, width?: number, height?: number, quality?: number }; + let params: { + code: CreditCard; + width?: number; + height?: number; + quality?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + ('code' in paramsOrFirst || + 'width' in paramsOrFirst || + 'height' in paramsOrFirst || + 'quality' in paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + code: CreditCard; + width?: number; + height?: number; + quality?: number; + }; } else { params = { code: paramsOrFirst as CreditCard, width: rest[0] as number, height: rest[1] as number, - quality: rest[2] as number + quality: rest[2] as number, }; } - + const code = params.code; const width = params.width; const height = params.height; @@ -152,8 +217,10 @@ export class Avatars { if (typeof code === 'undefined') { throw new AppwriteException('Missing required parameter: "code"'); } - - const apiPath = '/avatars/credit-cards/{code}'.replace('{code}', encodeURIComponent(String(code))); + const apiPath = '/avatars/credit-cards/{code}'.replace( + '{code}', + encodeURIComponent(String(code)), + ); const payload: Payload = {}; if (typeof width !== 'undefined') { payload['width'] = width; @@ -166,24 +233,19 @@ export class Avatars { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'image/png', - } - payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } /** * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL. - * + * * This endpoint does not follow HTTP redirects. * * @param {string} params.url - Website URL which you want to fetch the favicon from. @@ -193,7 +255,7 @@ export class Avatars { getFavicon(params: { url: string }): string; /** * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL. - * + * * This endpoint does not follow HTTP redirects. * * @param {string} url - Website URL which you want to fetch the favicon from. @@ -202,25 +264,26 @@ export class Avatars { * @deprecated Use the object parameter style method for a better developer experience. */ getFavicon(url: string): string; - getFavicon( - paramsOrFirst: { url: string } | string - ): string { + getFavicon(paramsOrFirst: { url: string } | string): string { let params: { url: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { url: string }; } else { params = { - url: paramsOrFirst as string + url: paramsOrFirst as string, }; } - + const url = params.url; if (typeof url === 'undefined') { throw new AppwriteException('Missing required parameter: "url"'); } - const apiPath = '/avatars/favicon'; const payload: Payload = {}; if (typeof url !== 'undefined') { @@ -228,26 +291,21 @@ export class Avatars { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'image/*', - } - payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } /** * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard. - * + * * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * * * @param {Flag} params.code - Country Code. ISO Alpha-2 country code format. * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -256,12 +314,17 @@ export class Avatars { * @throws {AppwriteException} * @returns {string} */ - getFlag(params: { code: Flag, width?: number, height?: number, quality?: number }): string; + getFlag(params: { + code: Flag; + width?: number; + height?: number; + quality?: number; + }): string; /** * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard. - * + * * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * * * @param {Flag} code - Country Code. ISO Alpha-2 country code format. * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -271,24 +334,49 @@ export class Avatars { * @returns {string} * @deprecated Use the object parameter style method for a better developer experience. */ - getFlag(code: Flag, width?: number, height?: number, quality?: number): string; getFlag( - paramsOrFirst: { code: Flag, width?: number, height?: number, quality?: number } | Flag, - ...rest: [(number)?, (number)?, (number)?] + code: Flag, + width?: number, + height?: number, + quality?: number, + ): string; + getFlag( + paramsOrFirst: + | { code: Flag; width?: number; height?: number; quality?: number } + | Flag, + ...rest: [number?, number?, number?] ): string { - let params: { code: Flag, width?: number, height?: number, quality?: number }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) { - params = (paramsOrFirst || {}) as { code: Flag, width?: number, height?: number, quality?: number }; + let params: { + code: Flag; + width?: number; + height?: number; + quality?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + ('code' in paramsOrFirst || + 'width' in paramsOrFirst || + 'height' in paramsOrFirst || + 'quality' in paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + code: Flag; + width?: number; + height?: number; + quality?: number; + }; } else { params = { code: paramsOrFirst as Flag, width: rest[0] as number, height: rest[1] as number, - quality: rest[2] as number + quality: rest[2] as number, }; } - + const code = params.code; const width = params.width; const height = params.height; @@ -297,8 +385,10 @@ export class Avatars { if (typeof code === 'undefined') { throw new AppwriteException('Missing required parameter: "code"'); } - - const apiPath = '/avatars/flags/{code}'.replace('{code}', encodeURIComponent(String(code))); + const apiPath = '/avatars/flags/{code}'.replace( + '{code}', + encodeURIComponent(String(code)), + ); const payload: Payload = {}; if (typeof width !== 'undefined') { payload['width'] = width; @@ -311,26 +401,21 @@ export class Avatars { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'image/png', - } - payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } /** * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. - * + * * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px. - * + * * This endpoint does not follow HTTP redirects. * * @param {string} params.url - Image URL which you want to crop. @@ -339,12 +424,12 @@ export class Avatars { * @throws {AppwriteException} * @returns {string} */ - getImage(params: { url: string, width?: number, height?: number }): string; + getImage(params: { url: string; width?: number; height?: number }): string; /** * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. - * + * * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px. - * + * * This endpoint does not follow HTTP redirects. * * @param {string} url - Image URL which you want to crop. @@ -356,21 +441,30 @@ export class Avatars { */ getImage(url: string, width?: number, height?: number): string; getImage( - paramsOrFirst: { url: string, width?: number, height?: number } | string, - ...rest: [(number)?, (number)?] + paramsOrFirst: + { url: string; width?: number; height?: number } | string, + ...rest: [number?, number?] ): string { - let params: { url: string, width?: number, height?: number }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { url: string, width?: number, height?: number }; + let params: { url: string; width?: number; height?: number }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + url: string; + width?: number; + height?: number; + }; } else { params = { url: paramsOrFirst as string, width: rest[0] as number, - height: rest[1] as number + height: rest[1] as number, }; } - + const url = params.url; const width = params.width; const height = params.height; @@ -378,7 +472,6 @@ export class Avatars { if (typeof url === 'undefined') { throw new AppwriteException('Missing required parameter: "url"'); } - const apiPath = '/avatars/image'; const payload: Payload = {}; if (typeof url !== 'undefined') { @@ -392,28 +485,23 @@ export class Avatars { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'image/*', - } - payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } /** * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned. - * + * * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. - * + * * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * * * @param {string} params.name - Full Name. When empty, current user name or email will be used. Max length: 128 chars. * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -422,14 +510,19 @@ export class Avatars { * @throws {AppwriteException} * @returns {string} */ - getInitials(params?: { name?: string, width?: number, height?: number, background?: string }): string; + getInitials(params?: { + name?: string; + width?: number; + height?: number; + background?: string; + }): string; /** * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned. - * + * * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. - * + * * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. - * + * * * @param {string} name - Full Name. When empty, current user name or email will be used. Max length: 128 chars. * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100. @@ -439,30 +532,56 @@ export class Avatars { * @returns {string} * @deprecated Use the object parameter style method for a better developer experience. */ - getInitials(name?: string, width?: number, height?: number, background?: string): string; getInitials( - paramsOrFirst?: { name?: string, width?: number, height?: number, background?: string } | string, - ...rest: [(number)?, (number)?, (string)?] + name?: string, + width?: number, + height?: number, + background?: string, + ): string; + getInitials( + paramsOrFirst?: + | { + name?: string; + width?: number; + height?: number; + background?: string; + } + | string, + ...rest: [number?, number?, string?] ): string { - let params: { name?: string, width?: number, height?: number, background?: string }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { name?: string, width?: number, height?: number, background?: string }; + let params: { + name?: string; + width?: number; + height?: number; + background?: string; + }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + name?: string; + width?: number; + height?: number; + background?: string; + }; } else { params = { name: paramsOrFirst as string, width: rest[0] as number, height: rest[1] as number, - background: rest[2] as string + background: rest[2] as string, }; } - + const name = params.name; const width = params.width; const height = params.height; const background = params.background; - const apiPath = '/avatars/initials'; const payload: Payload = {}; if (typeof name !== 'undefined') { @@ -479,24 +598,174 @@ export class Avatars { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'image/png', + payload['project'] = this.client.config.project; + payload['impersonateuserid'] = this.client.config.impersonateuserid; + + for (const [key, value] of Object.entries(Service.flatten(payload))) { + uri.searchParams.append(key, value); } + return uri.toString(); + } + + /** + * Returns the best available profile photo for a user. The endpoint tries each source in priority order and returns the first successful result: OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in static fallback. + * + * Passing `userId` — `current()` for the authenticated user — resolves the photo from everything known about that user: identity photos, email, and name. An explicit `emailHash` or `name` then overrides just that value, and the user's remaining sources stay in the chain. Without `userId`, passing `emailHash` and/or `name` resolves the avatar from those values alone: the hash is looked up on Gravatar and Libravatar, the name is rendered as initials, and the session user stays out of the chain so their own photo never shadows the avatar being asked for. When nothing is passed, the photo resolves for the currently authenticated user. Emails are only ever accepted pre-hashed, so no address ends up in a URL. + * + * @param {number} params.width - Output image width in pixels. Pass an integer between 0 and 2000. Defaults to 256. + * @param {number} params.height - Output image height in pixels. Pass an integer between 0 and 2000. Defaults to 256. + * @param {number} params.quality - Output image quality between 0 and 100. Defaults to 100. + * @param {string} params.output - Output image format. Defaults to 'png'. + * @param {string} params.rating - Maximum image rating to fetch from Gravatar/Libravatar. Defaults to 'g'. + * @param {string} params.userId - User ID to resolve the photo for. Pass 'current()' for the currently authenticated user. When omitted, the session user is used only if no emailHash and no name is passed. + * @param {string} params.emailHash - SHA256 hash of the lowercase, trimmed email address to look up on Gravatar and Libravatar instead of the user's own email. Pass the hash, never the address itself. + * @param {string} params.name - Name to render initials from instead of the user's own name. Max length: 128 chars. + * @throws {AppwriteException} + * @returns {string} + */ + getPhoto(params?: { + width?: number; + height?: number; + quality?: number; + output?: string; + rating?: string; + userId?: string; + emailHash?: string; + name?: string; + }): string; + /** + * Returns the best available profile photo for a user. The endpoint tries each source in priority order and returns the first successful result: OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in static fallback. + * + * Passing `userId` — `current()` for the authenticated user — resolves the photo from everything known about that user: identity photos, email, and name. An explicit `emailHash` or `name` then overrides just that value, and the user's remaining sources stay in the chain. Without `userId`, passing `emailHash` and/or `name` resolves the avatar from those values alone: the hash is looked up on Gravatar and Libravatar, the name is rendered as initials, and the session user stays out of the chain so their own photo never shadows the avatar being asked for. When nothing is passed, the photo resolves for the currently authenticated user. Emails are only ever accepted pre-hashed, so no address ends up in a URL. + * + * @param {number} width - Output image width in pixels. Pass an integer between 0 and 2000. Defaults to 256. + * @param {number} height - Output image height in pixels. Pass an integer between 0 and 2000. Defaults to 256. + * @param {number} quality - Output image quality between 0 and 100. Defaults to 100. + * @param {string} output - Output image format. Defaults to 'png'. + * @param {string} rating - Maximum image rating to fetch from Gravatar/Libravatar. Defaults to 'g'. + * @param {string} userId - User ID to resolve the photo for. Pass 'current()' for the currently authenticated user. When omitted, the session user is used only if no emailHash and no name is passed. + * @param {string} emailHash - SHA256 hash of the lowercase, trimmed email address to look up on Gravatar and Libravatar instead of the user's own email. Pass the hash, never the address itself. + * @param {string} name - Name to render initials from instead of the user's own name. Max length: 128 chars. + * @throws {AppwriteException} + * @returns {string} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getPhoto( + width?: number, + height?: number, + quality?: number, + output?: string, + rating?: string, + userId?: string, + emailHash?: string, + name?: string, + ): string; + getPhoto( + paramsOrFirst?: + | { + width?: number; + height?: number; + quality?: number; + output?: string; + rating?: string; + userId?: string; + emailHash?: string; + name?: string; + } + | number, + ...rest: [number?, number?, string?, string?, string?, string?, string?] + ): string { + let params: { + width?: number; + height?: number; + quality?: number; + output?: string; + rating?: string; + userId?: string; + emailHash?: string; + name?: string; + }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + width?: number; + height?: number; + quality?: number; + output?: string; + rating?: string; + userId?: string; + emailHash?: string; + name?: string; + }; + } else { + params = { + width: paramsOrFirst as number, + height: rest[0] as number, + quality: rest[1] as number, + output: rest[2] as string, + rating: rest[3] as string, + userId: rest[4] as string, + emailHash: rest[5] as string, + name: rest[6] as string, + }; + } + + const width = params.width; + const height = params.height; + const quality = params.quality; + const output = params.output; + const rating = params.rating; + const userId = params.userId; + const emailHash = params.emailHash; + const name = params.name; + + const apiPath = '/avatars/photo'; + const payload: Payload = {}; + if (typeof width !== 'undefined') { + payload['width'] = width; + } + if (typeof height !== 'undefined') { + payload['height'] = height; + } + if (typeof quality !== 'undefined') { + payload['quality'] = quality; + } + if (typeof output !== 'undefined') { + payload['output'] = output; + } + if (typeof rating !== 'undefined') { + payload['rating'] = rating; + } + if (typeof userId !== 'undefined') { + payload['userId'] = userId; + } + if (typeof emailHash !== 'undefined') { + payload['emailHash'] = emailHash; + } + if (typeof name !== 'undefined') { + payload['name'] = name; + } + const uri = new URL(this.client.config.endpoint + apiPath); + payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } /** * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. - * + * * * @param {string} params.text - Plain text to be converted to QR code image. * @param {number} params.size - QR code size. Pass an integer between 1 to 1000. Defaults to 400. @@ -505,10 +774,15 @@ export class Avatars { * @throws {AppwriteException} * @returns {string} */ - getQR(params: { text: string, size?: number, margin?: number, download?: boolean }): string; + getQR(params: { + text: string; + size?: number; + margin?: number; + download?: boolean; + }): string; /** * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. - * + * * * @param {string} text - Plain text to be converted to QR code image. * @param {number} size - QR code size. Pass an integer between 1 to 1000. Defaults to 400. @@ -518,24 +792,50 @@ export class Avatars { * @returns {string} * @deprecated Use the object parameter style method for a better developer experience. */ - getQR(text: string, size?: number, margin?: number, download?: boolean): string; getQR( - paramsOrFirst: { text: string, size?: number, margin?: number, download?: boolean } | string, - ...rest: [(number)?, (number)?, (boolean)?] + text: string, + size?: number, + margin?: number, + download?: boolean, + ): string; + getQR( + paramsOrFirst: + | { + text: string; + size?: number; + margin?: number; + download?: boolean; + } + | string, + ...rest: [number?, number?, boolean?] ): string { - let params: { text: string, size?: number, margin?: number, download?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { text: string, size?: number, margin?: number, download?: boolean }; + let params: { + text: string; + size?: number; + margin?: number; + download?: boolean; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + text: string; + size?: number; + margin?: number; + download?: boolean; + }; } else { params = { text: paramsOrFirst as string, size: rest[0] as number, margin: rest[1] as number, - download: rest[2] as boolean + download: rest[2] as boolean, }; } - + const text = params.text; const size = params.size; const margin = params.margin; @@ -544,7 +844,6 @@ export class Avatars { if (typeof text === 'undefined') { throw new AppwriteException('Missing required parameter: "text"'); } - const apiPath = '/avatars/qr'; const payload: Payload = {}; if (typeof text !== 'undefined') { @@ -561,26 +860,21 @@ export class Avatars { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'image/png', - } - payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } /** * Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image. - * + * * You can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll. - * + * * When width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px. * * @param {string} params.url - Website URL which you want to capture. @@ -606,12 +900,33 @@ export class Avatars { * @throws {AppwriteException} * @returns {string} */ - getScreenshot(params: { url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: BrowserTheme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: BrowserPermission[], sleep?: number, width?: number, height?: number, quality?: number, output?: ImageFormat }): string; + getScreenshot(params: { + url: string; + headers?: object; + viewportWidth?: number; + viewportHeight?: number; + scale?: number; + theme?: BrowserTheme; + userAgent?: string; + fullpage?: boolean; + locale?: string; + timezone?: Timezone; + latitude?: number; + longitude?: number; + accuracy?: number; + touch?: boolean; + permissions?: BrowserPermission[]; + sleep?: number; + width?: number; + height?: number; + quality?: number; + output?: ImageFormat; + }): string; /** * Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image. - * + * * You can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll. - * + * * When width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px. * * @param {string} url - Website URL which you want to capture. @@ -638,15 +953,125 @@ export class Avatars { * @returns {string} * @deprecated Use the object parameter style method for a better developer experience. */ - getScreenshot(url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: BrowserTheme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: BrowserPermission[], sleep?: number, width?: number, height?: number, quality?: number, output?: ImageFormat): string; getScreenshot( - paramsOrFirst: { url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: BrowserTheme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: BrowserPermission[], sleep?: number, width?: number, height?: number, quality?: number, output?: ImageFormat } | string, - ...rest: [(object)?, (number)?, (number)?, (number)?, (BrowserTheme)?, (string)?, (boolean)?, (string)?, (Timezone)?, (number)?, (number)?, (number)?, (boolean)?, (BrowserPermission[])?, (number)?, (number)?, (number)?, (number)?, (ImageFormat)?] + url: string, + headers?: object, + viewportWidth?: number, + viewportHeight?: number, + scale?: number, + theme?: BrowserTheme, + userAgent?: string, + fullpage?: boolean, + locale?: string, + timezone?: Timezone, + latitude?: number, + longitude?: number, + accuracy?: number, + touch?: boolean, + permissions?: BrowserPermission[], + sleep?: number, + width?: number, + height?: number, + quality?: number, + output?: ImageFormat, + ): string; + getScreenshot( + paramsOrFirst: + | { + url: string; + headers?: object; + viewportWidth?: number; + viewportHeight?: number; + scale?: number; + theme?: BrowserTheme; + userAgent?: string; + fullpage?: boolean; + locale?: string; + timezone?: Timezone; + latitude?: number; + longitude?: number; + accuracy?: number; + touch?: boolean; + permissions?: BrowserPermission[]; + sleep?: number; + width?: number; + height?: number; + quality?: number; + output?: ImageFormat; + } + | string, + ...rest: [ + object?, + number?, + number?, + number?, + BrowserTheme?, + string?, + boolean?, + string?, + Timezone?, + number?, + number?, + number?, + boolean?, + BrowserPermission[]?, + number?, + number?, + number?, + number?, + ImageFormat?, + ] ): string { - let params: { url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: BrowserTheme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: BrowserPermission[], sleep?: number, width?: number, height?: number, quality?: number, output?: ImageFormat }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: BrowserTheme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: BrowserPermission[], sleep?: number, width?: number, height?: number, quality?: number, output?: ImageFormat }; + let params: { + url: string; + headers?: object; + viewportWidth?: number; + viewportHeight?: number; + scale?: number; + theme?: BrowserTheme; + userAgent?: string; + fullpage?: boolean; + locale?: string; + timezone?: Timezone; + latitude?: number; + longitude?: number; + accuracy?: number; + touch?: boolean; + permissions?: BrowserPermission[]; + sleep?: number; + width?: number; + height?: number; + quality?: number; + output?: ImageFormat; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + url: string; + headers?: object; + viewportWidth?: number; + viewportHeight?: number; + scale?: number; + theme?: BrowserTheme; + userAgent?: string; + fullpage?: boolean; + locale?: string; + timezone?: Timezone; + latitude?: number; + longitude?: number; + accuracy?: number; + touch?: boolean; + permissions?: BrowserPermission[]; + sleep?: number; + width?: number; + height?: number; + quality?: number; + output?: ImageFormat; + }; } else { params = { url: paramsOrFirst as string, @@ -668,10 +1093,10 @@ export class Avatars { width: rest[15] as number, height: rest[16] as number, quality: rest[17] as number, - output: rest[18] as ImageFormat + output: rest[18] as ImageFormat, }; } - + const url = params.url; const headers = params.headers; const viewportWidth = params.viewportWidth; @@ -696,7 +1121,6 @@ export class Avatars { if (typeof url === 'undefined') { throw new AppwriteException('Missing required parameter: "url"'); } - const apiPath = '/avatars/screenshots'; const payload: Payload = {}; if (typeof url !== 'undefined') { @@ -761,18 +1185,13 @@ export class Avatars { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'image/png', - } - payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } } diff --git a/src/services/databases.ts b/src/services/databases.ts index 6a5a7818..0cfc2203 100644 --- a/src/services/databases.ts +++ b/src/services/databases.ts @@ -1,8 +1,6 @@ -import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; +import { AppwriteException, Client, type Payload } from '../client'; import type { Models } from '../models'; - export class Databases { client: Client; @@ -18,7 +16,9 @@ export class Databases { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTransactions` instead. */ - listTransactions(params?: { queries?: string[] }): Promise; + listTransactions(params?: { + queries?: string[]; + }): Promise; /** * List transactions across all databases. * @@ -29,20 +29,24 @@ export class Databases { */ listTransactions(queries?: string[]): Promise; listTransactions( - paramsOrFirst?: { queries?: string[] } | string[] + paramsOrFirst?: { queries?: string[] } | string[], ): Promise { let params: { queries?: string[] }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { params = (paramsOrFirst || {}) as { queries?: string[] }; } else { params = { - queries: paramsOrFirst as string[] + queries: paramsOrFirst as string[], }; } - - const queries = params.queries; + const queries = params.queries; const apiPath = '/databases/transactions'; const payload: Payload = {}; @@ -53,15 +57,10 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -83,20 +82,24 @@ export class Databases { */ createTransaction(ttl?: number): Promise; createTransaction( - paramsOrFirst?: { ttl?: number } | number + paramsOrFirst?: { ttl?: number } | number, ): Promise { let params: { ttl?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { params = (paramsOrFirst || {}) as { ttl?: number }; } else { params = { - ttl: paramsOrFirst as number + ttl: paramsOrFirst as number, }; } - - const ttl = params.ttl; + const ttl = params.ttl; const apiPath = '/databases/transactions'; const payload: Payload = {}; @@ -108,15 +111,10 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -127,7 +125,9 @@ export class Databases { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getTransaction` instead. */ - getTransaction(params: { transactionId: string }): Promise; + getTransaction(params: { + transactionId: string; + }): Promise; /** * Get a transaction by its unique ID. * @@ -138,39 +138,42 @@ export class Databases { */ getTransaction(transactionId: string): Promise; getTransaction( - paramsOrFirst: { transactionId: string } | string + paramsOrFirst: { transactionId: string } | string, ): Promise { let params: { transactionId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { transactionId: string }; } else { params = { - transactionId: paramsOrFirst as string + transactionId: paramsOrFirst as string, }; } - + const transactionId = params.transactionId; if (typeof transactionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "transactionId"'); + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); } - - const apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); + const apiPath = '/databases/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -183,7 +186,11 @@ export class Databases { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTransaction` instead. */ - updateTransaction(params: { transactionId: string, commit?: boolean, rollback?: boolean }): Promise; + updateTransaction(params: { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }): Promise; /** * Update a transaction, to either commit or roll back its operations. * @@ -194,32 +201,54 @@ export class Databases { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise; updateTransaction( - paramsOrFirst: { transactionId: string, commit?: boolean, rollback?: boolean } | string, - ...rest: [(boolean)?, (boolean)?] + transactionId: string, + commit?: boolean, + rollback?: boolean, + ): Promise; + updateTransaction( + paramsOrFirst: + | { transactionId: string; commit?: boolean; rollback?: boolean } + | string, + ...rest: [boolean?, boolean?] ): Promise { - let params: { transactionId: string, commit?: boolean, rollback?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { transactionId: string, commit?: boolean, rollback?: boolean }; + let params: { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }; } else { params = { transactionId: paramsOrFirst as string, commit: rest[0] as boolean, - rollback: rest[1] as boolean + rollback: rest[1] as boolean, }; } - + const transactionId = params.transactionId; const commit = params.commit; const rollback = params.rollback; if (typeof transactionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "transactionId"'); + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); } - - const apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); + const apiPath = '/databases/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); const payload: Payload = {}; if (typeof commit !== 'undefined') { payload['commit'] = commit; @@ -232,15 +261,10 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -262,39 +286,42 @@ export class Databases { */ deleteTransaction(transactionId: string): Promise<{}>; deleteTransaction( - paramsOrFirst: { transactionId: string } | string + paramsOrFirst: { transactionId: string } | string, ): Promise<{}> { let params: { transactionId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { transactionId: string }; } else { params = { - transactionId: paramsOrFirst as string + transactionId: paramsOrFirst as string, }; } - + const transactionId = params.transactionId; if (typeof transactionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "transactionId"'); + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); } - - const apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); + const apiPath = '/databases/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** @@ -306,7 +333,10 @@ export class Databases { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createOperations` instead. */ - createOperations(params: { transactionId: string, operations?: object[] }): Promise; + createOperations(params: { + transactionId: string; + operations?: object[]; + }): Promise; /** * Create multiple operations in a single transaction. * @@ -316,30 +346,46 @@ export class Databases { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createOperations(transactionId: string, operations?: object[]): Promise; createOperations( - paramsOrFirst: { transactionId: string, operations?: object[] } | string, - ...rest: [(object[])?] + transactionId: string, + operations?: object[], + ): Promise; + createOperations( + paramsOrFirst: + { transactionId: string; operations?: object[] } | string, + ...rest: [object[]?] ): Promise { - let params: { transactionId: string, operations?: object[] }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { transactionId: string, operations?: object[] }; + let params: { transactionId: string; operations?: object[] }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + transactionId: string; + operations?: object[]; + }; } else { params = { transactionId: paramsOrFirst as string, - operations: rest[0] as object[] + operations: rest[0] as object[], }; } - + const transactionId = params.transactionId; const operations = params.operations; if (typeof transactionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "transactionId"'); - } - - const apiPath = '/databases/transactions/{transactionId}/operations'.replace('{transactionId}', encodeURIComponent(String(transactionId))); + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); + } + const apiPath = + '/databases/transactions/{transactionId}/operations'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); const payload: Payload = {}; if (typeof operations !== 'undefined') { payload['operations'] = operations; @@ -349,15 +395,10 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -373,7 +414,16 @@ export class Databases { * @returns {Promise>} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead. */ - listDocuments(params: { databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number }): Promise>; + listDocuments< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }): Promise>; /** * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. * @@ -387,15 +437,49 @@ export class Databases { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - listDocuments(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number): Promise>; listDocuments( - paramsOrFirst: { databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number } | string, - ...rest: [(string)?, (string[])?, (string)?, (boolean)?, (number)?] + databaseId: string, + collectionId: string, + queries?: string[], + transactionId?: string, + total?: boolean, + ttl?: number, + ): Promise>; + listDocuments( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, string?, boolean?, number?] ): Promise> { - let params: { databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number }; + let params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; } else { params = { databaseId: paramsOrFirst as string, @@ -403,10 +487,10 @@ export class Databases { queries: rest[1] as string[], transactionId: rest[2] as string, total: rest[3] as boolean, - ttl: rest[4] as number + ttl: rest[4] as number, }; } - + const databaseId = params.databaseId; const collectionId = params.collectionId; const queries = params.queries; @@ -415,13 +499,22 @@ export class Databases { const ttl = params.ttl; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof collectionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "collectionId"'); - } - - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + const apiPath = + '/databases/{databaseId}/collections/{collectionId}/documents' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -439,15 +532,10 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -463,7 +551,18 @@ export class Databases { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRow` instead. */ - createDocument(params: { databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit, permissions?: string[], transactionId?: string }): Promise; + createDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & Omit; + permissions?: string[]; + transactionId?: string; + }): Promise; /** * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * @@ -477,26 +576,83 @@ export class Databases { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createDocument(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit, permissions?: string[], transactionId?: string): Promise; createDocument( - paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit, permissions?: string[], transactionId?: string } | string, - ...rest: [(string)?, (string)?, (Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit)?, (string[])?, (string)?] + databaseId: string, + collectionId: string, + documentId: string, + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & Omit, + permissions?: string[], + transactionId?: string, + ): Promise; + createDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit)?, + string[]?, + string?, + ] ): Promise { - let params: { databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit, permissions?: string[], transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit, permissions?: string[], transactionId?: string }; + let params: { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit; + permissions?: string[]; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, documentId: rest[1] as string, - data: rest[2] as Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit, + data: rest[2] as Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit, permissions: rest[3] as string[], - transactionId: rest[4] as string + transactionId: rest[4] as string, }; } - + const databaseId = params.databaseId; const collectionId = params.collectionId; const documentId = params.documentId; @@ -505,19 +661,30 @@ export class Databases { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof collectionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "collectionId"'); + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); } if (typeof documentId === 'undefined') { - throw new AppwriteException('Missing required parameter: "documentId"'); + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); } if (typeof data === 'undefined') { throw new AppwriteException('Missing required parameter: "data"'); } - - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); + const apiPath = + '/databases/{databaseId}/collections/{collectionId}/documents' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); const payload: Payload = {}; if (typeof documentId !== 'undefined') { payload['documentId'] = documentId; @@ -536,15 +703,10 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -559,7 +721,15 @@ export class Databases { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getRow` instead. */ - getDocument(params: { databaseId: string, collectionId: string, documentId: string, queries?: string[], transactionId?: string }): Promise; + getDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + }): Promise; /** * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. * @@ -572,25 +742,55 @@ export class Databases { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - getDocument(databaseId: string, collectionId: string, documentId: string, queries?: string[], transactionId?: string): Promise; getDocument( - paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, queries?: string[], transactionId?: string } | string, - ...rest: [(string)?, (string)?, (string[])?, (string)?] + databaseId: string, + collectionId: string, + documentId: string, + queries?: string[], + transactionId?: string, + ): Promise; + getDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string[]?, string?] ): Promise { - let params: { databaseId: string, collectionId: string, documentId: string, queries?: string[], transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, queries?: string[], transactionId?: string }; + let params: { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, documentId: rest[1] as string, queries: rest[2] as string[], - transactionId: rest[3] as string + transactionId: rest[3] as string, }; } - + const databaseId = params.databaseId; const collectionId = params.collectionId; const documentId = params.documentId; @@ -598,16 +798,31 @@ export class Databases { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof collectionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "collectionId"'); + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); } if (typeof documentId === 'undefined') { - throw new AppwriteException('Missing required parameter: "documentId"'); - } - - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{documentId}', encodeURIComponent(String(documentId))); + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -619,15 +834,10 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -643,7 +853,19 @@ export class Databases { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRow` instead. */ - upsertDocument(params: { databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }): Promise; + upsertDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }): Promise; /** * Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. * @@ -657,26 +879,84 @@ export class Databases { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - upsertDocument(databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string): Promise; upsertDocument( - paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string } | string, - ...rest: [(string)?, (string)?, (Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>)?, (string[])?, (string)?] + databaseId: string, + collectionId: string, + documentId: string, + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, + permissions?: string[], + transactionId?: string, + ): Promise; + upsertDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>)?, + string[]?, + string?, + ] ): Promise { - let params: { databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }; + let params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, documentId: rest[1] as string, - data: rest[2] as Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, + data: rest[2] as Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, permissions: rest[3] as string[], - transactionId: rest[4] as string + transactionId: rest[4] as string, }; } - + const databaseId = params.databaseId; const collectionId = params.collectionId; const documentId = params.documentId; @@ -685,16 +965,31 @@ export class Databases { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof collectionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "collectionId"'); + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); } if (typeof documentId === 'undefined') { - throw new AppwriteException('Missing required parameter: "documentId"'); - } - - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{documentId}', encodeURIComponent(String(documentId))); + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); const payload: Payload = {}; if (typeof data !== 'undefined') { payload['data'] = data; @@ -710,15 +1005,10 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -734,7 +1024,19 @@ export class Databases { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRow` instead. */ - updateDocument(params: { databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }): Promise; + updateDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }): Promise; /** * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. * @@ -748,26 +1050,84 @@ export class Databases { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateDocument(databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string): Promise; updateDocument( - paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string } | string, - ...rest: [(string)?, (string)?, (Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>)?, (string[])?, (string)?] + databaseId: string, + collectionId: string, + documentId: string, + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, + permissions?: string[], + transactionId?: string, + ): Promise; + updateDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>)?, + string[]?, + string?, + ] ): Promise { - let params: { databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }; + let params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, documentId: rest[1] as string, - data: rest[2] as Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>, + data: rest[2] as Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, permissions: rest[3] as string[], - transactionId: rest[4] as string + transactionId: rest[4] as string, }; } - + const databaseId = params.databaseId; const collectionId = params.collectionId; const documentId = params.documentId; @@ -776,16 +1136,31 @@ export class Databases { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof collectionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "collectionId"'); + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); } if (typeof documentId === 'undefined') { - throw new AppwriteException('Missing required parameter: "documentId"'); - } - - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{documentId}', encodeURIComponent(String(documentId))); + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); const payload: Payload = {}; if (typeof data !== 'undefined') { payload['data'] = data; @@ -801,15 +1176,10 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -823,7 +1193,12 @@ export class Databases { * @returns {Promise<{}>} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRow` instead. */ - deleteDocument(params: { databaseId: string, collectionId: string, documentId: string, transactionId?: string }): Promise<{}>; + deleteDocument(params: { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + }): Promise<{}>; /** * Delete a document by its unique ID. * @@ -835,40 +1210,81 @@ export class Databases { * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ - deleteDocument(databaseId: string, collectionId: string, documentId: string, transactionId?: string): Promise<{}>; deleteDocument( - paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, transactionId?: string } | string, - ...rest: [(string)?, (string)?, (string)?] + databaseId: string, + collectionId: string, + documentId: string, + transactionId?: string, + ): Promise<{}>; + deleteDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string?] ): Promise<{}> { - let params: { databaseId: string, collectionId: string, documentId: string, transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, transactionId?: string }; + let params: { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, documentId: rest[1] as string, - transactionId: rest[2] as string + transactionId: rest[2] as string, }; } - + const databaseId = params.databaseId; const collectionId = params.collectionId; const documentId = params.documentId; const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof collectionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "collectionId"'); + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); } if (typeof documentId === 'undefined') { - throw new AppwriteException('Missing required parameter: "documentId"'); - } - - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{documentId}', encodeURIComponent(String(documentId))); + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); const payload: Payload = {}; if (typeof transactionId !== 'undefined') { payload['transactionId'] = transactionId; @@ -878,14 +1294,9 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** @@ -902,7 +1313,17 @@ export class Databases { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead. */ - decrementDocumentAttribute(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string }): Promise; + decrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + min?: number; + transactionId?: string; + }): Promise; /** * Decrement a specific attribute of a document by a given value. * @@ -917,15 +1338,57 @@ export class Databases { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - decrementDocumentAttribute(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string): Promise; - decrementDocumentAttribute( - paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string } | string, - ...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?] + decrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >( + databaseId: string, + collectionId: string, + documentId: string, + attribute: string, + value?: number, + min?: number, + transactionId?: string, + ): Promise; + decrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + min?: number; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string?, number?, number?, string?] ): Promise { - let params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string }; + let params: { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + min?: number; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + min?: number; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, @@ -934,10 +1397,10 @@ export class Databases { attribute: rest[2] as string, value: rest[3] as number, min: rest[4] as number, - transactionId: rest[5] as string + transactionId: rest[5] as string, }; } - + const databaseId = params.databaseId; const collectionId = params.collectionId; const documentId = params.documentId; @@ -947,19 +1410,34 @@ export class Databases { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof collectionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "collectionId"'); + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); } if (typeof documentId === 'undefined') { - throw new AppwriteException('Missing required parameter: "documentId"'); + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); } if (typeof attribute === 'undefined') { - throw new AppwriteException('Missing required parameter: "attribute"'); - } - - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{documentId}', encodeURIComponent(String(documentId))).replace('{attribute}', encodeURIComponent(String(attribute))); + throw new AppwriteException( + 'Missing required parameter: "attribute"', + ); + } + const apiPath = + '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace('{documentId}', encodeURIComponent(String(documentId))) + .replace('{attribute}', encodeURIComponent(String(attribute))); const payload: Payload = {}; if (typeof value !== 'undefined') { payload['value'] = value; @@ -975,15 +1453,10 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -1000,7 +1473,17 @@ export class Databases { * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead. */ - incrementDocumentAttribute(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string }): Promise; + incrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + max?: number; + transactionId?: string; + }): Promise; /** * Increment a specific attribute of a document by a given value. * @@ -1015,15 +1498,57 @@ export class Databases { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - incrementDocumentAttribute(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string): Promise; - incrementDocumentAttribute( - paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string } | string, - ...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?] + incrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >( + databaseId: string, + collectionId: string, + documentId: string, + attribute: string, + value?: number, + max?: number, + transactionId?: string, + ): Promise; + incrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + max?: number; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string?, number?, number?, string?] ): Promise { - let params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string }; + let params: { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + max?: number; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + max?: number; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, @@ -1032,10 +1557,10 @@ export class Databases { attribute: rest[2] as string, value: rest[3] as number, max: rest[4] as number, - transactionId: rest[5] as string + transactionId: rest[5] as string, }; } - + const databaseId = params.databaseId; const collectionId = params.collectionId; const documentId = params.documentId; @@ -1045,19 +1570,34 @@ export class Databases { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof collectionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "collectionId"'); + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); } if (typeof documentId === 'undefined') { - throw new AppwriteException('Missing required parameter: "documentId"'); + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); } if (typeof attribute === 'undefined') { - throw new AppwriteException('Missing required parameter: "attribute"'); - } - - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{documentId}', encodeURIComponent(String(documentId))).replace('{attribute}', encodeURIComponent(String(attribute))); + throw new AppwriteException( + 'Missing required parameter: "attribute"', + ); + } + const apiPath = + '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace('{documentId}', encodeURIComponent(String(documentId))) + .replace('{attribute}', encodeURIComponent(String(attribute))); const payload: Payload = {}; if (typeof value !== 'undefined') { payload['value'] = value; @@ -1073,14 +1613,9 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } } diff --git a/src/services/documents-db.ts b/src/services/documents-db.ts new file mode 100644 index 00000000..996307bf --- /dev/null +++ b/src/services/documents-db.ts @@ -0,0 +1,1725 @@ +import { AppwriteException, Client, type Payload } from '../client'; +import type { Models } from '../models'; + +export class DocumentsDB { + client: Client; + + constructor(client: Client) { + this.client = client; + } + + /** + * List transactions across all databases. + * + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). + * @throws {AppwriteException} + * @returns {Promise} + */ + listTransactions(params?: { + queries?: string[]; + }): Promise; + /** + * List transactions across all databases. + * + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listTransactions(queries?: string[]): Promise; + listTransactions( + paramsOrFirst?: { queries?: string[] } | string[], + ): Promise { + let params: { queries?: string[] }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { queries?: string[] }; + } else { + params = { + queries: paramsOrFirst as string[], + }; + } + + const queries = params.queries; + + const apiPath = '/documentsdb/transactions'; + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Create a new transaction. + * + * @param {number} params.ttl - Seconds before the transaction expires. + * @throws {AppwriteException} + * @returns {Promise} + */ + createTransaction(params?: { ttl?: number }): Promise; + /** + * Create a new transaction. + * + * @param {number} ttl - Seconds before the transaction expires. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createTransaction(ttl?: number): Promise; + createTransaction( + paramsOrFirst?: { ttl?: number } | number, + ): Promise { + let params: { ttl?: number }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { ttl?: number }; + } else { + params = { + ttl: paramsOrFirst as number, + }; + } + + const ttl = params.ttl; + + const apiPath = '/documentsdb/transactions'; + const payload: Payload = {}; + if (typeof ttl !== 'undefined') { + payload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get a transaction by its unique ID. + * + * @param {string} params.transactionId - Transaction ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + getTransaction(params: { + transactionId: string; + }): Promise; + /** + * Get a transaction by its unique ID. + * + * @param {string} transactionId - Transaction ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getTransaction(transactionId: string): Promise; + getTransaction( + paramsOrFirst: { transactionId: string } | string, + ): Promise { + let params: { transactionId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { transactionId: string }; + } else { + params = { + transactionId: paramsOrFirst as string, + }; + } + + const transactionId = params.transactionId; + + if (typeof transactionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); + } + const apiPath = '/documentsdb/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Update a transaction, to either commit or roll back its operations. + * + * @param {string} params.transactionId - Transaction ID. + * @param {boolean} params.commit - Commit transaction? + * @param {boolean} params.rollback - Rollback transaction? + * @throws {AppwriteException} + * @returns {Promise} + */ + updateTransaction(params: { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }): Promise; + /** + * Update a transaction, to either commit or roll back its operations. + * + * @param {string} transactionId - Transaction ID. + * @param {boolean} commit - Commit transaction? + * @param {boolean} rollback - Rollback transaction? + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateTransaction( + transactionId: string, + commit?: boolean, + rollback?: boolean, + ): Promise; + updateTransaction( + paramsOrFirst: + | { transactionId: string; commit?: boolean; rollback?: boolean } + | string, + ...rest: [boolean?, boolean?] + ): Promise { + let params: { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }; + } else { + params = { + transactionId: paramsOrFirst as string, + commit: rest[0] as boolean, + rollback: rest[1] as boolean, + }; + } + + const transactionId = params.transactionId; + const commit = params.commit; + const rollback = params.rollback; + + if (typeof transactionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); + } + const apiPath = '/documentsdb/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); + const payload: Payload = {}; + if (typeof commit !== 'undefined') { + payload['commit'] = commit; + } + if (typeof rollback !== 'undefined') { + payload['rollback'] = rollback; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('patch', uri, apiHeaders, payload); + } + + /** + * Delete a transaction by its unique ID. + * + * @param {string} params.transactionId - Transaction ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteTransaction(params: { transactionId: string }): Promise<{}>; + /** + * Delete a transaction by its unique ID. + * + * @param {string} transactionId - Transaction ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteTransaction(transactionId: string): Promise<{}>; + deleteTransaction( + paramsOrFirst: { transactionId: string } | string, + ): Promise<{}> { + let params: { transactionId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { transactionId: string }; + } else { + params = { + transactionId: paramsOrFirst as string, + }; + } + + const transactionId = params.transactionId; + + if (typeof transactionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); + } + const apiPath = '/documentsdb/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } + + /** + * Create multiple operations in a single transaction. + * + * @param {string} params.transactionId - Transaction ID. + * @param {object[]} params.operations - Array of staged operations. + * @throws {AppwriteException} + * @returns {Promise} + */ + createOperations(params: { + transactionId: string; + operations?: object[]; + }): Promise; + /** + * Create multiple operations in a single transaction. + * + * @param {string} transactionId - Transaction ID. + * @param {object[]} operations - Array of staged operations. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createOperations( + transactionId: string, + operations?: object[], + ): Promise; + createOperations( + paramsOrFirst: + { transactionId: string; operations?: object[] } | string, + ...rest: [object[]?] + ): Promise { + let params: { transactionId: string; operations?: object[] }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + transactionId: string; + operations?: object[]; + }; + } else { + params = { + transactionId: paramsOrFirst as string, + operations: rest[0] as object[], + }; + } + + const transactionId = params.transactionId; + const operations = params.operations; + + if (typeof transactionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); + } + const apiPath = + '/documentsdb/transactions/{transactionId}/operations'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); + const payload: Payload = {}; + if (typeof operations !== 'undefined') { + payload['operations'] = operations; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + */ + listDocuments< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }): Promise>; + /** + * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listDocuments( + databaseId: string, + collectionId: string, + queries?: string[], + transactionId?: string, + total?: boolean, + ttl?: number, + ): Promise>; + listDocuments( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, string?, boolean?, number?] + ): Promise> { + let params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + queries: rest[1] as string[], + transactionId: rest[2] as string, + total: rest[3] as boolean, + ttl: rest[4] as number, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const queries = params.queries; + const transactionId = params.transactionId; + const total = params.total; + const ttl = params.ttl; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + if (typeof ttl !== 'undefined') { + payload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. + * @param {string} params.documentId - Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit} params.data - Document data as JSON object. + * @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + */ + createDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & Omit; + permissions?: string[]; + transactionId?: string; + }): Promise; + /** + * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. + * @param {string} documentId - Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit} data - Document data as JSON object. + * @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createDocument( + databaseId: string, + collectionId: string, + documentId: string, + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & Omit, + permissions?: string[], + transactionId?: string, + ): Promise; + createDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit)?, + string[]?, + string?, + ] + ): Promise { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit; + permissions?: string[]; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + data: rest[2] as Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit, + permissions: rest[3] as string[], + transactionId: rest[4] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const data = params.data; + const permissions = params.permissions; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + if (typeof data === 'undefined') { + throw new AppwriteException('Missing required parameter: "data"'); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); + const payload: Payload = {}; + if (typeof documentId !== 'undefined') { + payload['documentId'] = documentId; + } + if (typeof data !== 'undefined') { + payload['data'] = data; + } + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. + * @param {object[]} params.documents - Array of documents data as JSON objects. + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise>} + */ + createDocuments< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documents: object[]; + transactionId?: string; + }): Promise>; + /** + * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. + * @param {object[]} documents - Array of documents data as JSON objects. + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createDocuments( + databaseId: string, + collectionId: string, + documents: object[], + transactionId?: string, + ): Promise>; + createDocuments( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documents: object[]; + transactionId?: string; + } + | string, + ...rest: [string?, object[]?, string?] + ): Promise> { + let params: { + databaseId: string; + collectionId: string; + documents: object[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documents: object[]; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documents: rest[1] as object[], + transactionId: rest[2] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documents = params.documents; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documents === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documents"', + ); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); + const payload: Payload = {}; + if (typeof documents !== 'undefined') { + payload['documents'] = documents; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string} params.documentId - Document ID. + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @throws {AppwriteException} + * @returns {Promise} + */ + getDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + }): Promise; + /** + * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string} documentId - Document ID. + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getDocument( + databaseId: string, + collectionId: string, + documentId: string, + queries?: string[], + transactionId?: string, + ): Promise; + getDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string[]?, string?] + ): Promise { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + queries: rest[2] as string[], + transactionId: rest[3] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const queries = params.queries; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. + * @param {string} params.documentId - Document ID. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>} params.data - Document data as JSON object. Include all required fields of the document to be created or updated. + * @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + */ + upsertDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }): Promise; + /** + * Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. + * @param {string} documentId - Document ID. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>} data - Document data as JSON object. Include all required fields of the document to be created or updated. + * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + upsertDocument( + databaseId: string, + collectionId: string, + documentId: string, + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, + permissions?: string[], + transactionId?: string, + ): Promise; + upsertDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>)?, + string[]?, + string?, + ] + ): Promise { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + data: rest[2] as Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, + permissions: rest[3] as string[], + transactionId: rest[4] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const data = params.data; + const permissions = params.permissions; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); + const payload: Payload = {}; + if (typeof data !== 'undefined') { + payload['data'] = data; + } + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('put', uri, apiHeaders, payload); + } + + /** + * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. + * @param {string} params.documentId - Document ID. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>} params.data - Document data as JSON object. Include only fields and value pairs to be updated. + * @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + */ + updateDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }): Promise; + /** + * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. + * @param {string} documentId - Document ID. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>} data - Document data as JSON object. Include only fields and value pairs to be updated. + * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateDocument( + databaseId: string, + collectionId: string, + documentId: string, + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, + permissions?: string[], + transactionId?: string, + ): Promise; + updateDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>)?, + string[]?, + string?, + ] + ): Promise { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + data: rest[2] as Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, + permissions: rest[3] as string[], + transactionId: rest[4] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const data = params.data; + const permissions = params.permissions; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); + const payload: Payload = {}; + if (typeof data !== 'undefined') { + payload['data'] = data; + } + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('patch', uri, apiHeaders, payload); + } + + /** + * Delete a document by its unique ID. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string} params.documentId - Document ID. + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteDocument(params: { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + }): Promise<{}>; + /** + * Delete a document by its unique ID. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string} documentId - Document ID. + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteDocument( + databaseId: string, + collectionId: string, + documentId: string, + transactionId?: string, + ): Promise<{}>; + deleteDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string?] + ): Promise<{}> { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + transactionId: rest[2] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); + const payload: Payload = {}; + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } + + /** + * Decrement a specific column of a row by a given value. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. + * @param {string} params.documentId - Document ID. + * @param {string} params.attribute - Attribute key. + * @param {number} params.value - Value to decrement the attribute by. The value must be a number. + * @param {number} params.min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + */ + decrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + min?: number; + transactionId?: string; + }): Promise; + /** + * Decrement a specific column of a row by a given value. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. + * @param {string} documentId - Document ID. + * @param {string} attribute - Attribute key. + * @param {number} value - Value to decrement the attribute by. The value must be a number. + * @param {number} min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown. + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + decrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >( + databaseId: string, + collectionId: string, + documentId: string, + attribute: string, + value?: number, + min?: number, + transactionId?: string, + ): Promise; + decrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + min?: number; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string?, number?, number?, string?] + ): Promise { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + min?: number; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + min?: number; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + attribute: rest[2] as string, + value: rest[3] as number, + min: rest[4] as number, + transactionId: rest[5] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const attribute = params.attribute; + const value = params.value; + const min = params.min; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + if (typeof attribute === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "attribute"', + ); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace('{documentId}', encodeURIComponent(String(documentId))) + .replace('{attribute}', encodeURIComponent(String(attribute))); + const payload: Payload = {}; + if (typeof value !== 'undefined') { + payload['value'] = value; + } + if (typeof min !== 'undefined') { + payload['min'] = min; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('patch', uri, apiHeaders, payload); + } + + /** + * Increment a specific column of a row by a given value. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. + * @param {string} params.documentId - Document ID. + * @param {string} params.attribute - Attribute key. + * @param {number} params.value - Value to increment the attribute by. The value must be a number. + * @param {number} params.max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + */ + incrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + max?: number; + transactionId?: string; + }): Promise; + /** + * Increment a specific column of a row by a given value. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. + * @param {string} documentId - Document ID. + * @param {string} attribute - Attribute key. + * @param {number} value - Value to increment the attribute by. The value must be a number. + * @param {number} max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown. + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + incrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >( + databaseId: string, + collectionId: string, + documentId: string, + attribute: string, + value?: number, + max?: number, + transactionId?: string, + ): Promise; + incrementDocumentAttribute< + Document extends Models.Document = Models.DefaultDocument, + >( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + max?: number; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string?, number?, number?, string?] + ): Promise { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + max?: number; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + attribute: string; + value?: number; + max?: number; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + attribute: rest[2] as string, + value: rest[3] as number, + max: rest[4] as number, + transactionId: rest[5] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const attribute = params.attribute; + const value = params.value; + const max = params.max; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + if (typeof attribute === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "attribute"', + ); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace('{documentId}', encodeURIComponent(String(documentId))) + .replace('{attribute}', encodeURIComponent(String(attribute))); + const payload: Payload = {}; + if (typeof value !== 'undefined') { + payload['value'] = value; + } + if (typeof max !== 'undefined') { + payload['max'] = max; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('patch', uri, apiHeaders, payload); + } +} diff --git a/src/services/functions.ts b/src/services/functions.ts index ba9cae1c..41c969df 100644 --- a/src/services/functions.ts +++ b/src/services/functions.ts @@ -1,9 +1,7 @@ -import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; +import { AppwriteException, Client, type Payload } from '../client'; import type { Models } from '../models'; import { ExecutionMethod } from '../enums/execution-method'; - export class Functions { client: Client; @@ -20,7 +18,11 @@ export class Functions { * @throws {AppwriteException} * @returns {Promise} */ - listExecutions(params: { functionId: string, queries?: string[], total?: boolean }): Promise; + listExecutions(params: { + functionId: string; + queries?: string[]; + total?: boolean; + }): Promise; /** * Get a list of all the current user function execution logs. You can use the query params to filter your results. * @@ -31,32 +33,50 @@ export class Functions { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listExecutions(functionId: string, queries?: string[], total?: boolean): Promise; listExecutions( - paramsOrFirst: { functionId: string, queries?: string[], total?: boolean } | string, - ...rest: [(string[])?, (boolean)?] + functionId: string, + queries?: string[], + total?: boolean, + ): Promise; + listExecutions( + paramsOrFirst: + | { functionId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { functionId: string, queries?: string[], total?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { functionId: string, queries?: string[], total?: boolean }; + let params: { functionId: string; queries?: string[]; total?: boolean }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + functionId: string; + queries?: string[]; + total?: boolean; + }; } else { params = { functionId: paramsOrFirst as string, queries: rest[0] as string[], - total: rest[1] as boolean + total: rest[1] as boolean, }; } - + const functionId = params.functionId; const queries = params.queries; const total = params.total; if (typeof functionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "functionId"'); + throw new AppwriteException( + 'Missing required parameter: "functionId"', + ); } - - const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', encodeURIComponent(String(functionId))); + const apiPath = '/functions/{functionId}/executions'.replace( + '{functionId}', + encodeURIComponent(String(functionId)), + ); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -68,15 +88,10 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -92,7 +107,15 @@ export class Functions { * @throws {AppwriteException} * @returns {Promise} */ - createExecution(params: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string }): Promise; + createExecution(params: { + functionId: string; + body?: string; + async?: boolean; + xpath?: string; + method?: ExecutionMethod; + headers?: object; + scheduledAt?: string; + }): Promise; /** * Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously. * @@ -107,15 +130,60 @@ export class Functions { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string): Promise; createExecution( - paramsOrFirst: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string } | string, - ...rest: [(string)?, (boolean)?, (string)?, (ExecutionMethod)?, (object)?, (string)?] + functionId: string, + body?: string, + async?: boolean, + xpath?: string, + method?: ExecutionMethod, + headers?: object, + scheduledAt?: string, + ): Promise; + createExecution( + paramsOrFirst: + | { + functionId: string; + body?: string; + async?: boolean; + xpath?: string; + method?: ExecutionMethod; + headers?: object; + scheduledAt?: string; + } + | string, + ...rest: [ + string?, + boolean?, + string?, + ExecutionMethod?, + object?, + string?, + ] ): Promise { - let params: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string }; + let params: { + functionId: string; + body?: string; + async?: boolean; + xpath?: string; + method?: ExecutionMethod; + headers?: object; + scheduledAt?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + functionId: string; + body?: string; + async?: boolean; + xpath?: string; + method?: ExecutionMethod; + headers?: object; + scheduledAt?: string; + }; } else { params = { functionId: paramsOrFirst as string, @@ -124,10 +192,10 @@ export class Functions { xpath: rest[2] as string, method: rest[3] as ExecutionMethod, headers: rest[4] as object, - scheduledAt: rest[5] as string + scheduledAt: rest[5] as string, }; } - + const functionId = params.functionId; const body = params.body; const async = params.async; @@ -137,10 +205,14 @@ export class Functions { const scheduledAt = params.scheduledAt; if (typeof functionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "functionId"'); + throw new AppwriteException( + 'Missing required parameter: "functionId"', + ); } - - const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', encodeURIComponent(String(functionId))); + const apiPath = '/functions/{functionId}/executions'.replace( + '{functionId}', + encodeURIComponent(String(functionId)), + ); const payload: Payload = {}; if (typeof body !== 'undefined') { payload['body'] = body; @@ -165,15 +237,10 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -184,7 +251,10 @@ export class Functions { * @throws {AppwriteException} * @returns {Promise} */ - getExecution(params: { functionId: string, executionId: string }): Promise; + getExecution(params: { + functionId: string; + executionId: string; + }): Promise; /** * Get a function execution log by its unique ID. * @@ -194,46 +264,56 @@ export class Functions { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - getExecution(functionId: string, executionId: string): Promise; getExecution( - paramsOrFirst: { functionId: string, executionId: string } | string, - ...rest: [(string)?] + functionId: string, + executionId: string, + ): Promise; + getExecution( + paramsOrFirst: { functionId: string; executionId: string } | string, + ...rest: [string?] ): Promise { - let params: { functionId: string, executionId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { functionId: string, executionId: string }; + let params: { functionId: string; executionId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + functionId: string; + executionId: string; + }; } else { params = { functionId: paramsOrFirst as string, - executionId: rest[0] as string + executionId: rest[0] as string, }; } - + const functionId = params.functionId; const executionId = params.executionId; if (typeof functionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "functionId"'); + throw new AppwriteException( + 'Missing required parameter: "functionId"', + ); } if (typeof executionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "executionId"'); + throw new AppwriteException( + 'Missing required parameter: "executionId"', + ); } - - const apiPath = '/functions/{functionId}/executions/{executionId}'.replace('{functionId}', encodeURIComponent(String(functionId))).replace('{executionId}', encodeURIComponent(String(executionId))); + const apiPath = '/functions/{functionId}/executions/{executionId}' + .replace('{functionId}', encodeURIComponent(String(functionId))) + .replace('{executionId}', encodeURIComponent(String(executionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } } diff --git a/src/services/graphql.ts b/src/services/graphql.ts index 0823f622..819fe851 100644 --- a/src/services/graphql.ts +++ b/src/services/graphql.ts @@ -1,7 +1,4 @@ -import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; -import type { Models } from '../models'; - +import { AppwriteException, Client, type Payload } from '../client'; export class Graphql { client: Client; @@ -27,25 +24,27 @@ export class Graphql { * @deprecated Use the object parameter style method for a better developer experience. */ query(query: object): Promise<{}>; - query( - paramsOrFirst: { query: object } | object - ): Promise<{}> { + query(paramsOrFirst: { query: object } | object): Promise<{}> { let params: { query: object }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + 'query' in paramsOrFirst + ) { params = (paramsOrFirst || {}) as { query: object }; } else { params = { - query: paramsOrFirst as object + query: paramsOrFirst as object, }; } - + const query = params.query; if (typeof query === 'undefined') { throw new AppwriteException('Missing required parameter: "query"'); } - const apiPath = '/graphql'; const payload: Payload = {}; if (typeof query !== 'undefined') { @@ -57,15 +56,10 @@ export class Graphql { 'X-Appwrite-Project': this.client.config.project, 'x-sdk-graphql': 'true', 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -85,25 +79,27 @@ export class Graphql { * @deprecated Use the object parameter style method for a better developer experience. */ mutation(query: object): Promise<{}>; - mutation( - paramsOrFirst: { query: object } | object - ): Promise<{}> { + mutation(paramsOrFirst: { query: object } | object): Promise<{}> { let params: { query: object }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + 'query' in paramsOrFirst + ) { params = (paramsOrFirst || {}) as { query: object }; } else { params = { - query: paramsOrFirst as object + query: paramsOrFirst as object, }; } - + const query = params.query; if (typeof query === 'undefined') { throw new AppwriteException('Missing required parameter: "query"'); } - const apiPath = '/graphql/mutation'; const payload: Payload = {}; if (typeof query !== 'undefined') { @@ -115,14 +111,9 @@ export class Graphql { 'X-Appwrite-Project': this.client.config.project, 'x-sdk-graphql': 'true', 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } } diff --git a/src/services/locale.ts b/src/services/locale.ts index 41583e29..04a517f5 100644 --- a/src/services/locale.ts +++ b/src/services/locale.ts @@ -1,8 +1,6 @@ -import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; +import { Client, type Payload } from '../client'; import type { Models } from '../models'; - export class Locale { client: Client; @@ -12,29 +10,23 @@ export class Locale { /** * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. - * + * * ([IP Geolocation by DB-IP](https://db-ip.com)) * * @throws {AppwriteException} * @returns {Promise} */ get(): Promise { - const apiPath = '/locale'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } - - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -44,22 +36,16 @@ export class Locale { * @returns {Promise} */ listCodes(): Promise { - const apiPath = '/locale/codes'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } - - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -69,22 +55,16 @@ export class Locale { * @returns {Promise} */ listContinents(): Promise { - const apiPath = '/locale/continents'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } - - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -94,22 +74,16 @@ export class Locale { * @returns {Promise} */ listCountries(): Promise { - const apiPath = '/locale/countries'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } - - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -119,22 +93,16 @@ export class Locale { * @returns {Promise} */ listCountriesEU(): Promise { - const apiPath = '/locale/countries/eu'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } - - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -144,22 +112,16 @@ export class Locale { * @returns {Promise} */ listCountriesPhones(): Promise { - const apiPath = '/locale/countries/phones'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } - - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -169,22 +131,16 @@ export class Locale { * @returns {Promise} */ listCurrencies(): Promise { - const apiPath = '/locale/currencies'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } - - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -194,21 +150,15 @@ export class Locale { * @returns {Promise} */ listLanguages(): Promise { - const apiPath = '/locale/languages'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } - - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); } } diff --git a/src/services/messaging.ts b/src/services/messaging.ts index 0ad9b7fb..17e14ab5 100644 --- a/src/services/messaging.ts +++ b/src/services/messaging.ts @@ -1,8 +1,6 @@ -import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; +import { AppwriteException, Client, type Payload } from '../client'; import type { Models } from '../models'; - export class Messaging { client: Client; @@ -19,7 +17,11 @@ export class Messaging { * @throws {AppwriteException} * @returns {Promise} */ - createSubscriber(params: { topicId: string, subscriberId: string, targetId: string }): Promise; + createSubscriber(params: { + topicId: string; + subscriberId: string; + targetId: string; + }): Promise; /** * Create a new subscriber. * @@ -30,38 +32,60 @@ export class Messaging { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createSubscriber(topicId: string, subscriberId: string, targetId: string): Promise; createSubscriber( - paramsOrFirst: { topicId: string, subscriberId: string, targetId: string } | string, - ...rest: [(string)?, (string)?] + topicId: string, + subscriberId: string, + targetId: string, + ): Promise; + createSubscriber( + paramsOrFirst: + | { topicId: string; subscriberId: string; targetId: string } + | string, + ...rest: [string?, string?] ): Promise { - let params: { topicId: string, subscriberId: string, targetId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { topicId: string, subscriberId: string, targetId: string }; + let params: { topicId: string; subscriberId: string; targetId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + topicId: string; + subscriberId: string; + targetId: string; + }; } else { params = { topicId: paramsOrFirst as string, subscriberId: rest[0] as string, - targetId: rest[1] as string + targetId: rest[1] as string, }; } - + const topicId = params.topicId; const subscriberId = params.subscriberId; const targetId = params.targetId; if (typeof topicId === 'undefined') { - throw new AppwriteException('Missing required parameter: "topicId"'); + throw new AppwriteException( + 'Missing required parameter: "topicId"', + ); } if (typeof subscriberId === 'undefined') { - throw new AppwriteException('Missing required parameter: "subscriberId"'); + throw new AppwriteException( + 'Missing required parameter: "subscriberId"', + ); } if (typeof targetId === 'undefined') { - throw new AppwriteException('Missing required parameter: "targetId"'); + throw new AppwriteException( + 'Missing required parameter: "targetId"', + ); } - - const apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', encodeURIComponent(String(topicId))); + const apiPath = '/messaging/topics/{topicId}/subscribers'.replace( + '{topicId}', + encodeURIComponent(String(topicId)), + ); const payload: Payload = {}; if (typeof subscriberId !== 'undefined') { payload['subscriberId'] = subscriberId; @@ -74,15 +98,10 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -93,7 +112,10 @@ export class Messaging { * @throws {AppwriteException} * @returns {Promise<{}>} */ - deleteSubscriber(params: { topicId: string, subscriberId: string }): Promise<{}>; + deleteSubscriber(params: { + topicId: string; + subscriberId: string; + }): Promise<{}>; /** * Delete a subscriber by its unique ID. * @@ -105,44 +127,54 @@ export class Messaging { */ deleteSubscriber(topicId: string, subscriberId: string): Promise<{}>; deleteSubscriber( - paramsOrFirst: { topicId: string, subscriberId: string } | string, - ...rest: [(string)?] + paramsOrFirst: { topicId: string; subscriberId: string } | string, + ...rest: [string?] ): Promise<{}> { - let params: { topicId: string, subscriberId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { topicId: string, subscriberId: string }; + let params: { topicId: string; subscriberId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + topicId: string; + subscriberId: string; + }; } else { params = { topicId: paramsOrFirst as string, - subscriberId: rest[0] as string + subscriberId: rest[0] as string, }; } - + const topicId = params.topicId; const subscriberId = params.subscriberId; if (typeof topicId === 'undefined') { - throw new AppwriteException('Missing required parameter: "topicId"'); + throw new AppwriteException( + 'Missing required parameter: "topicId"', + ); } if (typeof subscriberId === 'undefined') { - throw new AppwriteException('Missing required parameter: "subscriberId"'); + throw new AppwriteException( + 'Missing required parameter: "subscriberId"', + ); } - - const apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', encodeURIComponent(String(topicId))).replace('{subscriberId}', encodeURIComponent(String(subscriberId))); + const apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}' + .replace('{topicId}', encodeURIComponent(String(topicId))) + .replace( + '{subscriberId}', + encodeURIComponent(String(subscriberId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } } diff --git a/src/services/organization.ts b/src/services/organization.ts new file mode 100644 index 00000000..9688571e --- /dev/null +++ b/src/services/organization.ts @@ -0,0 +1,342 @@ +import { AppwriteException, Client, type Payload } from '../client'; +import type { Models } from '../models'; + +export class Organization { + client: Client; + + constructor(client: Client) { + this.client = client; + } + + /** + * List app installations on the organization. Any organization member can read installations. + * + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + */ + listInstallations(params?: { + queries?: string[]; + total?: boolean; + }): Promise; + /** + * List app installations on the organization. Any organization member can read installations. + * + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listInstallations( + queries?: string[], + total?: boolean, + ): Promise; + listInstallations( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] + ): Promise { + let params: { queries?: string[]; total?: boolean }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; + } else { + params = { + queries: paramsOrFirst as string[], + total: rest[0] as boolean, + }; + } + + const queries = params.queries; + const total = params.total; + + const apiPath = '/organization/installations'; + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests. + * + * @param {string} params.appId - Application unique ID. + * @param {string} params.authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here. + * @throws {AppwriteException} + * @returns {Promise} + */ + createInstallation(params: { + appId: string; + authorizationDetails?: string; + }): Promise; + /** + * Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests. + * + * @param {string} appId - Application unique ID. + * @param {string} authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createInstallation( + appId: string, + authorizationDetails?: string, + ): Promise; + createInstallation( + paramsOrFirst: + { appId: string; authorizationDetails?: string } | string, + ...rest: [string?] + ): Promise { + let params: { appId: string; authorizationDetails?: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + authorizationDetails?: string; + }; + } else { + params = { + appId: paramsOrFirst as string, + authorizationDetails: rest[0] as string, + }; + } + + const appId = params.appId; + const authorizationDetails = params.authorizationDetails; + + if (typeof appId === 'undefined') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + const apiPath = '/organization/installations'; + const payload: Payload = {}; + if (typeof appId !== 'undefined') { + payload['appId'] = appId; + } + if (typeof authorizationDetails !== 'undefined') { + payload['authorizationDetails'] = authorizationDetails; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get an app installation on the organization by its unique ID. Any organization member can read installations. + * + * @param {string} params.installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + getInstallation(params: { + installationId: string; + }): Promise; + /** + * Get an app installation on the organization by its unique ID. Any organization member can read installations. + * + * @param {string} installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getInstallation(installationId: string): Promise; + getInstallation( + paramsOrFirst: { installationId: string } | string, + ): Promise { + let params: { installationId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { installationId: string }; + } else { + params = { + installationId: paramsOrFirst as string, + }; + } + + const installationId = params.installationId; + + if (typeof installationId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "installationId"', + ); + } + const apiPath = '/organization/installations/{installationId}'.replace( + '{installationId}', + encodeURIComponent(String(installationId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked. + * + * @param {string} params.installationId - Installation unique ID. + * @param {string} params.authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value. + * @throws {AppwriteException} + * @returns {Promise} + */ + updateInstallation(params: { + installationId: string; + authorizationDetails?: string; + }): Promise; + /** + * Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked. + * + * @param {string} installationId - Installation unique ID. + * @param {string} authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateInstallation( + installationId: string, + authorizationDetails?: string, + ): Promise; + updateInstallation( + paramsOrFirst: + { installationId: string; authorizationDetails?: string } | string, + ...rest: [string?] + ): Promise { + let params: { installationId: string; authorizationDetails?: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + installationId: string; + authorizationDetails?: string; + }; + } else { + params = { + installationId: paramsOrFirst as string, + authorizationDetails: rest[0] as string, + }; + } + + const installationId = params.installationId; + const authorizationDetails = params.authorizationDetails; + + if (typeof installationId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "installationId"', + ); + } + const apiPath = '/organization/installations/{installationId}'.replace( + '{installationId}', + encodeURIComponent(String(installationId)), + ); + const payload: Payload = {}; + if (typeof authorizationDetails !== 'undefined') { + payload['authorizationDetails'] = authorizationDetails; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('put', uri, apiHeaders, payload); + } + + /** + * Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked. + * + * @param {string} params.installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteInstallation(params: { installationId: string }): Promise<{}>; + /** + * Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked. + * + * @param {string} installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteInstallation(installationId: string): Promise<{}>; + deleteInstallation( + paramsOrFirst: { installationId: string } | string, + ): Promise<{}> { + let params: { installationId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { installationId: string }; + } else { + params = { + installationId: paramsOrFirst as string, + }; + } + + const installationId = params.installationId; + + if (typeof installationId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "installationId"', + ); + } + const apiPath = '/organization/installations/{installationId}'.replace( + '{installationId}', + encodeURIComponent(String(installationId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } +} diff --git a/src/services/presences.ts b/src/services/presences.ts index 254cba69..466e6ce9 100644 --- a/src/services/presences.ts +++ b/src/services/presences.ts @@ -1,8 +1,6 @@ -import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; +import { AppwriteException, Client, type Payload } from '../client'; import type { Models } from '../models'; - export class Presences { client: Client; @@ -12,7 +10,7 @@ export class Presences { /** * List presence logs. Expired entries are filtered out automatically. - * + * * * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. @@ -20,10 +18,14 @@ export class Presences { * @throws {AppwriteException} * @returns {Promise} */ - list(params?: { queries?: string[], total?: boolean, ttl?: number }): Promise; + list(params?: { + queries?: string[]; + total?: boolean; + ttl?: number; + }): Promise; /** * List presence logs. Expired entries are filtered out automatically. - * + * * * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. @@ -32,28 +34,41 @@ export class Presences { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - list(queries?: string[], total?: boolean, ttl?: number): Promise; list( - paramsOrFirst?: { queries?: string[], total?: boolean, ttl?: number } | string[], - ...rest: [(boolean)?, (number)?] + queries?: string[], + total?: boolean, + ttl?: number, + ): Promise; + list( + paramsOrFirst?: + { queries?: string[]; total?: boolean; ttl?: number } | string[], + ...rest: [boolean?, number?] ): Promise { - let params: { queries?: string[], total?: boolean, ttl?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { queries?: string[], total?: boolean, ttl?: number }; + let params: { queries?: string[]; total?: boolean; ttl?: number }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + ttl?: number; + }; } else { params = { queries: paramsOrFirst as string[], total: rest[0] as boolean, - ttl: rest[1] as number + ttl: rest[1] as number, }; } - + const queries = params.queries; const total = params.total; const ttl = params.ttl; - const apiPath = '/presences'; const payload: Payload = {}; if (typeof queries !== 'undefined') { @@ -69,20 +84,15 @@ export class Presences { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** * Get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found. - * + * * * @param {string} params.presenceId - Presence unique ID. * @throws {AppwriteException} @@ -91,7 +101,7 @@ export class Presences { get(params: { presenceId: string }): Promise; /** * Get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found. - * + * * * @param {string} presenceId - Presence unique ID. * @throws {AppwriteException} @@ -100,44 +110,47 @@ export class Presences { */ get(presenceId: string): Promise; get( - paramsOrFirst: { presenceId: string } | string + paramsOrFirst: { presenceId: string } | string, ): Promise { let params: { presenceId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { presenceId: string }; } else { params = { - presenceId: paramsOrFirst as string + presenceId: paramsOrFirst as string, }; } - + const presenceId = params.presenceId; if (typeof presenceId === 'undefined') { - throw new AppwriteException('Missing required parameter: "presenceId"'); + throw new AppwriteException( + 'Missing required parameter: "presenceId"', + ); } - - const apiPath = '/presences/{presenceId}'.replace('{presenceId}', encodeURIComponent(String(presenceId))); + const apiPath = '/presences/{presenceId}'.replace( + '{presenceId}', + encodeURIComponent(String(presenceId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** * Create or update a presence log by its user ID. - * + * * * @param {string} params.presenceId - Presence unique ID. * @param {string} params.status - Presence status. @@ -147,10 +160,16 @@ export class Presences { * @throws {AppwriteException} * @returns {Promise} */ - upsert(params: { presenceId: string, status: string, permissions?: string[], expiresAt?: string, metadata?: object }): Promise; + upsert(params: { + presenceId: string; + status: string; + permissions?: string[]; + expiresAt?: string; + metadata?: object; + }): Promise; /** * Create or update a presence log by its user ID. - * + * * * @param {string} presenceId - Presence unique ID. * @param {string} status - Presence status. @@ -161,25 +180,55 @@ export class Presences { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - upsert(presenceId: string, status: string, permissions?: string[], expiresAt?: string, metadata?: object): Promise; upsert( - paramsOrFirst: { presenceId: string, status: string, permissions?: string[], expiresAt?: string, metadata?: object } | string, - ...rest: [(string)?, (string[])?, (string)?, (object)?] + presenceId: string, + status: string, + permissions?: string[], + expiresAt?: string, + metadata?: object, + ): Promise; + upsert( + paramsOrFirst: + | { + presenceId: string; + status: string; + permissions?: string[]; + expiresAt?: string; + metadata?: object; + } + | string, + ...rest: [string?, string[]?, string?, object?] ): Promise { - let params: { presenceId: string, status: string, permissions?: string[], expiresAt?: string, metadata?: object }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { presenceId: string, status: string, permissions?: string[], expiresAt?: string, metadata?: object }; + let params: { + presenceId: string; + status: string; + permissions?: string[]; + expiresAt?: string; + metadata?: object; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + presenceId: string; + status: string; + permissions?: string[]; + expiresAt?: string; + metadata?: object; + }; } else { params = { presenceId: paramsOrFirst as string, status: rest[0] as string, permissions: rest[1] as string[], expiresAt: rest[2] as string, - metadata: rest[3] as object + metadata: rest[3] as object, }; } - + const presenceId = params.presenceId; const status = params.status; const permissions = params.permissions; @@ -187,13 +236,17 @@ export class Presences { const metadata = params.metadata; if (typeof presenceId === 'undefined') { - throw new AppwriteException('Missing required parameter: "presenceId"'); + throw new AppwriteException( + 'Missing required parameter: "presenceId"', + ); } if (typeof status === 'undefined') { throw new AppwriteException('Missing required parameter: "status"'); } - - const apiPath = '/presences/{presenceId}'.replace('{presenceId}', encodeURIComponent(String(presenceId))); + const apiPath = '/presences/{presenceId}'.replace( + '{presenceId}', + encodeURIComponent(String(presenceId)), + ); const payload: Payload = {}; if (typeof status !== 'undefined') { payload['status'] = status; @@ -212,20 +265,15 @@ export class Presences { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** * Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated. - * + * * * @param {string} params.presenceId - Presence unique ID. * @param {string} params.status - Presence status. @@ -236,10 +284,17 @@ export class Presences { * @throws {AppwriteException} * @returns {Promise} */ - update(params: { presenceId: string, status?: string, expiresAt?: string, metadata?: object, permissions?: string[], purge?: boolean }): Promise; + update(params: { + presenceId: string; + status?: string; + expiresAt?: string; + metadata?: object; + permissions?: string[]; + purge?: boolean; + }): Promise; /** * Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated. - * + * * * @param {string} presenceId - Presence unique ID. * @param {string} status - Presence status. @@ -251,15 +306,49 @@ export class Presences { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - update(presenceId: string, status?: string, expiresAt?: string, metadata?: object, permissions?: string[], purge?: boolean): Promise; update( - paramsOrFirst: { presenceId: string, status?: string, expiresAt?: string, metadata?: object, permissions?: string[], purge?: boolean } | string, - ...rest: [(string)?, (string)?, (object)?, (string[])?, (boolean)?] + presenceId: string, + status?: string, + expiresAt?: string, + metadata?: object, + permissions?: string[], + purge?: boolean, + ): Promise; + update( + paramsOrFirst: + | { + presenceId: string; + status?: string; + expiresAt?: string; + metadata?: object; + permissions?: string[]; + purge?: boolean; + } + | string, + ...rest: [string?, string?, object?, string[]?, boolean?] ): Promise { - let params: { presenceId: string, status?: string, expiresAt?: string, metadata?: object, permissions?: string[], purge?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { presenceId: string, status?: string, expiresAt?: string, metadata?: object, permissions?: string[], purge?: boolean }; + let params: { + presenceId: string; + status?: string; + expiresAt?: string; + metadata?: object; + permissions?: string[]; + purge?: boolean; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + presenceId: string; + status?: string; + expiresAt?: string; + metadata?: object; + permissions?: string[]; + purge?: boolean; + }; } else { params = { presenceId: paramsOrFirst as string, @@ -267,10 +356,10 @@ export class Presences { expiresAt: rest[1] as string, metadata: rest[2] as object, permissions: rest[3] as string[], - purge: rest[4] as boolean + purge: rest[4] as boolean, }; } - + const presenceId = params.presenceId; const status = params.status; const expiresAt = params.expiresAt; @@ -279,10 +368,14 @@ export class Presences { const purge = params.purge; if (typeof presenceId === 'undefined') { - throw new AppwriteException('Missing required parameter: "presenceId"'); + throw new AppwriteException( + 'Missing required parameter: "presenceId"', + ); } - - const apiPath = '/presences/{presenceId}'.replace('{presenceId}', encodeURIComponent(String(presenceId))); + const apiPath = '/presences/{presenceId}'.replace( + '{presenceId}', + encodeURIComponent(String(presenceId)), + ); const payload: Payload = {}; if (typeof status !== 'undefined') { payload['status'] = status; @@ -304,20 +397,15 @@ export class Presences { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** * Delete a presence log by its unique ID. - * + * * * @param {string} params.presenceId - Presence unique ID. * @throws {AppwriteException} @@ -326,7 +414,7 @@ export class Presences { delete(params: { presenceId: string }): Promise<{}>; /** * Delete a presence log by its unique ID. - * + * * * @param {string} presenceId - Presence unique ID. * @throws {AppwriteException} @@ -334,39 +422,40 @@ export class Presences { * @deprecated Use the object parameter style method for a better developer experience. */ delete(presenceId: string): Promise<{}>; - delete( - paramsOrFirst: { presenceId: string } | string - ): Promise<{}> { + delete(paramsOrFirst: { presenceId: string } | string): Promise<{}> { let params: { presenceId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { presenceId: string }; } else { params = { - presenceId: paramsOrFirst as string + presenceId: paramsOrFirst as string, }; } - + const presenceId = params.presenceId; if (typeof presenceId === 'undefined') { - throw new AppwriteException('Missing required parameter: "presenceId"'); + throw new AppwriteException( + 'Missing required parameter: "presenceId"', + ); } - - const apiPath = '/presences/{presenceId}'.replace('{presenceId}', encodeURIComponent(String(presenceId))); + const apiPath = '/presences/{presenceId}'.replace( + '{presenceId}', + encodeURIComponent(String(presenceId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } } diff --git a/src/services/realtime.ts b/src/services/realtime.ts index ebd41313..91aff434 100644 --- a/src/services/realtime.ts +++ b/src/services/realtime.ts @@ -2,11 +2,10 @@ import { AppwriteException, Client, JSONbig } from '../client'; import { Channel, ActionableChannel, ResolvedChannel } from '../channel'; import { Query } from '../query'; import { ID } from '../id'; - export type RealtimeSubscriptionUpdate = { channels?: (string | Channel | ActionableChannel | ResolvedChannel)[]; queries?: (string | Query)[]; -} +}; export type RealtimeSubscription = { /** @@ -25,18 +24,18 @@ export type RealtimeSubscription = { * Prefer `unsubscribe()` for per-subscription teardown and `Realtime.disconnect()` for full shutdown. */ close: () => Promise; -} +}; export type RealtimeCallback = { channels: Set; queries: string[]; // Array of query strings callback: (event: RealtimeResponseEvent) => void; -} +}; export type RealtimeResponse = { type: string; data?: any; -} +}; export type RealtimeResponseEvent = { events: string[]; @@ -44,17 +43,17 @@ export type RealtimeResponseEvent = { timestamp: string; payload: T; subscriptions: string[]; // Backend-provided subscription IDs -} +}; export type RealtimeResponseConnected = { channels: string[]; user?: object; -} +}; export type RealtimeRequest = { type: 'authentication' | 'subscribe' | 'unsubscribe' | 'presence'; data: any; -} +}; export type RealtimePresence = { $id: string; @@ -67,25 +66,25 @@ export type RealtimePresence = { status?: string; source: string; metadata?: Record; -} +}; export type RealtimePresenceCreate = { status: string; presenceId: string; permissions?: string[]; metadata?: Record; -} +}; type RealtimeRequestSubscribeRow = { subscriptionId?: string; channels: string[]; queries: string[]; -} +}; export enum RealtimeCode { NORMAL_CLOSURE = 1000, POLICY_VIOLATION = 1008, - UNKNOWN_ERROR = -1 + UNKNOWN_ERROR = -1, } export class Realtime { @@ -113,7 +112,9 @@ export class Realtime { private connectionId = 0; private reconnect = true; - private onErrorCallbacks: Array<(error?: Error, statusCode?: number) => void> = []; + private onErrorCallbacks: Array< + (error?: Error, statusCode?: number) => void + > = []; private onCloseCallbacks: Array<() => void> = []; private onOpenCallbacks: Array<() => void> = []; @@ -127,7 +128,9 @@ export class Realtime { * @param {Function} callback - Callback function to handle errors * @returns {void} */ - public onError(callback: (error?: Error, statusCode?: number) => void): void { + public onError( + callback: (error?: Error, statusCode?: number) => void, + ): void { this.onErrorCallbacks.push(callback); } @@ -211,7 +214,6 @@ export class Realtime { if (jwt) { queryParams += `&jwt=${encodeURIComponent(jwt)}`; } - const endpoint = this.client.config.endpointRealtime !== '' ? this.client.config.endpointRealtime @@ -243,13 +245,12 @@ export class Realtime { try { const connectionId = ++this.connectionId; const socket = (this.socket = new WebSocket(url)); - socket.addEventListener('open', () => { if (connectionId !== this.connectionId) { return; } this.reconnectAttempts = 0; - this.onOpenCallbacks.forEach(callback => callback()); + this.onOpenCallbacks.forEach((callback) => callback()); this.startHeartbeat(); resolve(); }); @@ -259,7 +260,9 @@ export class Realtime { return; } try { - const message = JSONbig.parse(event.data) as RealtimeResponse; + const message = JSONbig.parse( + event.data, + ) as RealtimeResponse; this.handleMessage(message); } catch (error) { console.error('Failed to parse message:', error); @@ -267,20 +270,28 @@ export class Realtime { }); socket.addEventListener('close', async (event: CloseEvent) => { - if (connectionId !== this.connectionId || socket !== this.socket) { + if ( + connectionId !== this.connectionId || + socket !== this.socket + ) { return; } this.appConnected = false; this.stopHeartbeat(); - this.onCloseCallbacks.forEach(callback => callback()); + this.onCloseCallbacks.forEach((callback) => callback()); - if (!this.reconnect || event.code === RealtimeCode.POLICY_VIOLATION) { + if ( + !this.reconnect || + event.code === RealtimeCode.POLICY_VIOLATION + ) { this.reconnect = true; return; } const timeout = this.getTimeout(); - console.log(`Realtime disconnected. Re-connecting in ${timeout / 1000} seconds.`); + console.log( + `Realtime disconnected. Re-connecting in ${timeout / 1000} seconds.`, + ); await this.sleep(timeout); this.reconnectAttempts++; @@ -292,14 +303,19 @@ export class Realtime { } }); - socket.addEventListener('error', (event: Event) => { - if (connectionId !== this.connectionId || socket !== this.socket) { + socket.addEventListener('error', (_event: Event) => { + if ( + connectionId !== this.connectionId || + socket !== this.socket + ) { return; } this.stopHeartbeat(); const error = new Error('WebSocket error'); console.error('WebSocket error:', error.message); - this.onErrorCallbacks.forEach(callback => callback(error)); + this.onErrorCallbacks.forEach((callback) => + callback(error), + ); reject(error); }); } catch (error) { @@ -318,11 +334,17 @@ export class Realtime { return; } - if (this.socket.readyState === WebSocket.OPEN || - this.socket.readyState === WebSocket.CONNECTING) { - this.socket.addEventListener('close', () => { - resolve(); - }, { once: true }); + if ( + this.socket.readyState === WebSocket.OPEN || + this.socket.readyState === WebSocket.CONNECTING + ) { + this.socket.addEventListener( + 'close', + () => { + resolve(); + }, + { once: true }, + ); this.socket.close(RealtimeCode.NORMAL_CLOSURE); } else { resolve(); @@ -344,21 +366,25 @@ export class Realtime { } private sleep(ms: number): Promise { - return new Promise(resolve => setTimeout(resolve, ms)); + return new Promise((resolve) => setTimeout(resolve, ms)); } private sendUnsubscribeMessage(subscriptionIds: string[]): void { - const ids = subscriptionIds.filter(id => typeof id === 'string' && id.length > 0); + const ids = subscriptionIds.filter( + (id) => typeof id === 'string' && id.length > 0, + ); if (ids.length === 0) { return; } if (!this.socket || this.socket.readyState !== WebSocket.OPEN) { return; } - this.socket.send(JSONbig.stringify({ - type: 'unsubscribe', - data: ids.map(subscriptionId => ({ subscriptionId })) - })); + this.socket.send( + JSONbig.stringify({ + type: 'unsubscribe', + data: ids.map((subscriptionId) => ({ subscriptionId })), + }), + ); } private generateUniqueSubscriptionId(): string { @@ -369,7 +395,9 @@ export class Realtime { return id; } } - throw new AppwriteException('Failed to generate unique subscription id'); + throw new AppwriteException( + 'Failed to generate unique subscription id', + ); } private enqueuePendingSubscribe(subscriptionId: string): void { @@ -380,7 +408,7 @@ export class Realtime { this.pendingSubscribes.set(subscriptionId, { subscriptionId, channels: Array.from(subscription.channels), - queries: subscription.queries ?? [] + queries: subscription.queries ?? [], }); } @@ -431,10 +459,12 @@ export class Realtime { const rows = Array.from(this.pendingSubscribes.values()); this.pendingSubscribes.clear(); - this.socket.send(JSONbig.stringify({ - type: 'subscribe', - data: rows - })); + this.socket.send( + JSONbig.stringify({ + type: 'subscribe', + data: rows, + }), + ); } /** @@ -444,12 +474,17 @@ export class Realtime { * @param {string | Channel | ActionableChannel | ResolvedChannel} channel - Channel value (string or Channel builder instance) * @returns {string} Channel string representation */ - private channelToString(channel: string | Channel | ActionableChannel | ResolvedChannel): string { + private channelToString( + channel: string | Channel | ActionableChannel | ResolvedChannel, + ): string { if (typeof channel === 'string') { return channel; } // All Channel instances have toString() method - if (channel && typeof (channel as Channel).toString === 'function') { + if ( + channel && + typeof (channel as Channel).toString === 'function' + ) { return (channel as Channel).toString(); } return String(channel); @@ -465,7 +500,7 @@ export class Realtime { public async subscribe( channel: string | Channel | ActionableChannel | ResolvedChannel, callback: (event: RealtimeResponseEvent) => void, - queries?: (string | Query)[] + queries?: (string | Query)[], ): Promise; /** @@ -476,9 +511,11 @@ export class Realtime { * @returns {Promise} Subscription object with close method */ public async subscribe( - channels: (string | Channel | ActionableChannel | ResolvedChannel)[], + channels: ( + string | Channel | ActionableChannel | ResolvedChannel + )[], callback: (event: RealtimeResponseEvent) => void, - queries?: (string | Query)[] + queries?: (string | Query)[], ): Promise; /** @@ -491,7 +528,7 @@ export class Realtime { public async subscribe( channel: string | Channel | ActionableChannel | ResolvedChannel, callback: (event: RealtimeResponseEvent) => void, - queries?: (string | Query)[] + queries?: (string | Query)[], ): Promise; /** @@ -502,32 +539,43 @@ export class Realtime { * @returns {Promise} Subscription object with close method */ public async subscribe( - channels: (string | Channel | ActionableChannel | ResolvedChannel)[], + channels: ( + string | Channel | ActionableChannel | ResolvedChannel + )[], callback: (event: RealtimeResponseEvent) => void, - queries?: (string | Query)[] + queries?: (string | Query)[], ): Promise; public async subscribe( - channelsOrChannel: string | Channel | ActionableChannel | ResolvedChannel | (string | Channel | ActionableChannel | ResolvedChannel)[], + channelsOrChannel: + | string + | Channel + | ActionableChannel + | ResolvedChannel + | (string | Channel | ActionableChannel | ResolvedChannel)[], callback: (event: RealtimeResponseEvent) => void, - queries: (string | Query)[] = [] + queries: (string | Query)[] = [], ): Promise { const channelArray = Array.isArray(channelsOrChannel) ? channelsOrChannel : [channelsOrChannel]; - + // Convert all channels to strings - const channelStrings = channelArray.map(ch => this.channelToString(ch)); + const channelStrings = channelArray.map((ch) => + this.channelToString(ch), + ); const channels = new Set(channelStrings); // Convert queries to array of strings // Ensure each query is a separate string in the array const queryStrings: string[] = []; - for (const q of (queries ?? [])) { + for (const q of queries ?? []) { if (Array.isArray(q)) { // Handle nested arrays: [[q1, q2]] -> [q1, q2] for (const inner of q) { - queryStrings.push(typeof inner === 'string' ? inner : inner.toString()); + queryStrings.push( + typeof inner === 'string' ? inner : inner.toString(), + ); } } else { queryStrings.push(typeof q === 'string' ? q : q.toString()); @@ -539,7 +587,7 @@ export class Realtime { this.activeSubscriptions.set(subscriptionId, { channels, queries: queryStrings, - callback + callback, }); this.enqueuePendingSubscribe(subscriptionId); @@ -567,14 +615,18 @@ export class Realtime { this.sendUnsubscribeMessage([subscriptionId]); }; - const update = async (changes: RealtimeSubscriptionUpdate): Promise => { + const update = async ( + changes: RealtimeSubscriptionUpdate, + ): Promise => { const subscription = this.activeSubscriptions.get(subscriptionId); if (!subscription) { return; } if (changes.channels !== undefined) { - const nextChannelStrings = changes.channels.map(ch => this.channelToString(ch)); + const nextChannelStrings = changes.channels.map((ch) => + this.channelToString(ch), + ); subscription.channels = new Set(nextChannelStrings); } @@ -583,10 +635,16 @@ export class Realtime { for (const q of changes.queries) { if (Array.isArray(q)) { for (const inner of q) { - nextQueries.push(typeof inner === 'string' ? inner : (inner as Query).toString()); + nextQueries.push( + typeof inner === 'string' + ? inner + : (inner as Query).toString(), + ); } } else { - nextQueries.push(typeof q === 'string' ? q : q.toString()); + nextQueries.push( + typeof q === 'string' ? q : q.toString(), + ); } } subscription.queries = nextQueries; @@ -599,7 +657,10 @@ export class Realtime { await this.sleep(this.DEBOUNCE_MS); if (this.subCallDepth === 1) { - if (!this.socket || this.socket.readyState > WebSocket.OPEN) { + if ( + !this.socket || + this.socket.readyState > WebSocket.OPEN + ) { await this.createSocket(); } else if (this.socket.readyState === WebSocket.OPEN) { this.sendPendingSubscribes(); @@ -655,7 +716,10 @@ export class Realtime { // payload is stored. if (!this.socket || this.socket.readyState >= WebSocket.CLOSING) { this.createSocket().catch((error) => { - console.error('Failed to open realtime socket for presence:', error); + console.error( + 'Failed to open realtime socket for presence:', + error, + ); }); } @@ -675,10 +739,12 @@ export class Realtime { if (!this.appConnected) { return; } - this.socket.send(JSONbig.stringify({ - type: 'presence', - data: this.pendingPresence - })); + this.socket.send( + JSONbig.stringify({ + type: 'presence', + data: this.pendingPresence, + }), + ); } private handleMessage(message: RealtimeResponse): void { @@ -712,7 +778,9 @@ export class Realtime { let session = this.client.config.session; if (!session) { try { - const cookie = JSONbig.parse(window.localStorage.getItem('cookieFallback') ?? '{}'); + const cookie = JSONbig.parse( + window.localStorage.getItem('cookieFallback') ?? '{}', + ); session = cookie?.[`a_session_${this.client.config.project}`]; } catch (error) { console.error('Failed to parse cookie fallback:', error); @@ -720,12 +788,14 @@ export class Realtime { } if (session && !messageData.user) { - this.socket?.send(JSONbig.stringify({ - type: 'authentication', - data: { - session - } - })); + this.socket?.send( + JSONbig.stringify({ + type: 'authentication', + data: { + session, + }, + }), + ); } for (const subscriptionId of this.activeSubscriptions.keys()) { @@ -738,10 +808,12 @@ export class Realtime { private handleResponseError(message: RealtimeResponse): void { const error = new AppwriteException( - message.data?.message || 'Unknown error' + message.data?.message || 'Unknown error', ); const statusCode = message.data?.code; - this.onErrorCallbacks.forEach(callback => callback(error, statusCode)); + this.onErrorCallbacks.forEach((callback) => + callback(error, statusCode), + ); } private handleResponseEvent(message: RealtimeResponse): void { @@ -756,7 +828,13 @@ export class Realtime { const timestamp = data.timestamp as string; const subscriptions = data.subscriptions as string[] | undefined; - if (!channels || !events || !payload || !subscriptions || subscriptions.length === 0) { + if ( + !channels || + !events || + !payload || + !subscriptions || + subscriptions.length === 0 + ) { return; } @@ -770,7 +848,7 @@ export class Realtime { channels, timestamp, payload, - subscriptions + subscriptions, }); } } diff --git a/src/services/storage.ts b/src/services/storage.ts index 0e4c093a..3de50c67 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -1,10 +1,14 @@ import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; +import { + AppwriteException, + Client, + type Payload, + UploadProgress, +} from '../client'; import type { Models } from '../models'; import { ImageGravity } from '../enums/image-gravity'; import { ImageFormat } from '../enums/image-format'; - export class Storage { client: Client; @@ -16,52 +20,87 @@ export class Storage { * Get a list of all the user files. You can use the query params to filter your results. * * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). - * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, folder, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded * @param {string} params.search - Search term to filter your list results. Max length: 256 chars. * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ - listFiles(params: { bucketId: string, queries?: string[], search?: string, total?: boolean }): Promise; + listFiles(params: { + bucketId: string; + queries?: string[]; + search?: string; + total?: boolean; + }): Promise; /** * Get a list of all the user files. You can use the query params to filter your results. * * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). - * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, folder, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded * @param {string} search - Search term to filter your list results. Max length: 256 chars. * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise; listFiles( - paramsOrFirst: { bucketId: string, queries?: string[], search?: string, total?: boolean } | string, - ...rest: [(string[])?, (string)?, (boolean)?] + bucketId: string, + queries?: string[], + search?: string, + total?: boolean, + ): Promise; + listFiles( + paramsOrFirst: + | { + bucketId: string; + queries?: string[]; + search?: string; + total?: boolean; + } + | string, + ...rest: [string[]?, string?, boolean?] ): Promise { - let params: { bucketId: string, queries?: string[], search?: string, total?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { bucketId: string, queries?: string[], search?: string, total?: boolean }; + let params: { + bucketId: string; + queries?: string[]; + search?: string; + total?: boolean; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + bucketId: string; + queries?: string[]; + search?: string; + total?: boolean; + }; } else { params = { bucketId: paramsOrFirst as string, queries: rest[0] as string[], search: rest[1] as string, - total: rest[2] as boolean + total: rest[2] as boolean, }; } - + const bucketId = params.bucketId; const queries = params.queries; const search = params.search; const total = params.total; if (typeof bucketId === 'undefined') { - throw new AppwriteException('Missing required parameter: "bucketId"'); + throw new AppwriteException( + 'Missing required parameter: "bucketId"', + ); } - - const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', encodeURIComponent(String(bucketId))); + const apiPath = '/storage/buckets/{bucketId}/files'.replace( + '{bucketId}', + encodeURIComponent(String(bucketId)), + ); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -76,81 +115,129 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. - * + * * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes. - * + * * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one. - * + * * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. - * + * * * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param {string} params.fileId - File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param {File} params.file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file). * @param {string[]} params.permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} params.folder - Virtual folder to place the file in, for example "photos/2026". Nest folders with `/`. Defaults to the bucket root. * @throws {AppwriteException} * @returns {Promise} */ - createFile(params: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void }): Promise; + createFile(params: { + bucketId: string; + fileId: string; + file: File; + permissions?: string[]; + folder?: string; + onProgress?: (progress: UploadProgress) => void; + }): Promise; /** * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. - * + * * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes. - * + * * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one. - * + * * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. - * + * * * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @param {string} fileId - File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param {File} file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file). * @param {string[]} permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} folder - Virtual folder to place the file in, for example "photos/2026". Nest folders with `/`. Defaults to the bucket root. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise; createFile( - paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void } | string, - ...rest: [(string)?, (File)?, (string[])?,((progress: UploadProgress) => void)?] + bucketId: string, + fileId: string, + file: File, + permissions?: string[], + folder?: string, + onProgress?: (progress: UploadProgress) => void, + ): Promise; + createFile( + paramsOrFirst: + | { + bucketId: string; + fileId: string; + file: File; + permissions?: string[]; + folder?: string; + onProgress?: (progress: UploadProgress) => void; + } + | string, + ...rest: [ + string?, + File?, + string[]?, + string?, + ((progress: UploadProgress) => void)?, + ] ): Promise { - let params: { bucketId: string, fileId: string, file: File, permissions?: string[] }; - let onProgress: ((progress: UploadProgress) => void); - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, file: File, permissions?: string[] }; - onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void); + let params: { + bucketId: string; + fileId: string; + file: File; + permissions?: string[]; + folder?: string; + }; + let onProgress: (progress: UploadProgress) => void; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + bucketId: string; + fileId: string; + file: File; + permissions?: string[]; + folder?: string; + }; + onProgress = paramsOrFirst?.onProgress as ( + progress: UploadProgress, + ) => void; } else { params = { bucketId: paramsOrFirst as string, fileId: rest[0] as string, file: rest[1] as File, - permissions: rest[2] as string[] + permissions: rest[2] as string[], + folder: rest[3] as string, }; - onProgress = rest[3] as ((progress: UploadProgress) => void); + onProgress = rest[4] as (progress: UploadProgress) => void; } - + const bucketId = params.bucketId; const fileId = params.fileId; const file = params.file; const permissions = params.permissions; + const folder = params.folder; if (typeof bucketId === 'undefined') { - throw new AppwriteException('Missing required parameter: "bucketId"'); + throw new AppwriteException( + 'Missing required parameter: "bucketId"', + ); } if (typeof fileId === 'undefined') { throw new AppwriteException('Missing required parameter: "fileId"'); @@ -158,8 +245,10 @@ export class Storage { if (typeof file === 'undefined') { throw new AppwriteException('Missing required parameter: "file"'); } - - const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', encodeURIComponent(String(bucketId))); + const apiPath = '/storage/buckets/{bucketId}/files'.replace( + '{bucketId}', + encodeURIComponent(String(bucketId)), + ); const payload: Payload = {}; if (typeof fileId !== 'undefined') { payload['fileId'] = fileId; @@ -170,20 +259,23 @@ export class Storage { if (typeof permissions !== 'undefined') { payload['permissions'] = permissions; } + if (typeof folder !== 'undefined') { + payload['folder'] = folder; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'multipart/form-data', - 'accept': 'application/json', - } + accept: 'application/json', + }; return this.client.chunkedUpload( 'post', uri, apiHeaders, payload, - onProgress + onProgress, ); } @@ -195,7 +287,7 @@ export class Storage { * @throws {AppwriteException} * @returns {Promise} */ - getFile(params: { bucketId: string, fileId: string }): Promise; + getFile(params: { bucketId: string; fileId: string }): Promise; /** * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata. * @@ -207,45 +299,50 @@ export class Storage { */ getFile(bucketId: string, fileId: string): Promise; getFile( - paramsOrFirst: { bucketId: string, fileId: string } | string, - ...rest: [(string)?] + paramsOrFirst: { bucketId: string; fileId: string } | string, + ...rest: [string?] ): Promise { - let params: { bucketId: string, fileId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { bucketId: string, fileId: string }; + let params: { bucketId: string; fileId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + bucketId: string; + fileId: string; + }; } else { params = { bucketId: paramsOrFirst as string, - fileId: rest[0] as string + fileId: rest[0] as string, }; } - + const bucketId = params.bucketId; const fileId = params.fileId; if (typeof bucketId === 'undefined') { - throw new AppwriteException('Missing required parameter: "bucketId"'); + throw new AppwriteException( + 'Missing required parameter: "bucketId"', + ); } if (typeof fileId === 'undefined') { throw new AppwriteException('Missing required parameter: "fileId"'); } - - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', encodeURIComponent(String(bucketId))).replace('{fileId}', encodeURIComponent(String(fileId))); + const apiPath = '/storage/buckets/{bucketId}/files/{fileId}' + .replace('{bucketId}', encodeURIComponent(String(bucketId))) + .replace('{fileId}', encodeURIComponent(String(fileId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -258,7 +355,12 @@ export class Storage { * @throws {AppwriteException} * @returns {Promise} */ - updateFile(params: { bucketId: string, fileId: string, name?: string, permissions?: string[] }): Promise; + updateFile(params: { + bucketId: string; + fileId: string; + name?: string; + permissions?: string[]; + }): Promise; /** * Update a file by its unique ID. Only users with write permissions have access to update this resource. * @@ -270,37 +372,66 @@ export class Storage { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateFile(bucketId: string, fileId: string, name?: string, permissions?: string[]): Promise; updateFile( - paramsOrFirst: { bucketId: string, fileId: string, name?: string, permissions?: string[] } | string, - ...rest: [(string)?, (string)?, (string[])?] + bucketId: string, + fileId: string, + name?: string, + permissions?: string[], + ): Promise; + updateFile( + paramsOrFirst: + | { + bucketId: string; + fileId: string; + name?: string; + permissions?: string[]; + } + | string, + ...rest: [string?, string?, string[]?] ): Promise { - let params: { bucketId: string, fileId: string, name?: string, permissions?: string[] }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, name?: string, permissions?: string[] }; + let params: { + bucketId: string; + fileId: string; + name?: string; + permissions?: string[]; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + bucketId: string; + fileId: string; + name?: string; + permissions?: string[]; + }; } else { params = { bucketId: paramsOrFirst as string, fileId: rest[0] as string, name: rest[1] as string, - permissions: rest[2] as string[] + permissions: rest[2] as string[], }; } - + const bucketId = params.bucketId; const fileId = params.fileId; const name = params.name; const permissions = params.permissions; if (typeof bucketId === 'undefined') { - throw new AppwriteException('Missing required parameter: "bucketId"'); + throw new AppwriteException( + 'Missing required parameter: "bucketId"', + ); } if (typeof fileId === 'undefined') { throw new AppwriteException('Missing required parameter: "fileId"'); } - - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', encodeURIComponent(String(bucketId))).replace('{fileId}', encodeURIComponent(String(fileId))); + const apiPath = '/storage/buckets/{bucketId}/files/{fileId}' + .replace('{bucketId}', encodeURIComponent(String(bucketId))) + .replace('{fileId}', encodeURIComponent(String(fileId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -313,15 +444,10 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -332,7 +458,7 @@ export class Storage { * @throws {AppwriteException} * @returns {Promise<{}>} */ - deleteFile(params: { bucketId: string, fileId: string }): Promise<{}>; + deleteFile(params: { bucketId: string; fileId: string }): Promise<{}>; /** * Delete a file by its unique ID. Only users with write permissions have access to delete this resource. * @@ -344,45 +470,50 @@ export class Storage { */ deleteFile(bucketId: string, fileId: string): Promise<{}>; deleteFile( - paramsOrFirst: { bucketId: string, fileId: string } | string, - ...rest: [(string)?] + paramsOrFirst: { bucketId: string; fileId: string } | string, + ...rest: [string?] ): Promise<{}> { - let params: { bucketId: string, fileId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { bucketId: string, fileId: string }; + let params: { bucketId: string; fileId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + bucketId: string; + fileId: string; + }; } else { params = { bucketId: paramsOrFirst as string, - fileId: rest[0] as string + fileId: rest[0] as string, }; } - + const bucketId = params.bucketId; const fileId = params.fileId; if (typeof bucketId === 'undefined') { - throw new AppwriteException('Missing required parameter: "bucketId"'); + throw new AppwriteException( + 'Missing required parameter: "bucketId"', + ); } if (typeof fileId === 'undefined') { throw new AppwriteException('Missing required parameter: "fileId"'); } - - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', encodeURIComponent(String(bucketId))).replace('{fileId}', encodeURIComponent(String(fileId))); + const apiPath = '/storage/buckets/{bucketId}/files/{fileId}' + .replace('{bucketId}', encodeURIComponent(String(bucketId))) + .replace('{fileId}', encodeURIComponent(String(fileId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** @@ -394,7 +525,11 @@ export class Storage { * @throws {AppwriteException} * @returns {string} */ - getFileDownload(params: { bucketId: string, fileId: string, token?: string }): string; + getFileDownload(params: { + bucketId: string; + fileId: string; + token?: string; + }): string; /** * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. * @@ -407,51 +542,58 @@ export class Storage { */ getFileDownload(bucketId: string, fileId: string, token?: string): string; getFileDownload( - paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string, - ...rest: [(string)?, (string)?] + paramsOrFirst: + { bucketId: string; fileId: string; token?: string } | string, + ...rest: [string?, string?] ): string { - let params: { bucketId: string, fileId: string, token?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string }; + let params: { bucketId: string; fileId: string; token?: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + bucketId: string; + fileId: string; + token?: string; + }; } else { params = { bucketId: paramsOrFirst as string, fileId: rest[0] as string, - token: rest[1] as string + token: rest[1] as string, }; } - + const bucketId = params.bucketId; const fileId = params.fileId; const token = params.token; if (typeof bucketId === 'undefined') { - throw new AppwriteException('Missing required parameter: "bucketId"'); + throw new AppwriteException( + 'Missing required parameter: "bucketId"', + ); } if (typeof fileId === 'undefined') { throw new AppwriteException('Missing required parameter: "fileId"'); } - - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', encodeURIComponent(String(bucketId))).replace('{fileId}', encodeURIComponent(String(fileId))); + const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download' + .replace('{bucketId}', encodeURIComponent(String(bucketId))) + .replace('{fileId}', encodeURIComponent(String(fileId))); const payload: Payload = {}; if (typeof token !== 'undefined') { payload['token'] = token; } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': '*/*', - } - payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } @@ -475,7 +617,22 @@ export class Storage { * @throws {AppwriteException} * @returns {string} */ - getFilePreview(params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string }): string; + getFilePreview(params: { + bucketId: string; + fileId: string; + width?: number; + height?: number; + gravity?: ImageGravity; + quality?: number; + borderWidth?: number; + borderColor?: string; + borderRadius?: number; + opacity?: number; + rotation?: number; + background?: string; + output?: ImageFormat; + token?: string; + }): string; /** * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB. * @@ -497,15 +654,95 @@ export class Storage { * @returns {string} * @deprecated Use the object parameter style method for a better developer experience. */ - getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string): string; getFilePreview( - paramsOrFirst: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string } | string, - ...rest: [(string)?, (number)?, (number)?, (ImageGravity)?, (number)?, (number)?, (string)?, (number)?, (number)?, (number)?, (string)?, (ImageFormat)?, (string)?] + bucketId: string, + fileId: string, + width?: number, + height?: number, + gravity?: ImageGravity, + quality?: number, + borderWidth?: number, + borderColor?: string, + borderRadius?: number, + opacity?: number, + rotation?: number, + background?: string, + output?: ImageFormat, + token?: string, + ): string; + getFilePreview( + paramsOrFirst: + | { + bucketId: string; + fileId: string; + width?: number; + height?: number; + gravity?: ImageGravity; + quality?: number; + borderWidth?: number; + borderColor?: string; + borderRadius?: number; + opacity?: number; + rotation?: number; + background?: string; + output?: ImageFormat; + token?: string; + } + | string, + ...rest: [ + string?, + number?, + number?, + ImageGravity?, + number?, + number?, + string?, + number?, + number?, + number?, + string?, + ImageFormat?, + string?, + ] ): string { - let params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string }; + let params: { + bucketId: string; + fileId: string; + width?: number; + height?: number; + gravity?: ImageGravity; + quality?: number; + borderWidth?: number; + borderColor?: string; + borderRadius?: number; + opacity?: number; + rotation?: number; + background?: string; + output?: ImageFormat; + token?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + bucketId: string; + fileId: string; + width?: number; + height?: number; + gravity?: ImageGravity; + quality?: number; + borderWidth?: number; + borderColor?: string; + borderRadius?: number; + opacity?: number; + rotation?: number; + background?: string; + output?: ImageFormat; + token?: string; + }; } else { params = { bucketId: paramsOrFirst as string, @@ -521,10 +758,10 @@ export class Storage { rotation: rest[9] as number, background: rest[10] as string, output: rest[11] as ImageFormat, - token: rest[12] as string + token: rest[12] as string, }; } - + const bucketId = params.bucketId; const fileId = params.fileId; const width = params.width; @@ -541,13 +778,16 @@ export class Storage { const token = params.token; if (typeof bucketId === 'undefined') { - throw new AppwriteException('Missing required parameter: "bucketId"'); + throw new AppwriteException( + 'Missing required parameter: "bucketId"', + ); } if (typeof fileId === 'undefined') { throw new AppwriteException('Missing required parameter: "fileId"'); } - - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replace('{bucketId}', encodeURIComponent(String(bucketId))).replace('{fileId}', encodeURIComponent(String(fileId))); + const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview' + .replace('{bucketId}', encodeURIComponent(String(bucketId))) + .replace('{fileId}', encodeURIComponent(String(fileId))); const payload: Payload = {}; if (typeof width !== 'undefined') { payload['width'] = width; @@ -587,18 +827,13 @@ export class Storage { } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': 'image/*', - } - payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } @@ -611,7 +846,11 @@ export class Storage { * @throws {AppwriteException} * @returns {string} */ - getFileView(params: { bucketId: string, fileId: string, token?: string }): string; + getFileView(params: { + bucketId: string; + fileId: string; + token?: string; + }): string; /** * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. * @@ -624,51 +863,58 @@ export class Storage { */ getFileView(bucketId: string, fileId: string, token?: string): string; getFileView( - paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string, - ...rest: [(string)?, (string)?] + paramsOrFirst: + { bucketId: string; fileId: string; token?: string } | string, + ...rest: [string?, string?] ): string { - let params: { bucketId: string, fileId: string, token?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string }; + let params: { bucketId: string; fileId: string; token?: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + bucketId: string; + fileId: string; + token?: string; + }; } else { params = { bucketId: paramsOrFirst as string, fileId: rest[0] as string, - token: rest[1] as string + token: rest[1] as string, }; } - + const bucketId = params.bucketId; const fileId = params.fileId; const token = params.token; if (typeof bucketId === 'undefined') { - throw new AppwriteException('Missing required parameter: "bucketId"'); + throw new AppwriteException( + 'Missing required parameter: "bucketId"', + ); } if (typeof fileId === 'undefined') { throw new AppwriteException('Missing required parameter: "fileId"'); } - - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', encodeURIComponent(String(bucketId))).replace('{fileId}', encodeURIComponent(String(fileId))); + const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view' + .replace('{bucketId}', encodeURIComponent(String(bucketId))) + .replace('{fileId}', encodeURIComponent(String(fileId))); const payload: Payload = {}; if (typeof token !== 'undefined') { payload['token'] = token; } const uri = new URL(this.client.config.endpoint + apiPath); - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - 'accept': '*/*', - } - payload['project'] = this.client.config.project; payload['impersonateuserid'] = this.client.config.impersonateuserid; for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } - + return uri.toString(); } } diff --git a/src/services/tables-db.ts b/src/services/tables-db.ts index f765685e..267eba03 100644 --- a/src/services/tables-db.ts +++ b/src/services/tables-db.ts @@ -1,8 +1,6 @@ -import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; +import { AppwriteException, Client, type Payload } from '../client'; import type { Models } from '../models'; - export class TablesDB { client: Client; @@ -17,7 +15,9 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise} */ - listTransactions(params?: { queries?: string[] }): Promise; + listTransactions(params?: { + queries?: string[]; + }): Promise; /** * List transactions across all databases. * @@ -28,20 +28,24 @@ export class TablesDB { */ listTransactions(queries?: string[]): Promise; listTransactions( - paramsOrFirst?: { queries?: string[] } | string[] + paramsOrFirst?: { queries?: string[] } | string[], ): Promise { let params: { queries?: string[] }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { params = (paramsOrFirst || {}) as { queries?: string[] }; } else { params = { - queries: paramsOrFirst as string[] + queries: paramsOrFirst as string[], }; } - - const queries = params.queries; + const queries = params.queries; const apiPath = '/tablesdb/transactions'; const payload: Payload = {}; @@ -52,15 +56,10 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -81,20 +80,24 @@ export class TablesDB { */ createTransaction(ttl?: number): Promise; createTransaction( - paramsOrFirst?: { ttl?: number } | number + paramsOrFirst?: { ttl?: number } | number, ): Promise { let params: { ttl?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { params = (paramsOrFirst || {}) as { ttl?: number }; } else { params = { - ttl: paramsOrFirst as number + ttl: paramsOrFirst as number, }; } - - const ttl = params.ttl; + const ttl = params.ttl; const apiPath = '/tablesdb/transactions'; const payload: Payload = {}; @@ -106,15 +109,10 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -124,7 +122,9 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise} */ - getTransaction(params: { transactionId: string }): Promise; + getTransaction(params: { + transactionId: string; + }): Promise; /** * Get a transaction by its unique ID. * @@ -135,39 +135,42 @@ export class TablesDB { */ getTransaction(transactionId: string): Promise; getTransaction( - paramsOrFirst: { transactionId: string } | string + paramsOrFirst: { transactionId: string } | string, ): Promise { let params: { transactionId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { transactionId: string }; } else { params = { - transactionId: paramsOrFirst as string + transactionId: paramsOrFirst as string, }; } - + const transactionId = params.transactionId; if (typeof transactionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "transactionId"'); + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); } - - const apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); + const apiPath = '/tablesdb/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -179,7 +182,11 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise} */ - updateTransaction(params: { transactionId: string, commit?: boolean, rollback?: boolean }): Promise; + updateTransaction(params: { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }): Promise; /** * Update a transaction, to either commit or roll back its operations. * @@ -190,32 +197,54 @@ export class TablesDB { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise; updateTransaction( - paramsOrFirst: { transactionId: string, commit?: boolean, rollback?: boolean } | string, - ...rest: [(boolean)?, (boolean)?] + transactionId: string, + commit?: boolean, + rollback?: boolean, + ): Promise; + updateTransaction( + paramsOrFirst: + | { transactionId: string; commit?: boolean; rollback?: boolean } + | string, + ...rest: [boolean?, boolean?] ): Promise { - let params: { transactionId: string, commit?: boolean, rollback?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { transactionId: string, commit?: boolean, rollback?: boolean }; + let params: { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }; } else { params = { transactionId: paramsOrFirst as string, commit: rest[0] as boolean, - rollback: rest[1] as boolean + rollback: rest[1] as boolean, }; } - + const transactionId = params.transactionId; const commit = params.commit; const rollback = params.rollback; if (typeof transactionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "transactionId"'); + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); } - - const apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); + const apiPath = '/tablesdb/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); const payload: Payload = {}; if (typeof commit !== 'undefined') { payload['commit'] = commit; @@ -228,15 +257,10 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -257,39 +281,42 @@ export class TablesDB { */ deleteTransaction(transactionId: string): Promise<{}>; deleteTransaction( - paramsOrFirst: { transactionId: string } | string + paramsOrFirst: { transactionId: string } | string, ): Promise<{}> { let params: { transactionId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { transactionId: string }; } else { params = { - transactionId: paramsOrFirst as string + transactionId: paramsOrFirst as string, }; } - + const transactionId = params.transactionId; if (typeof transactionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "transactionId"'); + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); } - - const apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); + const apiPath = '/tablesdb/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** @@ -300,7 +327,10 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise} */ - createOperations(params: { transactionId: string, operations?: object[] }): Promise; + createOperations(params: { + transactionId: string; + operations?: object[]; + }): Promise; /** * Create multiple operations in a single transaction. * @@ -310,30 +340,46 @@ export class TablesDB { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createOperations(transactionId: string, operations?: object[]): Promise; createOperations( - paramsOrFirst: { transactionId: string, operations?: object[] } | string, - ...rest: [(object[])?] + transactionId: string, + operations?: object[], + ): Promise; + createOperations( + paramsOrFirst: + { transactionId: string; operations?: object[] } | string, + ...rest: [object[]?] ): Promise { - let params: { transactionId: string, operations?: object[] }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { transactionId: string, operations?: object[] }; + let params: { transactionId: string; operations?: object[] }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + transactionId: string; + operations?: object[]; + }; } else { params = { transactionId: paramsOrFirst as string, - operations: rest[0] as object[] + operations: rest[0] as object[], }; } - + const transactionId = params.transactionId; const operations = params.operations; if (typeof transactionId === 'undefined') { - throw new AppwriteException('Missing required parameter: "transactionId"'); - } - - const apiPath = '/tablesdb/transactions/{transactionId}/operations'.replace('{transactionId}', encodeURIComponent(String(transactionId))); + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); + } + const apiPath = + '/tablesdb/transactions/{transactionId}/operations'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); const payload: Payload = {}; if (typeof operations !== 'undefined') { payload['operations'] = operations; @@ -343,15 +389,10 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -366,7 +407,14 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise>} */ - listRows(params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number }): Promise>; + listRows(params: { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }): Promise>; /** * Get a list of all the user's rows in a given table. You can use the query params to filter your results. * @@ -380,15 +428,49 @@ export class TablesDB { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - listRows(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number): Promise>; listRows( - paramsOrFirst: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number } | string, - ...rest: [(string)?, (string[])?, (string)?, (boolean)?, (number)?] + databaseId: string, + tableId: string, + queries?: string[], + transactionId?: string, + total?: boolean, + ttl?: number, + ): Promise>; + listRows( + paramsOrFirst: + | { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, string?, boolean?, number?] ): Promise> { - let params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number }; + let params: { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; } else { params = { databaseId: paramsOrFirst as string, @@ -396,10 +478,10 @@ export class TablesDB { queries: rest[1] as string[], transactionId: rest[2] as string, total: rest[3] as boolean, - ttl: rest[4] as number + ttl: rest[4] as number, }; } - + const databaseId = params.databaseId; const tableId = params.tableId; const queries = params.queries; @@ -408,13 +490,18 @@ export class TablesDB { const ttl = params.ttl; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof tableId === 'undefined') { - throw new AppwriteException('Missing required parameter: "tableId"'); + throw new AppwriteException( + 'Missing required parameter: "tableId"', + ); } - - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -432,15 +519,10 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -455,7 +537,16 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise} */ - createRow(params: { databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial & Record : Partial & Omit, permissions?: string[], transactionId?: string }): Promise; + createRow(params: { + databaseId: string; + tableId: string; + rowId: string; + data: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Omit; + permissions?: string[]; + transactionId?: string; + }): Promise; /** * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console. * @@ -469,26 +560,78 @@ export class TablesDB { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createRow(databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial & Record : Partial & Omit, permissions?: string[], transactionId?: string): Promise; createRow( - paramsOrFirst: { databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial & Record : Partial & Omit, permissions?: string[], transactionId?: string } | string, - ...rest: [(string)?, (string)?, (Row extends Models.DefaultRow ? Partial & Record : Partial & Omit)?, (string[])?, (string)?] + databaseId: string, + tableId: string, + rowId: string, + data: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Omit, + permissions?: string[], + transactionId?: string, + ): Promise; + createRow( + paramsOrFirst: + | { + databaseId: string; + tableId: string; + rowId: string; + data: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Omit; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Row extends Models.DefaultRow + ? Partial & Record + : Partial & Omit)?, + string[]?, + string?, + ] ): Promise { - let params: { databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial & Record : Partial & Omit, permissions?: string[], transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial & Record : Partial & Omit, permissions?: string[], transactionId?: string }; + let params: { + databaseId: string; + tableId: string; + rowId: string; + data: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Omit; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + tableId: string; + rowId: string; + data: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Omit; + permissions?: string[]; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, rowId: rest[1] as string, - data: rest[2] as Row extends Models.DefaultRow ? Partial & Record : Partial & Omit, + data: rest[2] as Row extends Models.DefaultRow + ? Partial & Record + : Partial & Omit, permissions: rest[3] as string[], - transactionId: rest[4] as string + transactionId: rest[4] as string, }; } - + const databaseId = params.databaseId; const tableId = params.tableId; const rowId = params.rowId; @@ -497,10 +640,14 @@ export class TablesDB { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof tableId === 'undefined') { - throw new AppwriteException('Missing required parameter: "tableId"'); + throw new AppwriteException( + 'Missing required parameter: "tableId"', + ); } if (typeof rowId === 'undefined') { throw new AppwriteException('Missing required parameter: "rowId"'); @@ -508,8 +655,9 @@ export class TablesDB { if (typeof data === 'undefined') { throw new AppwriteException('Missing required parameter: "data"'); } - - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof rowId !== 'undefined') { payload['rowId'] = rowId; @@ -528,15 +676,10 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -550,7 +693,13 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise} */ - getRow(params: { databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string }): Promise; + getRow(params: { + databaseId: string; + tableId: string; + rowId: string; + queries?: string[]; + transactionId?: string; + }): Promise; /** * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. * @@ -563,25 +712,55 @@ export class TablesDB { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - getRow(databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string): Promise; getRow( - paramsOrFirst: { databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string } | string, - ...rest: [(string)?, (string)?, (string[])?, (string)?] + databaseId: string, + tableId: string, + rowId: string, + queries?: string[], + transactionId?: string, + ): Promise; + getRow( + paramsOrFirst: + | { + databaseId: string; + tableId: string; + rowId: string; + queries?: string[]; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string[]?, string?] ): Promise { - let params: { databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string }; + let params: { + databaseId: string; + tableId: string; + rowId: string; + queries?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + tableId: string; + rowId: string; + queries?: string[]; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, rowId: rest[1] as string, queries: rest[2] as string[], - transactionId: rest[3] as string + transactionId: rest[3] as string, }; } - + const databaseId = params.databaseId; const tableId = params.tableId; const rowId = params.rowId; @@ -589,16 +768,22 @@ export class TablesDB { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof tableId === 'undefined') { - throw new AppwriteException('Missing required parameter: "tableId"'); + throw new AppwriteException( + 'Missing required parameter: "tableId"', + ); } if (typeof rowId === 'undefined') { throw new AppwriteException('Missing required parameter: "rowId"'); } - - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{rowId}', encodeURIComponent(String(rowId))); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace('{tableId}', encodeURIComponent(String(tableId))) + .replace('{rowId}', encodeURIComponent(String(rowId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -610,15 +795,10 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -633,7 +813,16 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise} */ - upsertRow(params: { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }): Promise; + upsertRow(params: { + databaseId: string; + tableId: string; + rowId: string; + data?: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Partial>; + permissions?: string[]; + transactionId?: string; + }): Promise; /** * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console. * @@ -647,26 +836,81 @@ export class TablesDB { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - upsertRow(databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string): Promise; upsertRow( - paramsOrFirst: { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string } | string, - ...rest: [(string)?, (string)?, (Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>)?, (string[])?, (string)?] + databaseId: string, + tableId: string, + rowId: string, + data?: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Partial>, + permissions?: string[], + transactionId?: string, + ): Promise; + upsertRow( + paramsOrFirst: + | { + databaseId: string; + tableId: string; + rowId: string; + data?: Row extends Models.DefaultRow + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Row extends Models.DefaultRow + ? Partial & Record + : Partial & Partial>)?, + string[]?, + string?, + ] ): Promise { - let params: { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }; + let params: { + databaseId: string; + tableId: string; + rowId: string; + data?: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Partial>; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + tableId: string; + rowId: string; + data?: Row extends Models.DefaultRow + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, rowId: rest[1] as string, - data: rest[2] as Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, + data: rest[2] as Row extends Models.DefaultRow + ? Partial & Record + : Partial & + Partial>, permissions: rest[3] as string[], - transactionId: rest[4] as string + transactionId: rest[4] as string, }; } - + const databaseId = params.databaseId; const tableId = params.tableId; const rowId = params.rowId; @@ -675,16 +919,22 @@ export class TablesDB { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof tableId === 'undefined') { - throw new AppwriteException('Missing required parameter: "tableId"'); + throw new AppwriteException( + 'Missing required parameter: "tableId"', + ); } if (typeof rowId === 'undefined') { throw new AppwriteException('Missing required parameter: "rowId"'); } - - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{rowId}', encodeURIComponent(String(rowId))); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace('{tableId}', encodeURIComponent(String(tableId))) + .replace('{rowId}', encodeURIComponent(String(rowId))); const payload: Payload = {}; if (typeof data !== 'undefined') { payload['data'] = data; @@ -700,15 +950,10 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -723,7 +968,16 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise} */ - updateRow(params: { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }): Promise; + updateRow(params: { + databaseId: string; + tableId: string; + rowId: string; + data?: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Partial>; + permissions?: string[]; + transactionId?: string; + }): Promise; /** * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. * @@ -737,26 +991,81 @@ export class TablesDB { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateRow(databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string): Promise; updateRow( - paramsOrFirst: { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string } | string, - ...rest: [(string)?, (string)?, (Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>)?, (string[])?, (string)?] + databaseId: string, + tableId: string, + rowId: string, + data?: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Partial>, + permissions?: string[], + transactionId?: string, + ): Promise; + updateRow( + paramsOrFirst: + | { + databaseId: string; + tableId: string; + rowId: string; + data?: Row extends Models.DefaultRow + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Row extends Models.DefaultRow + ? Partial & Record + : Partial & Partial>)?, + string[]?, + string?, + ] ): Promise { - let params: { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, permissions?: string[], transactionId?: string }; + let params: { + databaseId: string; + tableId: string; + rowId: string; + data?: Row extends Models.DefaultRow + ? Partial & Record + : Partial & Partial>; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + tableId: string; + rowId: string; + data?: Row extends Models.DefaultRow + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, rowId: rest[1] as string, - data: rest[2] as Row extends Models.DefaultRow ? Partial & Record : Partial & Partial>, + data: rest[2] as Row extends Models.DefaultRow + ? Partial & Record + : Partial & + Partial>, permissions: rest[3] as string[], - transactionId: rest[4] as string + transactionId: rest[4] as string, }; } - + const databaseId = params.databaseId; const tableId = params.tableId; const rowId = params.rowId; @@ -765,16 +1074,22 @@ export class TablesDB { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof tableId === 'undefined') { - throw new AppwriteException('Missing required parameter: "tableId"'); + throw new AppwriteException( + 'Missing required parameter: "tableId"', + ); } if (typeof rowId === 'undefined') { throw new AppwriteException('Missing required parameter: "rowId"'); } - - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{rowId}', encodeURIComponent(String(rowId))); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace('{tableId}', encodeURIComponent(String(tableId))) + .replace('{rowId}', encodeURIComponent(String(rowId))); const payload: Payload = {}; if (typeof data !== 'undefined') { payload['data'] = data; @@ -790,15 +1105,10 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -811,7 +1121,12 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise<{}>} */ - deleteRow(params: { databaseId: string, tableId: string, rowId: string, transactionId?: string }): Promise<{}>; + deleteRow(params: { + databaseId: string; + tableId: string; + rowId: string; + transactionId?: string; + }): Promise<{}>; /** * Delete a row by its unique ID. * @@ -823,40 +1138,72 @@ export class TablesDB { * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ - deleteRow(databaseId: string, tableId: string, rowId: string, transactionId?: string): Promise<{}>; deleteRow( - paramsOrFirst: { databaseId: string, tableId: string, rowId: string, transactionId?: string } | string, - ...rest: [(string)?, (string)?, (string)?] + databaseId: string, + tableId: string, + rowId: string, + transactionId?: string, + ): Promise<{}>; + deleteRow( + paramsOrFirst: + | { + databaseId: string; + tableId: string; + rowId: string; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string?] ): Promise<{}> { - let params: { databaseId: string, tableId: string, rowId: string, transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, transactionId?: string }; + let params: { + databaseId: string; + tableId: string; + rowId: string; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + tableId: string; + rowId: string; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, rowId: rest[1] as string, - transactionId: rest[2] as string + transactionId: rest[2] as string, }; } - + const databaseId = params.databaseId; const tableId = params.tableId; const rowId = params.rowId; const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof tableId === 'undefined') { - throw new AppwriteException('Missing required parameter: "tableId"'); + throw new AppwriteException( + 'Missing required parameter: "tableId"', + ); } if (typeof rowId === 'undefined') { throw new AppwriteException('Missing required parameter: "rowId"'); } - - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{rowId}', encodeURIComponent(String(rowId))); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace('{tableId}', encodeURIComponent(String(tableId))) + .replace('{rowId}', encodeURIComponent(String(rowId))); const payload: Payload = {}; if (typeof transactionId !== 'undefined') { payload['transactionId'] = transactionId; @@ -866,14 +1213,9 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** @@ -889,7 +1231,15 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise} */ - decrementRowColumn(params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string }): Promise; + decrementRowColumn(params: { + databaseId: string; + tableId: string; + rowId: string; + column: string; + value?: number; + min?: number; + transactionId?: string; + }): Promise; /** * Decrement a specific column of a row by a given value. * @@ -904,15 +1254,53 @@ export class TablesDB { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - decrementRowColumn(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string): Promise; decrementRowColumn( - paramsOrFirst: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string } | string, - ...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?] + databaseId: string, + tableId: string, + rowId: string, + column: string, + value?: number, + min?: number, + transactionId?: string, + ): Promise; + decrementRowColumn( + paramsOrFirst: + | { + databaseId: string; + tableId: string; + rowId: string; + column: string; + value?: number; + min?: number; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string?, number?, number?, string?] ): Promise { - let params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string }; + let params: { + databaseId: string; + tableId: string; + rowId: string; + column: string; + value?: number; + min?: number; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + tableId: string; + rowId: string; + column: string; + value?: number; + min?: number; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, @@ -921,10 +1309,10 @@ export class TablesDB { column: rest[2] as string, value: rest[3] as number, min: rest[4] as number, - transactionId: rest[5] as string + transactionId: rest[5] as string, }; } - + const databaseId = params.databaseId; const tableId = params.tableId; const rowId = params.rowId; @@ -934,10 +1322,14 @@ export class TablesDB { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof tableId === 'undefined') { - throw new AppwriteException('Missing required parameter: "tableId"'); + throw new AppwriteException( + 'Missing required parameter: "tableId"', + ); } if (typeof rowId === 'undefined') { throw new AppwriteException('Missing required parameter: "rowId"'); @@ -945,8 +1337,12 @@ export class TablesDB { if (typeof column === 'undefined') { throw new AppwriteException('Missing required parameter: "column"'); } - - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{rowId}', encodeURIComponent(String(rowId))).replace('{column}', encodeURIComponent(String(column))); + const apiPath = + '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace('{tableId}', encodeURIComponent(String(tableId))) + .replace('{rowId}', encodeURIComponent(String(rowId))) + .replace('{column}', encodeURIComponent(String(column))); const payload: Payload = {}; if (typeof value !== 'undefined') { payload['value'] = value; @@ -962,15 +1358,10 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -986,7 +1377,15 @@ export class TablesDB { * @throws {AppwriteException} * @returns {Promise} */ - incrementRowColumn(params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string }): Promise; + incrementRowColumn(params: { + databaseId: string; + tableId: string; + rowId: string; + column: string; + value?: number; + max?: number; + transactionId?: string; + }): Promise; /** * Increment a specific column of a row by a given value. * @@ -1001,15 +1400,53 @@ export class TablesDB { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - incrementRowColumn(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string): Promise; incrementRowColumn( - paramsOrFirst: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string } | string, - ...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?] + databaseId: string, + tableId: string, + rowId: string, + column: string, + value?: number, + max?: number, + transactionId?: string, + ): Promise; + incrementRowColumn( + paramsOrFirst: + | { + databaseId: string; + tableId: string; + rowId: string; + column: string; + value?: number; + max?: number; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string?, number?, number?, string?] ): Promise { - let params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string }; + let params: { + databaseId: string; + tableId: string; + rowId: string; + column: string; + value?: number; + max?: number; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + tableId: string; + rowId: string; + column: string; + value?: number; + max?: number; + transactionId?: string; + }; } else { params = { databaseId: paramsOrFirst as string, @@ -1018,10 +1455,10 @@ export class TablesDB { column: rest[2] as string, value: rest[3] as number, max: rest[4] as number, - transactionId: rest[5] as string + transactionId: rest[5] as string, }; } - + const databaseId = params.databaseId; const tableId = params.tableId; const rowId = params.rowId; @@ -1031,10 +1468,14 @@ export class TablesDB { const transactionId = params.transactionId; if (typeof databaseId === 'undefined') { - throw new AppwriteException('Missing required parameter: "databaseId"'); + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); } if (typeof tableId === 'undefined') { - throw new AppwriteException('Missing required parameter: "tableId"'); + throw new AppwriteException( + 'Missing required parameter: "tableId"', + ); } if (typeof rowId === 'undefined') { throw new AppwriteException('Missing required parameter: "rowId"'); @@ -1042,8 +1483,12 @@ export class TablesDB { if (typeof column === 'undefined') { throw new AppwriteException('Missing required parameter: "column"'); } - - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{rowId}', encodeURIComponent(String(rowId))).replace('{column}', encodeURIComponent(String(column))); + const apiPath = + '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace('{tableId}', encodeURIComponent(String(tableId))) + .replace('{rowId}', encodeURIComponent(String(rowId))) + .replace('{column}', encodeURIComponent(String(column))); const payload: Payload = {}; if (typeof value !== 'undefined') { payload['value'] = value; @@ -1059,14 +1504,9 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } } diff --git a/src/services/teams.ts b/src/services/teams.ts index 3e156370..7a8f5842 100644 --- a/src/services/teams.ts +++ b/src/services/teams.ts @@ -1,8 +1,6 @@ -import { Service } from '../service'; -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; +import { AppwriteException, Client, type Payload } from '../client'; import type { Models } from '../models'; - export class Teams { client: Client; @@ -19,7 +17,13 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise>} */ - list(params?: { queries?: string[], search?: string, total?: boolean }): Promise>; + list< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params?: { + queries?: string[]; + search?: string; + total?: boolean; + }): Promise>; /** * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. * @@ -30,28 +34,41 @@ export class Teams { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - list(queries?: string[], search?: string, total?: boolean): Promise>; list( - paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[], - ...rest: [(string)?, (boolean)?] + queries?: string[], + search?: string, + total?: boolean, + ): Promise>; + list( + paramsOrFirst?: + { queries?: string[]; search?: string; total?: boolean } | string[], + ...rest: [string?, boolean?] ): Promise> { - let params: { queries?: string[], search?: string, total?: boolean }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean }; + let params: { queries?: string[]; search?: string; total?: boolean }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + queries?: string[]; + search?: string; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], search: rest[0] as string, - total: rest[1] as boolean + total: rest[1] as boolean, }; } - + const queries = params.queries; const search = params.search; const total = params.total; - const apiPath = '/teams'; const payload: Payload = {}; if (typeof queries !== 'undefined') { @@ -67,15 +84,10 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -87,7 +99,13 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise>} */ - create(params: { teamId: string, name: string, roles?: string[] }): Promise>; + create< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { + teamId: string; + name: string; + roles?: string[]; + }): Promise>; /** * Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team. * @@ -98,23 +116,36 @@ export class Teams { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - create(teamId: string, name: string, roles?: string[]): Promise>; create( - paramsOrFirst: { teamId: string, name: string, roles?: string[] } | string, - ...rest: [(string)?, (string[])?] + teamId: string, + name: string, + roles?: string[], + ): Promise>; + create( + paramsOrFirst: + { teamId: string; name: string; roles?: string[] } | string, + ...rest: [string?, string[]?] ): Promise> { - let params: { teamId: string, name: string, roles?: string[] }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { teamId: string, name: string, roles?: string[] }; + let params: { teamId: string; name: string; roles?: string[] }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + name: string; + roles?: string[]; + }; } else { params = { teamId: paramsOrFirst as string, name: rest[0] as string, - roles: rest[1] as string[] + roles: rest[1] as string[], }; } - + const teamId = params.teamId; const name = params.name; const roles = params.roles; @@ -125,7 +156,6 @@ export class Teams { if (typeof name === 'undefined') { throw new AppwriteException('Missing required parameter: "name"'); } - const apiPath = '/teams'; const payload: Payload = {}; if (typeof teamId !== 'undefined') { @@ -142,15 +172,10 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -160,7 +185,9 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise>} */ - get(params: { teamId: string }): Promise>; + get< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { teamId: string }): Promise>; /** * Get a team by its ID. All team members have read access for this resource. * @@ -169,41 +196,44 @@ export class Teams { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - get(teamId: string): Promise>; get( - paramsOrFirst: { teamId: string } | string + teamId: string, + ): Promise>; + get( + paramsOrFirst: { teamId: string } | string, ): Promise> { let params: { teamId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { teamId: string }; } else { params = { - teamId: paramsOrFirst as string + teamId: paramsOrFirst as string, }; } - + const teamId = params.teamId; if (typeof teamId === 'undefined') { throw new AppwriteException('Missing required parameter: "teamId"'); } - - const apiPath = '/teams/{teamId}'.replace('{teamId}', encodeURIComponent(String(teamId))); + const apiPath = '/teams/{teamId}'.replace( + '{teamId}', + encodeURIComponent(String(teamId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -214,7 +244,12 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise>} */ - updateName(params: { teamId: string, name: string }): Promise>; + updateName< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { + teamId: string; + name: string; + }): Promise>; /** * Update the team's name by its unique ID. * @@ -224,22 +259,30 @@ export class Teams { * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ - updateName(teamId: string, name: string): Promise>; - updateName( - paramsOrFirst: { teamId: string, name: string } | string, - ...rest: [(string)?] + updateName< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(teamId: string, name: string): Promise>; + updateName< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + paramsOrFirst: { teamId: string; name: string } | string, + ...rest: [string?] ): Promise> { - let params: { teamId: string, name: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { teamId: string, name: string }; + let params: { teamId: string; name: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { teamId: string; name: string }; } else { params = { teamId: paramsOrFirst as string, - name: rest[0] as string + name: rest[0] as string, }; } - + const teamId = params.teamId; const name = params.name; @@ -249,8 +292,10 @@ export class Teams { if (typeof name === 'undefined') { throw new AppwriteException('Missing required parameter: "name"'); } - - const apiPath = '/teams/{teamId}'.replace('{teamId}', encodeURIComponent(String(teamId))); + const apiPath = '/teams/{teamId}'.replace( + '{teamId}', + encodeURIComponent(String(teamId)), + ); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -260,15 +305,10 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } /** @@ -288,40 +328,456 @@ export class Teams { * @deprecated Use the object parameter style method for a better developer experience. */ delete(teamId: string): Promise<{}>; - delete( - paramsOrFirst: { teamId: string } | string - ): Promise<{}> { + delete(paramsOrFirst: { teamId: string } | string): Promise<{}> { let params: { teamId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { teamId: string }; } else { params = { - teamId: paramsOrFirst as string + teamId: paramsOrFirst as string, }; } - + const teamId = params.teamId; if (typeof teamId === 'undefined') { throw new AppwriteException('Missing required parameter: "teamId"'); } - - const apiPath = '/teams/{teamId}'.replace('{teamId}', encodeURIComponent(String(teamId))); + const apiPath = '/teams/{teamId}'.replace( + '{teamId}', + encodeURIComponent(String(teamId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } + + /** + * List app installations on a team. Any team member can read installations. + * + * @param {string} params.teamId - Team ID. + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + */ + listInstallations(params: { + teamId: string; + queries?: string[]; + total?: boolean; + }): Promise; + /** + * List app installations on a team. Any team member can read installations. + * + * @param {string} teamId - Team ID. + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listInstallations( + teamId: string, + queries?: string[], + total?: boolean, + ): Promise; + listInstallations( + paramsOrFirst: + { teamId: string; queries?: string[]; total?: boolean } | string, + ...rest: [string[]?, boolean?] + ): Promise { + let params: { teamId: string; queries?: string[]; total?: boolean }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + queries?: string[]; + total?: boolean; + }; + } else { + params = { + teamId: paramsOrFirst as string, + queries: rest[0] as string[], + total: rest[1] as boolean, + }; } - return this.client.call( - 'delete', - uri, - apiHeaders, - payload + const teamId = params.teamId; + const queries = params.queries; + const total = params.total; + + if (typeof teamId === 'undefined') { + throw new AppwriteException('Missing required parameter: "teamId"'); + } + const apiPath = '/teams/{teamId}/installations'.replace( + '{teamId}', + encodeURIComponent(String(teamId)), ); + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests. + * + * @param {string} params.teamId - Team ID. + * @param {string} params.appId - Application unique ID. + * @param {string} params.authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here. + * @throws {AppwriteException} + * @returns {Promise} + */ + createInstallation(params: { + teamId: string; + appId: string; + authorizationDetails?: string; + }): Promise; + /** + * Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests. + * + * @param {string} teamId - Team ID. + * @param {string} appId - Application unique ID. + * @param {string} authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createInstallation( + teamId: string, + appId: string, + authorizationDetails?: string, + ): Promise; + createInstallation( + paramsOrFirst: + | { teamId: string; appId: string; authorizationDetails?: string } + | string, + ...rest: [string?, string?] + ): Promise { + let params: { + teamId: string; + appId: string; + authorizationDetails?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + appId: string; + authorizationDetails?: string; + }; + } else { + params = { + teamId: paramsOrFirst as string, + appId: rest[0] as string, + authorizationDetails: rest[1] as string, + }; + } + + const teamId = params.teamId; + const appId = params.appId; + const authorizationDetails = params.authorizationDetails; + + if (typeof teamId === 'undefined') { + throw new AppwriteException('Missing required parameter: "teamId"'); + } + if (typeof appId === 'undefined') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + const apiPath = '/teams/{teamId}/installations'.replace( + '{teamId}', + encodeURIComponent(String(teamId)), + ); + const payload: Payload = {}; + if (typeof appId !== 'undefined') { + payload['appId'] = appId; + } + if (typeof authorizationDetails !== 'undefined') { + payload['authorizationDetails'] = authorizationDetails; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get an app installation on a team by its unique ID. Any team member can read installations. + * + * @param {string} params.teamId - Team ID. + * @param {string} params.installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + getInstallation(params: { + teamId: string; + installationId: string; + }): Promise; + /** + * Get an app installation on a team by its unique ID. Any team member can read installations. + * + * @param {string} teamId - Team ID. + * @param {string} installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getInstallation( + teamId: string, + installationId: string, + ): Promise; + getInstallation( + paramsOrFirst: { teamId: string; installationId: string } | string, + ...rest: [string?] + ): Promise { + let params: { teamId: string; installationId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + installationId: string; + }; + } else { + params = { + teamId: paramsOrFirst as string, + installationId: rest[0] as string, + }; + } + + const teamId = params.teamId; + const installationId = params.installationId; + + if (typeof teamId === 'undefined') { + throw new AppwriteException('Missing required parameter: "teamId"'); + } + if (typeof installationId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "installationId"', + ); + } + const apiPath = '/teams/{teamId}/installations/{installationId}' + .replace('{teamId}', encodeURIComponent(String(teamId))) + .replace( + '{installationId}', + encodeURIComponent(String(installationId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked. + * + * @param {string} params.teamId - Team ID. + * @param {string} params.installationId - Installation unique ID. + * @param {string} params.authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value. + * @throws {AppwriteException} + * @returns {Promise} + */ + updateInstallation(params: { + teamId: string; + installationId: string; + authorizationDetails?: string; + }): Promise; + /** + * Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked. + * + * @param {string} teamId - Team ID. + * @param {string} installationId - Installation unique ID. + * @param {string} authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateInstallation( + teamId: string, + installationId: string, + authorizationDetails?: string, + ): Promise; + updateInstallation( + paramsOrFirst: + | { + teamId: string; + installationId: string; + authorizationDetails?: string; + } + | string, + ...rest: [string?, string?] + ): Promise { + let params: { + teamId: string; + installationId: string; + authorizationDetails?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + installationId: string; + authorizationDetails?: string; + }; + } else { + params = { + teamId: paramsOrFirst as string, + installationId: rest[0] as string, + authorizationDetails: rest[1] as string, + }; + } + + const teamId = params.teamId; + const installationId = params.installationId; + const authorizationDetails = params.authorizationDetails; + + if (typeof teamId === 'undefined') { + throw new AppwriteException('Missing required parameter: "teamId"'); + } + if (typeof installationId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "installationId"', + ); + } + const apiPath = '/teams/{teamId}/installations/{installationId}' + .replace('{teamId}', encodeURIComponent(String(teamId))) + .replace( + '{installationId}', + encodeURIComponent(String(installationId)), + ); + const payload: Payload = {}; + if (typeof authorizationDetails !== 'undefined') { + payload['authorizationDetails'] = authorizationDetails; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('put', uri, apiHeaders, payload); + } + + /** + * Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked. + * + * @param {string} params.teamId - Team ID. + * @param {string} params.installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteInstallation(params: { + teamId: string; + installationId: string; + }): Promise<{}>; + /** + * Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked. + * + * @param {string} teamId - Team ID. + * @param {string} installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteInstallation(teamId: string, installationId: string): Promise<{}>; + deleteInstallation( + paramsOrFirst: { teamId: string; installationId: string } | string, + ...rest: [string?] + ): Promise<{}> { + let params: { teamId: string; installationId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + installationId: string; + }; + } else { + params = { + teamId: paramsOrFirst as string, + installationId: rest[0] as string, + }; + } + + const teamId = params.teamId; + const installationId = params.installationId; + + if (typeof teamId === 'undefined') { + throw new AppwriteException('Missing required parameter: "teamId"'); + } + if (typeof installationId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "installationId"', + ); + } + const apiPath = '/teams/{teamId}/installations/{installationId}' + .replace('{teamId}', encodeURIComponent(String(teamId))) + .replace( + '{installationId}', + encodeURIComponent(String(installationId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); } /** @@ -334,7 +790,12 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise} */ - listMemberships(params: { teamId: string, queries?: string[], search?: string, total?: boolean }): Promise; + listMemberships(params: { + teamId: string; + queries?: string[]; + search?: string; + total?: boolean; + }): Promise; /** * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console. * @@ -346,24 +807,50 @@ export class Teams { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listMemberships(teamId: string, queries?: string[], search?: string, total?: boolean): Promise; listMemberships( - paramsOrFirst: { teamId: string, queries?: string[], search?: string, total?: boolean } | string, - ...rest: [(string[])?, (string)?, (boolean)?] + teamId: string, + queries?: string[], + search?: string, + total?: boolean, + ): Promise; + listMemberships( + paramsOrFirst: + | { + teamId: string; + queries?: string[]; + search?: string; + total?: boolean; + } + | string, + ...rest: [string[]?, string?, boolean?] ): Promise { - let params: { teamId: string, queries?: string[], search?: string, total?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { teamId: string, queries?: string[], search?: string, total?: boolean }; + let params: { + teamId: string; + queries?: string[]; + search?: string; + total?: boolean; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + queries?: string[]; + search?: string; + total?: boolean; + }; } else { params = { teamId: paramsOrFirst as string, queries: rest[0] as string[], search: rest[1] as string, - total: rest[2] as boolean + total: rest[2] as boolean, }; } - + const teamId = params.teamId; const queries = params.queries; const search = params.search; @@ -372,8 +859,10 @@ export class Teams { if (typeof teamId === 'undefined') { throw new AppwriteException('Missing required parameter: "teamId"'); } - - const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', encodeURIComponent(String(teamId))); + const apiPath = '/teams/{teamId}/memberships'.replace( + '{teamId}', + encodeURIComponent(String(teamId)), + ); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -388,26 +877,21 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. - * + * * You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. - * - * Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. - * + * + * Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. + * * Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. - * + * * * @param {string} params.teamId - Team ID. * @param {string[]} params.roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long. @@ -419,16 +903,24 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise} */ - createMembership(params: { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string }): Promise; + createMembership(params: { + teamId: string; + roles: string[]; + email?: string; + userId?: string; + phone?: string; + url?: string; + name?: string; + }): Promise; /** * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. - * + * * You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. - * - * Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. - * + * + * Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. + * * Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. - * + * * * @param {string} teamId - Team ID. * @param {string[]} roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long. @@ -441,15 +933,53 @@ export class Teams { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise; createMembership( - paramsOrFirst: { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string } | string, - ...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (string)?] + teamId: string, + roles: string[], + email?: string, + userId?: string, + phone?: string, + url?: string, + name?: string, + ): Promise; + createMembership( + paramsOrFirst: + | { + teamId: string; + roles: string[]; + email?: string; + userId?: string; + phone?: string; + url?: string; + name?: string; + } + | string, + ...rest: [string[]?, string?, string?, string?, string?, string?] ): Promise { - let params: { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string }; + let params: { + teamId: string; + roles: string[]; + email?: string; + userId?: string; + phone?: string; + url?: string; + name?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + roles: string[]; + email?: string; + userId?: string; + phone?: string; + url?: string; + name?: string; + }; } else { params = { teamId: paramsOrFirst as string, @@ -458,10 +988,10 @@ export class Teams { userId: rest[2] as string, phone: rest[3] as string, url: rest[4] as string, - name: rest[5] as string + name: rest[5] as string, }; } - + const teamId = params.teamId; const roles = params.roles; const email = params.email; @@ -476,8 +1006,10 @@ export class Teams { if (typeof roles === 'undefined') { throw new AppwriteException('Missing required parameter: "roles"'); } - - const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', encodeURIComponent(String(teamId))); + const apiPath = '/teams/{teamId}/memberships'.replace( + '{teamId}', + encodeURIComponent(String(teamId)), + ); const payload: Payload = {}; if (typeof email !== 'undefined') { payload['email'] = email; @@ -502,15 +1034,10 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'post', - uri, - apiHeaders, - payload - ); + return this.client.call('post', uri, apiHeaders, payload); } /** @@ -521,7 +1048,10 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise} */ - getMembership(params: { teamId: string, membershipId: string }): Promise; + getMembership(params: { + teamId: string; + membershipId: string; + }): Promise; /** * Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console. * @@ -531,22 +1061,32 @@ export class Teams { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - getMembership(teamId: string, membershipId: string): Promise; getMembership( - paramsOrFirst: { teamId: string, membershipId: string } | string, - ...rest: [(string)?] + teamId: string, + membershipId: string, + ): Promise; + getMembership( + paramsOrFirst: { teamId: string; membershipId: string } | string, + ...rest: [string?] ): Promise { - let params: { teamId: string, membershipId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { teamId: string, membershipId: string }; + let params: { teamId: string; membershipId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + membershipId: string; + }; } else { params = { teamId: paramsOrFirst as string, - membershipId: rest[0] as string + membershipId: rest[0] as string, }; } - + const teamId = params.teamId; const membershipId = params.membershipId; @@ -554,29 +1094,30 @@ export class Teams { throw new AppwriteException('Missing required parameter: "teamId"'); } if (typeof membershipId === 'undefined') { - throw new AppwriteException('Missing required parameter: "membershipId"'); - } - - const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', encodeURIComponent(String(teamId))).replace('{membershipId}', encodeURIComponent(String(membershipId))); + throw new AppwriteException( + 'Missing required parameter: "membershipId"', + ); + } + const apiPath = '/teams/{teamId}/memberships/{membershipId}' + .replace('{teamId}', encodeURIComponent(String(teamId))) + .replace( + '{membershipId}', + encodeURIComponent(String(membershipId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). - * + * * * @param {string} params.teamId - Team ID. * @param {string} params.membershipId - Membership ID. @@ -584,10 +1125,14 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise} */ - updateMembership(params: { teamId: string, membershipId: string, roles: string[] }): Promise; + updateMembership(params: { + teamId: string; + membershipId: string; + roles: string[]; + }): Promise; /** * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). - * + * * * @param {string} teamId - Team ID. * @param {string} membershipId - Membership ID. @@ -596,23 +1141,36 @@ export class Teams { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateMembership(teamId: string, membershipId: string, roles: string[]): Promise; updateMembership( - paramsOrFirst: { teamId: string, membershipId: string, roles: string[] } | string, - ...rest: [(string)?, (string[])?] + teamId: string, + membershipId: string, + roles: string[], + ): Promise; + updateMembership( + paramsOrFirst: + { teamId: string; membershipId: string; roles: string[] } | string, + ...rest: [string?, string[]?] ): Promise { - let params: { teamId: string, membershipId: string, roles: string[] }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { teamId: string, membershipId: string, roles: string[] }; + let params: { teamId: string; membershipId: string; roles: string[] }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + membershipId: string; + roles: string[]; + }; } else { params = { teamId: paramsOrFirst as string, membershipId: rest[0] as string, - roles: rest[1] as string[] + roles: rest[1] as string[], }; } - + const teamId = params.teamId; const membershipId = params.membershipId; const roles = params.roles; @@ -621,13 +1179,19 @@ export class Teams { throw new AppwriteException('Missing required parameter: "teamId"'); } if (typeof membershipId === 'undefined') { - throw new AppwriteException('Missing required parameter: "membershipId"'); + throw new AppwriteException( + 'Missing required parameter: "membershipId"', + ); } if (typeof roles === 'undefined') { throw new AppwriteException('Missing required parameter: "roles"'); } - - const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', encodeURIComponent(String(teamId))).replace('{membershipId}', encodeURIComponent(String(membershipId))); + const apiPath = '/teams/{teamId}/memberships/{membershipId}' + .replace('{teamId}', encodeURIComponent(String(teamId))) + .replace( + '{membershipId}', + encodeURIComponent(String(membershipId)), + ); const payload: Payload = {}; if (typeof roles !== 'undefined') { payload['roles'] = roles; @@ -637,15 +1201,10 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -656,7 +1215,10 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise<{}>} */ - deleteMembership(params: { teamId: string, membershipId: string }): Promise<{}>; + deleteMembership(params: { + teamId: string; + membershipId: string; + }): Promise<{}>; /** * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted. * @@ -668,20 +1230,27 @@ export class Teams { */ deleteMembership(teamId: string, membershipId: string): Promise<{}>; deleteMembership( - paramsOrFirst: { teamId: string, membershipId: string } | string, - ...rest: [(string)?] + paramsOrFirst: { teamId: string; membershipId: string } | string, + ...rest: [string?] ): Promise<{}> { - let params: { teamId: string, membershipId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { teamId: string, membershipId: string }; + let params: { teamId: string; membershipId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + membershipId: string; + }; } else { params = { teamId: paramsOrFirst as string, - membershipId: rest[0] as string + membershipId: rest[0] as string, }; } - + const teamId = params.teamId; const membershipId = params.membershipId; @@ -689,31 +1258,32 @@ export class Teams { throw new AppwriteException('Missing required parameter: "teamId"'); } if (typeof membershipId === 'undefined') { - throw new AppwriteException('Missing required parameter: "membershipId"'); - } - - const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', encodeURIComponent(String(teamId))).replace('{membershipId}', encodeURIComponent(String(membershipId))); + throw new AppwriteException( + 'Missing required parameter: "membershipId"', + ); + } + const apiPath = '/teams/{teamId}/memberships/{membershipId}' + .replace('{teamId}', encodeURIComponent(String(teamId))) + .replace( + '{membershipId}', + encodeURIComponent(String(membershipId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - } + }; - return this.client.call( - 'delete', - uri, - apiHeaders, - payload - ); + return this.client.call('delete', uri, apiHeaders, payload); } /** * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. - * + * * If the request is successful, a session for the user is automatically created. - * + * * * @param {string} params.teamId - Team ID. * @param {string} params.membershipId - Membership ID. @@ -722,12 +1292,17 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise} */ - updateMembershipStatus(params: { teamId: string, membershipId: string, userId: string, secret: string }): Promise; + updateMembershipStatus(params: { + teamId: string; + membershipId: string; + userId: string; + secret: string; + }): Promise; /** * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. - * + * * If the request is successful, a session for the user is automatically created. - * + * * * @param {string} teamId - Team ID. * @param {string} membershipId - Membership ID. @@ -737,24 +1312,50 @@ export class Teams { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise; updateMembershipStatus( - paramsOrFirst: { teamId: string, membershipId: string, userId: string, secret: string } | string, - ...rest: [(string)?, (string)?, (string)?] + teamId: string, + membershipId: string, + userId: string, + secret: string, + ): Promise; + updateMembershipStatus( + paramsOrFirst: + | { + teamId: string; + membershipId: string; + userId: string; + secret: string; + } + | string, + ...rest: [string?, string?, string?] ): Promise { - let params: { teamId: string, membershipId: string, userId: string, secret: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { teamId: string, membershipId: string, userId: string, secret: string }; + let params: { + teamId: string; + membershipId: string; + userId: string; + secret: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + teamId: string; + membershipId: string; + userId: string; + secret: string; + }; } else { params = { teamId: paramsOrFirst as string, membershipId: rest[0] as string, userId: rest[1] as string, - secret: rest[2] as string + secret: rest[2] as string, }; } - + const teamId = params.teamId; const membershipId = params.membershipId; const userId = params.userId; @@ -764,7 +1365,9 @@ export class Teams { throw new AppwriteException('Missing required parameter: "teamId"'); } if (typeof membershipId === 'undefined') { - throw new AppwriteException('Missing required parameter: "membershipId"'); + throw new AppwriteException( + 'Missing required parameter: "membershipId"', + ); } if (typeof userId === 'undefined') { throw new AppwriteException('Missing required parameter: "userId"'); @@ -772,8 +1375,12 @@ export class Teams { if (typeof secret === 'undefined') { throw new AppwriteException('Missing required parameter: "secret"'); } - - const apiPath = '/teams/{teamId}/memberships/{membershipId}/status'.replace('{teamId}', encodeURIComponent(String(teamId))).replace('{membershipId}', encodeURIComponent(String(membershipId))); + const apiPath = '/teams/{teamId}/memberships/{membershipId}/status' + .replace('{teamId}', encodeURIComponent(String(teamId))) + .replace( + '{membershipId}', + encodeURIComponent(String(membershipId)), + ); const payload: Payload = {}; if (typeof userId !== 'undefined') { payload['userId'] = userId; @@ -786,15 +1393,10 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'patch', - uri, - apiHeaders, - payload - ); + return this.client.call('patch', uri, apiHeaders, payload); } /** @@ -804,7 +1406,9 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise} */ - getPrefs(params: { teamId: string }): Promise; + getPrefs< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { teamId: string }): Promise; /** * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). * @@ -813,41 +1417,44 @@ export class Teams { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - getPrefs(teamId: string): Promise; - getPrefs( - paramsOrFirst: { teamId: string } | string - ): Promise { + getPrefs< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(teamId: string): Promise; + getPrefs< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(paramsOrFirst: { teamId: string } | string): Promise { let params: { teamId: string }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { params = (paramsOrFirst || {}) as { teamId: string }; } else { params = { - teamId: paramsOrFirst as string + teamId: paramsOrFirst as string, }; } - + const teamId = params.teamId; if (typeof teamId === 'undefined') { throw new AppwriteException('Missing required parameter: "teamId"'); } - - const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', encodeURIComponent(String(teamId))); + const apiPath = '/teams/{teamId}/prefs'.replace( + '{teamId}', + encodeURIComponent(String(teamId)), + ); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'get', - uri, - apiHeaders, - payload - ); + return this.client.call('get', uri, apiHeaders, payload); } /** @@ -858,7 +1465,9 @@ export class Teams { * @throws {AppwriteException} * @returns {Promise} */ - updatePrefs(params: { teamId: string, prefs: object }): Promise; + updatePrefs< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(params: { teamId: string; prefs: object }): Promise; /** * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. * @@ -868,22 +1477,30 @@ export class Teams { * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePrefs(teamId: string, prefs: object): Promise; - updatePrefs( - paramsOrFirst: { teamId: string, prefs: object } | string, - ...rest: [(object)?] + updatePrefs< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >(teamId: string, prefs: object): Promise; + updatePrefs< + Preferences extends Models.Preferences = Models.DefaultPreferences, + >( + paramsOrFirst: { teamId: string; prefs: object } | string, + ...rest: [object?] ): Promise { - let params: { teamId: string, prefs: object }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { teamId: string, prefs: object }; + let params: { teamId: string; prefs: object }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { teamId: string; prefs: object }; } else { params = { teamId: paramsOrFirst as string, - prefs: rest[0] as object + prefs: rest[0] as object, }; } - + const teamId = params.teamId; const prefs = params.prefs; @@ -893,8 +1510,10 @@ export class Teams { if (typeof prefs === 'undefined') { throw new AppwriteException('Missing required parameter: "prefs"'); } - - const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', encodeURIComponent(String(teamId))); + const apiPath = '/teams/{teamId}/prefs'.replace( + '{teamId}', + encodeURIComponent(String(teamId)), + ); const payload: Payload = {}; if (typeof prefs !== 'undefined') { payload['prefs'] = prefs; @@ -904,14 +1523,9 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', - 'accept': 'application/json', - } + accept: 'application/json', + }; - return this.client.call( - 'put', - uri, - apiHeaders, - payload - ); + return this.client.call('put', uri, apiHeaders, payload); } } diff --git a/src/services/vectors-db.ts b/src/services/vectors-db.ts new file mode 100644 index 00000000..d348934a --- /dev/null +++ b/src/services/vectors-db.ts @@ -0,0 +1,1428 @@ +import { AppwriteException, Client, type Payload } from '../client'; +import type { Models } from '../models'; + +export class VectorsDB { + client: Client; + + constructor(client: Client) { + this.client = client; + } + + /** + * List transactions across all databases. + * + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). + * @throws {AppwriteException} + * @returns {Promise} + */ + listTransactions(params?: { + queries?: string[]; + }): Promise; + /** + * List transactions across all databases. + * + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listTransactions(queries?: string[]): Promise; + listTransactions( + paramsOrFirst?: { queries?: string[] } | string[], + ): Promise { + let params: { queries?: string[] }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { queries?: string[] }; + } else { + params = { + queries: paramsOrFirst as string[], + }; + } + + const queries = params.queries; + + const apiPath = '/vectorsdb/transactions'; + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Create a new transaction. + * + * @param {number} params.ttl - Seconds before the transaction expires. + * @throws {AppwriteException} + * @returns {Promise} + */ + createTransaction(params?: { ttl?: number }): Promise; + /** + * Create a new transaction. + * + * @param {number} ttl - Seconds before the transaction expires. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createTransaction(ttl?: number): Promise; + createTransaction( + paramsOrFirst?: { ttl?: number } | number, + ): Promise { + let params: { ttl?: number }; + + if ( + !paramsOrFirst || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { ttl?: number }; + } else { + params = { + ttl: paramsOrFirst as number, + }; + } + + const ttl = params.ttl; + + const apiPath = '/vectorsdb/transactions'; + const payload: Payload = {}; + if (typeof ttl !== 'undefined') { + payload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get a transaction by its unique ID. + * + * @param {string} params.transactionId - Transaction ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + getTransaction(params: { + transactionId: string; + }): Promise; + /** + * Get a transaction by its unique ID. + * + * @param {string} transactionId - Transaction ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getTransaction(transactionId: string): Promise; + getTransaction( + paramsOrFirst: { transactionId: string } | string, + ): Promise { + let params: { transactionId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { transactionId: string }; + } else { + params = { + transactionId: paramsOrFirst as string, + }; + } + + const transactionId = params.transactionId; + + if (typeof transactionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); + } + const apiPath = '/vectorsdb/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Update a transaction, to either commit or roll back its operations. + * + * @param {string} params.transactionId - Transaction ID. + * @param {boolean} params.commit - Commit transaction? + * @param {boolean} params.rollback - Rollback transaction? + * @throws {AppwriteException} + * @returns {Promise} + */ + updateTransaction(params: { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }): Promise; + /** + * Update a transaction, to either commit or roll back its operations. + * + * @param {string} transactionId - Transaction ID. + * @param {boolean} commit - Commit transaction? + * @param {boolean} rollback - Rollback transaction? + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateTransaction( + transactionId: string, + commit?: boolean, + rollback?: boolean, + ): Promise; + updateTransaction( + paramsOrFirst: + | { transactionId: string; commit?: boolean; rollback?: boolean } + | string, + ...rest: [boolean?, boolean?] + ): Promise { + let params: { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + transactionId: string; + commit?: boolean; + rollback?: boolean; + }; + } else { + params = { + transactionId: paramsOrFirst as string, + commit: rest[0] as boolean, + rollback: rest[1] as boolean, + }; + } + + const transactionId = params.transactionId; + const commit = params.commit; + const rollback = params.rollback; + + if (typeof transactionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); + } + const apiPath = '/vectorsdb/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); + const payload: Payload = {}; + if (typeof commit !== 'undefined') { + payload['commit'] = commit; + } + if (typeof rollback !== 'undefined') { + payload['rollback'] = rollback; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('patch', uri, apiHeaders, payload); + } + + /** + * Delete a transaction by its unique ID. + * + * @param {string} params.transactionId - Transaction ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteTransaction(params: { transactionId: string }): Promise<{}>; + /** + * Delete a transaction by its unique ID. + * + * @param {string} transactionId - Transaction ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteTransaction(transactionId: string): Promise<{}>; + deleteTransaction( + paramsOrFirst: { transactionId: string } | string, + ): Promise<{}> { + let params: { transactionId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { transactionId: string }; + } else { + params = { + transactionId: paramsOrFirst as string, + }; + } + + const transactionId = params.transactionId; + + if (typeof transactionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); + } + const apiPath = '/vectorsdb/transactions/{transactionId}'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } + + /** + * Create multiple operations in a single transaction. + * + * @param {string} params.transactionId - Transaction ID. + * @param {object[]} params.operations - Array of staged operations. + * @throws {AppwriteException} + * @returns {Promise} + */ + createOperations(params: { + transactionId: string; + operations?: object[]; + }): Promise; + /** + * Create multiple operations in a single transaction. + * + * @param {string} transactionId - Transaction ID. + * @param {object[]} operations - Array of staged operations. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createOperations( + transactionId: string, + operations?: object[], + ): Promise; + createOperations( + paramsOrFirst: + { transactionId: string; operations?: object[] } | string, + ...rest: [object[]?] + ): Promise { + let params: { transactionId: string; operations?: object[] }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + transactionId: string; + operations?: object[]; + }; + } else { + params = { + transactionId: paramsOrFirst as string, + operations: rest[0] as object[], + }; + } + + const transactionId = params.transactionId; + const operations = params.operations; + + if (typeof transactionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "transactionId"', + ); + } + const apiPath = + '/vectorsdb/transactions/{transactionId}/operations'.replace( + '{transactionId}', + encodeURIComponent(String(transactionId)), + ); + const payload: Payload = {}; + if (typeof operations !== 'undefined') { + payload['operations'] = operations; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 524288 characters long. + * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + */ + listDocuments< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }): Promise>; + /** + * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 524288 characters long. + * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listDocuments( + databaseId: string, + collectionId: string, + queries?: string[], + transactionId?: string, + total?: boolean, + ttl?: number, + ): Promise>; + listDocuments( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, string?, boolean?, number?] + ): Promise> { + let params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + queries: rest[1] as string[], + transactionId: rest[2] as string, + total: rest[3] as boolean, + ttl: rest[4] as number, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const queries = params.queries; + const transactionId = params.transactionId; + const total = params.total; + const ttl = params.ttl; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + const apiPath = + '/vectorsdb/{databaseId}/collections/{collectionId}/documents' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + if (typeof ttl !== 'undefined') { + payload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. + * @param {string} params.documentId - Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit} params.data - Document data as JSON object. + * @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + */ + createDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & Omit; + permissions?: string[]; + transactionId?: string; + }): Promise; + /** + * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents. + * @param {string} documentId - Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Omit} data - Document data as JSON object. + * @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createDocument( + databaseId: string, + collectionId: string, + documentId: string, + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & Omit, + permissions?: string[], + transactionId?: string, + ): Promise; + createDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit)?, + string[]?, + string?, + ] + ): Promise { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + data: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit; + permissions?: string[]; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + data: rest[2] as Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Omit, + permissions: rest[3] as string[], + transactionId: rest[4] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const data = params.data; + const permissions = params.permissions; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + if (typeof data === 'undefined') { + throw new AppwriteException('Missing required parameter: "data"'); + } + const apiPath = + '/vectorsdb/{databaseId}/collections/{collectionId}/documents' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); + const payload: Payload = {}; + if (typeof documentId !== 'undefined') { + payload['documentId'] = documentId; + } + if (typeof data !== 'undefined') { + payload['data'] = data; + } + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 524288 characters long. + * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + */ + createQuery< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }): Promise>; + /** + * Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 524288 characters long. + * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createQuery( + databaseId: string, + collectionId: string, + queries?: string[], + transactionId?: string, + total?: boolean, + ttl?: number, + ): Promise>; + createQuery( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, string?, boolean?, number?] + ): Promise> { + let params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + queries: rest[1] as string[], + transactionId: rest[2] as string, + total: rest[3] as boolean, + ttl: rest[4] as number, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const queries = params.queries; + const transactionId = params.transactionId; + const total = params.total; + const ttl = params.ttl; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + const apiPath = + '/vectorsdb/{databaseId}/collections/{collectionId}/documents/query' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + if (typeof ttl !== 'undefined') { + payload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string} params.documentId - Document ID. + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @throws {AppwriteException} + * @returns {Promise} + */ + getDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + }): Promise; + /** + * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string} documentId - Document ID. + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getDocument( + databaseId: string, + collectionId: string, + documentId: string, + queries?: string[], + transactionId?: string, + ): Promise; + getDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string[]?, string?] + ): Promise { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + queries?: string[]; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + queries: rest[2] as string[], + transactionId: rest[3] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const queries = params.queries; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. + * @param {string} params.documentId - Document ID. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>} params.data - Document data as JSON object. Include all required fields of the document to be created or updated. + * @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + */ + upsertDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }): Promise; + /** + * Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. + * @param {string} documentId - Document ID. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>} data - Document data as JSON object. Include all required fields of the document to be created or updated. + * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + upsertDocument( + databaseId: string, + collectionId: string, + documentId: string, + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, + permissions?: string[], + transactionId?: string, + ): Promise; + upsertDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>)?, + string[]?, + string?, + ] + ): Promise { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + data: rest[2] as Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, + permissions: rest[3] as string[], + transactionId: rest[4] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const data = params.data; + const permissions = params.permissions; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); + const payload: Payload = {}; + if (typeof data !== 'undefined') { + payload['data'] = data; + } + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('put', uri, apiHeaders, payload); + } + + /** + * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. + * @param {string} params.documentId - Document ID. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>} params.data - Document data as JSON object. Include only fields and value pairs to be updated. + * @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + */ + updateDocument< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }): Promise; + /** + * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. + * @param {string} documentId - Document ID. + * @param {Document extends Models.DefaultDocument ? Partial & Record : Partial & Partial>} data - Document data as JSON object. Include only fields and value pairs to be updated. + * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateDocument( + databaseId: string, + collectionId: string, + documentId: string, + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, + permissions?: string[], + transactionId?: string, + ): Promise; + updateDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + } + | string, + ...rest: [ + string?, + string?, + (Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>)?, + string[]?, + string?, + ] + ): Promise { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + data?: Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>; + permissions?: string[]; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + data: rest[2] as Document extends Models.DefaultDocument + ? Partial & Record + : Partial & + Partial>, + permissions: rest[3] as string[], + transactionId: rest[4] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const data = params.data; + const permissions = params.permissions; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); + const payload: Payload = {}; + if (typeof data !== 'undefined') { + payload['data'] = data; + } + if (typeof permissions !== 'undefined') { + payload['permissions'] = permissions; + } + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('patch', uri, apiHeaders, payload); + } + + /** + * Delete a document by its unique ID. + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string} params.documentId - Document ID. + * @param {string} params.transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteDocument(params: { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + }): Promise<{}>; + /** + * Delete a document by its unique ID. + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @param {string} documentId - Document ID. + * @param {string} transactionId - Transaction ID for staging the operation. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteDocument( + databaseId: string, + collectionId: string, + documentId: string, + transactionId?: string, + ): Promise<{}>; + deleteDocument( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + } + | string, + ...rest: [string?, string?, string?] + ): Promise<{}> { + let params: { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + documentId: string; + transactionId?: string; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + documentId: rest[1] as string, + transactionId: rest[2] as string, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const documentId = params.documentId; + const transactionId = params.transactionId; + + if (typeof databaseId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + if (typeof documentId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "documentId"', + ); + } + const apiPath = + '/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId}' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ) + .replace( + '{documentId}', + encodeURIComponent(String(documentId)), + ); + const payload: Payload = {}; + if (typeof transactionId !== 'undefined') { + payload['transactionId'] = transactionId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } +} diff --git a/tsconfig.json b/tsconfig.json index 8a27d1f0..c7292aa8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,9 +16,9 @@ "skipLibCheck": true, "strict": true, "target": "ES6", - "traceResolution": false, + "traceResolution": false }, "compileOnSave": false, "exclude": ["node_modules", "dist"], "include": ["src"] -} \ No newline at end of file +} From 204c7ab318d1caff118cdcbe726cd9ea93c450e8 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 7 Sep 2026 17:15:15 +0100 Subject: [PATCH 4/8] docs: state the SDK targets Appwrite server version 2.0.x --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 76f9a997..6a8cd832 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK targets Appwrite server version 1.9.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-web/releases) when APIs differ. +**This SDK targets Appwrite server version 2.0.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-web/releases) when APIs differ. Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Web SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) From d553d8f0d3c1c4e363140308b2b16d67dd3b2d16 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 7 Sep 2026 18:21:10 +0100 Subject: [PATCH 5/8] fix: regenerate with the latest sdk-generator and add auto image gravity --- CHANGELOG.md | 2 ++ docs/examples/storage/get-file-preview.md | 2 +- src/enums/image-gravity.ts | 1 + src/services/account.ts | 8 ++++---- src/services/avatars.ts | 4 ++-- src/services/databases.ts | 4 ++-- src/services/documents-db.ts | 4 ++-- src/services/organization.ts | 2 +- src/services/presences.ts | 2 +- src/services/storage.ts | 4 ++-- src/services/tables-db.ts | 4 ++-- src/services/teams.ts | 2 +- src/services/vectors-db.ts | 4 ++-- 13 files changed, 23 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 708dafbd..68c2321c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,10 @@ * Added: `AppInstallation`, `Oauth2Consent`, `Oauth2ConsentToken` models and list types * Added: `Custom` value to `AuthenticationFactor` and `custom` field on `MfaFactors` * Added: `Cloudflare`, `Huggingface`, `Resend` values to `OAuthProvider` +* Added: `Auto` value to `ImageGravity` enum * Updated: source formatted with Prettier and linted with ESLint * Fixed: removed unused `apiHeaders` and imports from URL-returning methods +* Fixed: positional calls with an `undefined` leading argument and trailing arguments dispatch correctly ## 26.2.0 diff --git a/docs/examples/storage/get-file-preview.md b/docs/examples/storage/get-file-preview.md index 71025616..4d5913aa 100644 --- a/docs/examples/storage/get-file-preview.md +++ b/docs/examples/storage/get-file-preview.md @@ -12,7 +12,7 @@ const result = storage.getFilePreview({ fileId: '', width: 0, // optional height: 0, // optional - gravity: ImageGravity.Center, // optional + gravity: ImageGravity.Auto, // optional quality: -1, // optional borderWidth: 0, // optional borderColor: 'FFFFFF', // optional diff --git a/src/enums/image-gravity.ts b/src/enums/image-gravity.ts index a115f3a2..7b269c31 100644 --- a/src/enums/image-gravity.ts +++ b/src/enums/image-gravity.ts @@ -1,4 +1,5 @@ export enum ImageGravity { + Auto = 'auto', Center = 'center', Topleft = 'top-left', Top = 'top', diff --git a/src/services/account.ts b/src/services/account.ts index 8450967b..c00bdbdc 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -174,7 +174,7 @@ export class Account { let params: { queries?: string[]; total?: boolean }; if ( - !paramsOrFirst || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) @@ -668,7 +668,7 @@ export class Account { let params: { queries?: string[]; total?: boolean }; if ( - !paramsOrFirst || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) @@ -784,7 +784,7 @@ export class Account { let params: { duration?: number }; if ( - !paramsOrFirst || + typeof paramsOrFirst === 'undefined' || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) @@ -843,7 +843,7 @@ export class Account { let params: { queries?: string[]; total?: boolean }; if ( - !paramsOrFirst || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) diff --git a/src/services/avatars.ts b/src/services/avatars.ts index 454ec6b2..84c42d3c 100644 --- a/src/services/avatars.ts +++ b/src/services/avatars.ts @@ -557,7 +557,7 @@ export class Avatars { }; if ( - !paramsOrFirst || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) @@ -688,7 +688,7 @@ export class Avatars { }; if ( - !paramsOrFirst || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) diff --git a/src/services/databases.ts b/src/services/databases.ts index 0cfc2203..194fa6d2 100644 --- a/src/services/databases.ts +++ b/src/services/databases.ts @@ -34,7 +34,7 @@ export class Databases { let params: { queries?: string[] }; if ( - !paramsOrFirst || + typeof paramsOrFirst === 'undefined' || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) @@ -87,7 +87,7 @@ export class Databases { let params: { ttl?: number }; if ( - !paramsOrFirst || + typeof paramsOrFirst === 'undefined' || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) diff --git a/src/services/documents-db.ts b/src/services/documents-db.ts index 996307bf..2ed9a441 100644 --- a/src/services/documents-db.ts +++ b/src/services/documents-db.ts @@ -33,7 +33,7 @@ export class DocumentsDB { let params: { queries?: string[] }; if ( - !paramsOrFirst || + typeof paramsOrFirst === 'undefined' || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) @@ -85,7 +85,7 @@ export class DocumentsDB { let params: { ttl?: number }; if ( - !paramsOrFirst || + typeof paramsOrFirst === 'undefined' || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) diff --git a/src/services/organization.ts b/src/services/organization.ts index 9688571e..214ae071 100644 --- a/src/services/organization.ts +++ b/src/services/organization.ts @@ -40,7 +40,7 @@ export class Organization { let params: { queries?: string[]; total?: boolean }; if ( - !paramsOrFirst || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) diff --git a/src/services/presences.ts b/src/services/presences.ts index 466e6ce9..e1e91a0c 100644 --- a/src/services/presences.ts +++ b/src/services/presences.ts @@ -47,7 +47,7 @@ export class Presences { let params: { queries?: string[]; total?: boolean; ttl?: number }; if ( - !paramsOrFirst || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) diff --git a/src/services/storage.ts b/src/services/storage.ts index 3de50c67..7c9a0a0f 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -604,7 +604,7 @@ export class Storage { * @param {string} params.fileId - File ID * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000. * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000. - * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right + * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of auto,center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0. * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix. @@ -640,7 +640,7 @@ export class Storage { * @param {string} fileId - File ID * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000. * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000. - * @param {ImageGravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right + * @param {ImageGravity} gravity - Image crop gravity. Can be one of auto,center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0. * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix. diff --git a/src/services/tables-db.ts b/src/services/tables-db.ts index 267eba03..aa8a8b50 100644 --- a/src/services/tables-db.ts +++ b/src/services/tables-db.ts @@ -33,7 +33,7 @@ export class TablesDB { let params: { queries?: string[] }; if ( - !paramsOrFirst || + typeof paramsOrFirst === 'undefined' || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) @@ -85,7 +85,7 @@ export class TablesDB { let params: { ttl?: number }; if ( - !paramsOrFirst || + typeof paramsOrFirst === 'undefined' || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) diff --git a/src/services/teams.ts b/src/services/teams.ts index 7a8f5842..c44b6f52 100644 --- a/src/services/teams.ts +++ b/src/services/teams.ts @@ -47,7 +47,7 @@ export class Teams { let params: { queries?: string[]; search?: string; total?: boolean }; if ( - !paramsOrFirst || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) diff --git a/src/services/vectors-db.ts b/src/services/vectors-db.ts index d348934a..083d7ce9 100644 --- a/src/services/vectors-db.ts +++ b/src/services/vectors-db.ts @@ -33,7 +33,7 @@ export class VectorsDB { let params: { queries?: string[] }; if ( - !paramsOrFirst || + typeof paramsOrFirst === 'undefined' || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) @@ -85,7 +85,7 @@ export class VectorsDB { let params: { ttl?: number }; if ( - !paramsOrFirst || + typeof paramsOrFirst === 'undefined' || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) From a366d208dec601a2d9c3526beef7bc86ddc9e9b0 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 24 Sep 2026 15:38:43 +0100 Subject: [PATCH 6/8] chore: update Web SDK to 28.0.0 --- CHANGELOG.md | 12 + README.md | 6 +- ...gs.md => create-email-verification-otp.md} | 5 +- .../account/create-id-token-session.md | 20 + docs/examples/account/create-recovery-otp.md | 16 + .../account/update-email-verification-otp.md | 16 + docs/examples/account/update-recovery-otp.md | 17 + package-lock.json | 4409 +++++++++-------- package.json | 8 +- src/client.ts | 25 +- src/enums/id-token-provider.ts | 4 + src/enums/o-auth-provider.ts | 2 + src/index.ts | 3 +- src/models.ts | 118 +- src/services/account.ts | 584 ++- src/services/databases.ts | 58 +- src/services/documents-db.ts | 62 +- src/services/functions.ts | 8 +- src/services/messaging.ts | 7 +- src/services/organization.ts | 6 +- src/services/presences.ts | 9 +- src/services/storage.ts | 29 +- src/services/tables-db.ts | 58 +- src/services/teams.ts | 48 +- src/services/vectors-db.ts | 46 +- 25 files changed, 3037 insertions(+), 2539 deletions(-) rename docs/examples/account/{list-logs.md => create-email-verification-otp.md} (74%) create mode 100644 docs/examples/account/create-id-token-session.md create mode 100644 docs/examples/account/create-recovery-otp.md create mode 100644 docs/examples/account/update-email-verification-otp.md create mode 100644 docs/examples/account/update-recovery-otp.md create mode 100644 src/enums/id-token-provider.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 68c2321c..588ec87b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log +## 28.0.0 + +* Breaking: removed `Account.listLogs` and the `Log`, `LogList` models +* Breaking: removed `Client.setDevKey` +* Breaking: SDK now targets Appwrite 2.3 (`X-Appwrite-Response-Format: 2.3.0`) +* Added: `Account.createIdTokenSession` for native Apple and Google sign-in with `IdTokenProvider` enum +* Added: `Account.createRecoveryOTP` and `Account.updateRecoveryOTP` for code-based password recovery +* Added: `Account.createEmailVerificationOTP` and `Account.updateEmailVerificationOTP` +* Added: `Kakao` and `Tiktok` values to `OAuthProvider` +* Added: `passwordPwned` field on `User` and `providerIdToken` field on `Identity` +* Fixed: empty-string required path parameters are rejected instead of sent to the API + ## 27.0.0 * Breaking: `Execution.functionId` replaced by `resourceId` and `resourceType` diff --git a/README.md b/README.md index 6a8cd832..bee9ad21 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Appwrite Web SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-web.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-2.0.0-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-2.3.0-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK targets Appwrite server version 2.0.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-web/releases) when APIs differ. +**This SDK targets Appwrite server version 2.3.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-web/releases) when APIs differ. Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Web SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) @@ -33,7 +33,7 @@ import { Client, Account } from 'appwrite'; To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: ```html - + ``` ## Getting Started diff --git a/docs/examples/account/list-logs.md b/docs/examples/account/create-email-verification-otp.md similarity index 74% rename from docs/examples/account/list-logs.md rename to docs/examples/account/create-email-verification-otp.md index 180448ea..5e293497 100644 --- a/docs/examples/account/list-logs.md +++ b/docs/examples/account/create-email-verification-otp.md @@ -7,9 +7,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listLogs({ - queries: [], // optional - total: false, // optional +const result = await account.createEmailVerificationOTP({ + phrase: false, // optional }); console.log(result); diff --git a/docs/examples/account/create-id-token-session.md b/docs/examples/account/create-id-token-session.md new file mode 100644 index 00000000..abd586cf --- /dev/null +++ b/docs/examples/account/create-id-token-session.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Account, IdTokenProvider } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createIdTokenSession({ + provider: IdTokenProvider.Apple, + idToken: '', + nonce: '', // optional + accessToken: '', // optional + accessTokenExpiry: 0, // optional + name: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/account/create-recovery-otp.md b/docs/examples/account/create-recovery-otp.md new file mode 100644 index 00000000..62bc8f32 --- /dev/null +++ b/docs/examples/account/create-recovery-otp.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecoveryOTP({ + email: 'email@example.com', + phrase: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/account/update-email-verification-otp.md b/docs/examples/account/update-email-verification-otp.md new file mode 100644 index 00000000..d94f8eae --- /dev/null +++ b/docs/examples/account/update-email-verification-otp.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmailVerificationOTP({ + userId: '', + secret: '', +}); + +console.log(result); +``` diff --git a/docs/examples/account/update-recovery-otp.md b/docs/examples/account/update-recovery-otp.md new file mode 100644 index 00000000..c8b124cb --- /dev/null +++ b/docs/examples/account/update-recovery-otp.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Account } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecoveryOTP({ + userId: '', + secret: '', + password: 'password', +}); + +console.log(result); +``` diff --git a/package-lock.json b/package-lock.json index 14e48518..b3c4265a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,2157 +1,2260 @@ { - "name": "appwrite", - "version": "27.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "appwrite", - "version": "27.0.0", - "license": "BSD-3-Clause", - "dependencies": { - "json-bigint": "1.0.0" - }, - "devDependencies": { - "@eslint/js": "10.0.1", - "@rollup/plugin-commonjs": "29.0.3", - "@rollup/plugin-node-resolve": "16.0.3", - "@rollup/plugin-typescript": "12.3.0", - "@types/json-bigint": "1.0.4", - "eslint": "10.9.1", - "playwright": "1.56.1", - "prettier": "3.9.6", - "rollup": "4.63.1", - "serve-handler": "6.1.7", - "tslib": "2.8.1", - "typescript": "5.9.3", - "typescript-eslint": "8.69.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", - "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", - "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^3.0.5", - "debug": "^4.3.1", - "minimatch": "^10.2.4" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", - "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", - "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/js": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", - "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "eslint": "^10.0.0" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/@eslint/object-schema": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", - "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz", - "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1", - "levn": "^0.4.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", - "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/types": "^0.15.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.8", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", - "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.2", - "@humanfs/types": "^0.15.0", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/types": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", - "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@napi-rs/lzma-linux-x64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", - "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^22.20 || ^24.12 || >=25" - } - }, - "node_modules/@rollup/plugin-commonjs": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz", - "integrity": "sha512-ZaOxZceP7SOUW7Lqw5IRVweSQYWaeIPnXIGLiB690EBA3FGJTO40EEr2L5yZplJWsgTCogILRSpcAe7+U0Otdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "commondir": "^1.0.1", - "estree-walker": "^2.0.2", - "fdir": "^6.2.0", - "is-reference": "1.2.1", - "magic-string": "^0.30.3", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=16.0.0 || 14 >= 14.17" - }, - "peerDependencies": { - "rollup": "^2.68.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", - "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-typescript": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz", - "integrity": "sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.1.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.14.0||^3.0.0||^4.0.0", - "tslib": "*", - "typescript": ">=3.7.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - }, - "tslib": { - "optional": true - } - } - }, - "node_modules/@rollup/pluginutils": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz", - "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.1.tgz", - "integrity": "sha512-UZ8sUxPTiHWYX9QNdJedb1kDZSpS1t/VPWBWGSgqHNi9w3Cu6IXvu2mzbhiTiPvtrqgTQJ+zqiAq2iPIPilpaQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.1.tgz", - "integrity": "sha512-cQ4nFQABN5cDvDpbvJ7bMStCpnaVxynZrRMfUJYgxcIk9Sh54FIO1vtfkg0B69REjER77ioZ/ov+eAApx/KmLQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.1.tgz", - "integrity": "sha512-FQNqd1lRy/0QhDk3xeRIkSBiCpXCiDnZO3YLVdcDKN1UBiKToNftCzcXYNLshmPDUMlu2TdeS8tGcsU6f3YF1Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.1.tgz", - "integrity": "sha512-pvD16V939D3CloK0+qikpGaxiPrDUXTe7Y5cWOMkMSy7m1cawa8EGy/kXYi/G/cKAC4HDAbSnzCIk1WmsoOKXg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.1.tgz", - "integrity": "sha512-pcFGeL2345VwdTnJhA6zLbew+YgWB0qBG2+dMtXjCicf6+rm6kO6cOoh5VnTe0ZMrMRgRyuHmCJxZWrIdzYuOw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.1.tgz", - "integrity": "sha512-mRJlqSRulVzcKq/LKA6ICSIc3K/l4fzlVn/gePn2nXIHy8seRi5z/eeRE0d/XMBxcMldiXtQTSpRj0tkkC3g8Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.1.tgz", - "integrity": "sha512-YDUNvVM85TI3g/1OpnqKP1h4NeW/j64DfWMf+G3M809xNk1bJSnpFp4sh83NpmVE5DXnkh8ULor4LTVZKoYLHw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.1.tgz", - "integrity": "sha512-7Mcn71p9ZuQFAj+h+dhQXy/yeLePRS2yKRnmW1DijA9thKO5qap0GNOIQK4yQ6iP3SU0Mrb/yWo8h8vgRba8lw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.1.tgz", - "integrity": "sha512-4YiLQTX6U4CSl0L9cluep9A9W6UmTfqBDc2/CH6wlu54pl4E7Jn3cOD8oxzvBDEGk/JMKgJ47C8g+radF7mwvg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.1.tgz", - "integrity": "sha512-2ra8F7w8OquwZN9z2/fKFnli69wa8PLwaVzRMIPGb13ByMJwC28Fbp8YcVGoUhlYMTt7j5j9bNgpysrN2UM+vw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.1.tgz", - "integrity": "sha512-Sy20ncyhjmBP0Ml+UvQbimjlk6VFgjW5uNP+qqwHB00mTE8Bl2C1TuHTlRwK2YoXeZbee5lP2XevBWVkAQAtSQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.1.tgz", - "integrity": "sha512-noITLp8oNjYliPnGWmLyelIHwULGqbHloQHGw1rtxbWhTuWooRpnZarZQJ1y9EUC4szuCusCc+HEpUtxpIwYvA==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.1.tgz", - "integrity": "sha512-hlxxXd+F1mWiAcaFR7Sv9ZQT6m6UfI8+Vy/kFJzztq2pDMU/0wZ9sish0iszNZvsQDo8Gc0i5yuFEOz5dDf6fA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.1.tgz", - "integrity": "sha512-EF7OpqQTQ/BvGqLzUi4rEHuagCV9MugAUXSHemwPW5vxZ75RR+jxO/2j95Ph2dalMpFHSVECjRoioHZgA9zOYA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.1.tgz", - "integrity": "sha512-wQO3JesW9PRkwlabQ27y7sPfVOOTLRG73I4F2UYHG5PXun3J9U3y+b7ezVKSYbsvSKGQ1k1cq8Qlun4C9kLt3w==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.1.tgz", - "integrity": "sha512-ouAGwhO6wHRXdnOVCOsB0tRFkA7nhNB2Nwax6oECXN0YiN8EYUTBAOudADOB1PI+yDL61TeNx/u7MVCzksNbkQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.1.tgz", - "integrity": "sha512-q2R38Sn+1J8RxhfJ+T54wSWmyKXWec+9jgDfqO2AtArEqHO5R2aeayp5H5OYLr5UYDVGsVaZPEFUooMhYCdz5A==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.1.tgz", - "integrity": "sha512-gfI5T24WLLuFfSKw7Go/zDXjAAV0fny0swTaDv+WjK7vqcw4cRhFfdsyKL1n+ukI+ooBxn3bVQnyrn06WpI50w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.1.tgz", - "integrity": "sha512-4h6XqthmB4Hspji84wvgk+ElodTsGj+dbZqHJHHtKxj4mYq0ANSEEPX9ys3moJueqsRjwpaJYH7874Itwnj2ow==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.1.tgz", - "integrity": "sha512-dlfCOa87o1VAYegLQ9EKilx2JCeRofiyPGhTCmqnuXZ6bMPiycO1rq1+sKoulAp7pGLIsTIw+1x5R+zgh5LhhA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.1.tgz", - "integrity": "sha512-cjkLbOlfcm3QGhMM1J5zaZjsw1GggbN6rw9UTSSRrPrR1KkcXnN7Uq9rPw34xImQ9VOY9GN+6u2Zj80B9ptkcw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.1.tgz", - "integrity": "sha512-Li1KdUnWGE4N3e1F/B4RTB1ms+nG4WBgjByO46pkeBVX/2UBsY53xf5vK9WygVmnH3RwncIST7lkSdLSY6P9lg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.1.tgz", - "integrity": "sha512-t4ZYOSoLTgwhuFMrmTMLx/+i1DQVK7HYqMc6kY46EApwi8X0nIVphzdNoThU3xt6n+N5urG1/gxBdCaKDLavfg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.1.tgz", - "integrity": "sha512-RgroPfMmKlD1RzSDxvwgcPiy2HNQKoYV7OmwIXDsk73uKW5t6B/V8KIy27SMv/FNXFo/oSBtWc9J0X7t91ezZg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.1.tgz", - "integrity": "sha512-at8QVep6S3h5Y6gSbdGU06bRY5WJkf6WUduM9YtvYMbYhB1MOFfUgc6kehitQXzOtMSaT70q7f9ydPhpqu821w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@types/esrecurse": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", - "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", - "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/resolve": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", - "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.69.0.tgz", - "integrity": "sha512-t5jQTKPIgVW1PE6dR6H6Qz5gm8zjMlX5/2gRaOGd9eO6V7J+tQc6iWKukEe7dY8u9HyYasQ0yfF0/FSSTEO2gA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.69.0", - "@typescript-eslint/type-utils": "8.69.0", - "@typescript-eslint/utils": "8.69.0", - "@typescript-eslint/visitor-keys": "8.69.0", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.69.0", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.8.tgz", - "integrity": "sha512-YYNsSlXBjMk92SKnkwvB5LOVSa6OznlFUGcsvrFgNJbJCd0M1XKeFVRc8ZByeCqz32FivYNHJVooLmdqrmvp/Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.69.0.tgz", - "integrity": "sha512-l4b0DhWioGg6Gt2ebGlvfkFMOjRsauxtsnDRwUSRX1qHq3HdTfQHV8wW9zEXeciai6HfeaKOedQn2Zoofx3WBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.69.0", - "@typescript-eslint/types": "8.69.0", - "@typescript-eslint/typescript-estree": "8.69.0", - "@typescript-eslint/visitor-keys": "8.69.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.69.0.tgz", - "integrity": "sha512-yi4obFrHMmnsesWehHbkg9zMA7Jt8cXT+mKM08G999pH1yT6nqgsHx7MYm0uY1wAj8CqiBXYRJ7WAT0QdQHQXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.69.0", - "@typescript-eslint/types": "^8.69.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.69.0.tgz", - "integrity": "sha512-ewfspqWvSxKSOaplqAUNbaSFO0eB6w1EtQ+esfYFRm3614Ty4uNtExkcbgd6nWsXphbqKyf9ZYdbZdv2xEoWEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.69.0", - "@typescript-eslint/visitor-keys": "8.69.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.69.0.tgz", - "integrity": "sha512-xNqK7YTDZsLniQMV/4rpFR8Z5JlqeRvVjuG1YgF/mdPVH84HSD19L8CczMA0qg2RfwEV231GHH3VnToJDo4MfQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.69.0.tgz", - "integrity": "sha512-ZfoJAVg3JZndQEpEl9petVlxau3lRuElc4HRMuAlLCf8to04/iHz692RUSNmXKDjEuJmIL+KZ2/BsOcBc16dsA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.69.0", - "@typescript-eslint/typescript-estree": "8.69.0", - "@typescript-eslint/utils": "8.69.0", - "debug": "^4.4.3", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.69.0.tgz", - "integrity": "sha512-K3VrubUPhlo9VDBS6QdI8YB5j7ClpqLRdefcz6PFrhnwicehBweqQ9Evhl4l+FYz0HdDmMqIiSX0aldGRYtDCA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.69.0.tgz", - "integrity": "sha512-AdFkgqck3Vudb/kWnxlyafU/4aBhHrbQ9locP2N4psXTy5mOBg0SHJumnLvx7r6g1gV4DKvUFwV2nJZBoqOD8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.69.0", - "@typescript-eslint/tsconfig-utils": "8.69.0", - "@typescript-eslint/types": "8.69.0", - "@typescript-eslint/visitor-keys": "8.69.0", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.69.0.tgz", - "integrity": "sha512-tUbx60BBqQa31kXF5MCsOOLL5E/WzUuxIn7YpAvq+eaUlqvk8/NXnXMBNAdLCr0icjkzem7iUA5QqWHe/hJ1aw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.69.0", - "@typescript-eslint/types": "8.69.0", - "@typescript-eslint/typescript-estree": "8.69.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.69.0.tgz", - "integrity": "sha512-+rmdgPA+EXkNgKYvHvFfhrs35utXbwaC5PGpDquSXcoXQDKUA5UjV0LmTucG/4JXkM31BTu4TilHtrN8IVBe8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.69.0", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/acorn": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", - "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", - "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/bignumber.js": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", - "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true, - "license": "MIT" - }, - "node_modules/content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", - "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", - "dev": true, - "license": "MIT", - "workspaces": [ - "packages/*" - ], - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.5", - "@eslint/config-helpers": "^0.7.0", - "@eslint/core": "^1.2.1", - "@eslint/plugin-kit": "^0.7.2", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.14.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^9.1.2", - "eslint-visitor-keys": "^5.0.1", - "espree": "^11.2.0", - "esquery": "^1.7.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "minimatch": "^10.2.5", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", - "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@types/esrecurse": "^4.3.1", - "@types/estree": "^1.0.8", - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/espree": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", - "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.16.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^5.0.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true, - "license": "MIT" - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", - "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/hasown": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", - "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/is-core-module": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", - "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "license": "MIT", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "~1.33.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true, - "license": "(WTFPL OR MIT)" - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-to-regexp": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", - "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", - "dev": true, - "license": "MIT" - }, - "node_modules/picomatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", - "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/playwright": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", - "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.56.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/playwright-core": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", - "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", - "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/resolve": { - "version": "1.22.12", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", - "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/rollup": { - "version": "4.63.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.1.tgz", - "integrity": "sha512-3Df9jsstwhccuEfmAMi9l8XUh/GOkVObmFTU7CCVBysEbcOZLl84jCtaAZMcPiMz2EGKsATzQcU+Xr3n/wU6cg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.9" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@napi-rs/lzma-linux-x64-gnu": "1.5.1", - "@rollup/rollup-android-arm-eabi": "4.63.1", - "@rollup/rollup-android-arm64": "4.63.1", - "@rollup/rollup-darwin-arm64": "4.63.1", - "@rollup/rollup-darwin-x64": "4.63.1", - "@rollup/rollup-freebsd-arm64": "4.63.1", - "@rollup/rollup-freebsd-x64": "4.63.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.63.1", - "@rollup/rollup-linux-arm-musleabihf": "4.63.1", - "@rollup/rollup-linux-arm64-gnu": "4.63.1", - "@rollup/rollup-linux-arm64-musl": "4.63.1", - "@rollup/rollup-linux-loong64-gnu": "4.63.1", - "@rollup/rollup-linux-loong64-musl": "4.63.1", - "@rollup/rollup-linux-ppc64-gnu": "4.63.1", - "@rollup/rollup-linux-ppc64-musl": "4.63.1", - "@rollup/rollup-linux-riscv64-gnu": "4.63.1", - "@rollup/rollup-linux-riscv64-musl": "4.63.1", - "@rollup/rollup-linux-s390x-gnu": "4.63.1", - "@rollup/rollup-linux-x64-gnu": "4.63.1", - "@rollup/rollup-linux-x64-musl": "4.63.1", - "@rollup/rollup-openbsd-x64": "4.63.1", - "@rollup/rollup-openharmony-arm64": "4.63.1", - "@rollup/rollup-win32-arm64-msvc": "4.63.1", - "@rollup/rollup-win32-ia32-msvc": "4.63.1", - "@rollup/rollup-win32-x64-gnu": "4.63.1", - "@rollup/rollup-win32-x64-msvc": "4.63.1", - "fsevents": "~2.3.2" - } - }, - "node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serve-handler": { - "version": "6.1.7", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz", - "integrity": "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.0.0", - "content-disposition": "0.5.2", - "mime-types": "2.1.18", - "minimatch": "3.1.5", - "path-is-inside": "1.0.2", - "path-to-regexp": "3.3.0", - "range-parser": "1.2.0" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/ts-api-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", - "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.69.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.69.0.tgz", - "integrity": "sha512-B3MltX0VqjUBNEe3b3sSuiRbfa6XrfHFtBiPamjT5AsW/dfq+y+bc0wyuS9DxAS1LyzCxRp2+rxzpLUvqM2BvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.69.0", - "@typescript-eslint/parser": "8.69.0", - "@typescript-eslint/typescript-estree": "8.69.0", - "@typescript-eslint/utils": "8.69.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "name": "appwrite", + "version": "28.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "appwrite", + "version": "28.0.0", + "license": "BSD-3-Clause", + "dependencies": { + "json-bigint": "1.0.0" + }, + "devDependencies": { + "@eslint/js": "10.0.1", + "@rollup/plugin-commonjs": "29.0.3", + "@rollup/plugin-node-resolve": "16.0.3", + "@rollup/plugin-typescript": "12.3.0", + "@types/json-bigint": "1.0.4", + "eslint": "10.10.0", + "playwright": "1.56.1", + "prettier": "3.9.6", + "rollup": "4.63.2", + "serve-handler": "6.1.7", + "tslib": "2.8.1", + "typescript": "5.9.3", + "typescript-eslint": "8.70.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "overrides": { + "brace-expansion": "5.0.9" + } + }, + "node_modules/@cacheable/memory": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@cacheable/memory/-/memory-2.2.0.tgz", + "integrity": "sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cacheable/utils": "^2.5.0", + "@keyv/bigmap": "^1.3.1", + "hookified": "^1.15.1", + "keyv": "^5.6.0" + } + }, + "node_modules/@cacheable/utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.5.0.tgz", + "integrity": "sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hashery": "^1.5.1", + "keyv": "^5.6.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz", + "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@keyv/bigmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.3.1.tgz", + "integrity": "sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hashery": "^1.4.0", + "hookified": "^1.15.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "keyv": "^5.6.0" + } + }, + "node_modules/@keyv/serialize": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz", + "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz", + "integrity": "sha512-ZaOxZceP7SOUW7Lqw5IRVweSQYWaeIPnXIGLiB690EBA3FGJTO40EEr2L5yZplJWsgTCogILRSpcAe7+U0Otdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "fdir": "^6.2.0", + "is-reference": "1.2.1", + "magic-string": "^0.30.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0 || 14 >= 14.17" + }, + "peerDependencies": { + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", + "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-typescript": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz", + "integrity": "sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0||^4.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz", + "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.2.tgz", + "integrity": "sha512-Xa6RDoWa+hNiX6PgsljlH6W75RaONx3y6PVlbLhkEWW+GaPQ3dP5gwbL/erAzQHWwkvW5UxdD5l87Qx2FAQ/4A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.2.tgz", + "integrity": "sha512-vNASxsghMfQ5s+v3PrpnJd+ryL/26lxCCaGI+sDJ7VzmHiYXIrrVltsDhaawxLM1WcoMU2oYlbPHLaYQtBzhcg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.2.tgz", + "integrity": "sha512-0dWDjmlrpZAgjPD/aPzUDhBW8APLRjAni5bOrM76wiiZm+E+KTMVKNhAzaTBohz8UyO2fKNAl0+fygbe2HZXOA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.2.tgz", + "integrity": "sha512-N58uktcwzk3+qT4KHEuNdIxX1N01RWrkfVoml69EAbSaNDL+sbNVLx2RMl4Qd23lpA0fgPvyh5hHb4weD5WKmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.2.tgz", + "integrity": "sha512-HWF2zH8EAp2scWRpt2PGe6iUGz7zi04waXsdRr3zb4DWCk2ImIo5FZu0jjmD53nP/DGSvnW0e7/1ToCNZs2lZw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.2.tgz", + "integrity": "sha512-MkvcwHMnzPSMOQEwB6wHnLzmc+hT8BGc5bW/Mhmjjgx3wbj6VBnlc47XsK74kD0K9MikFfXpQqyz4NUXaUW62A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.2.tgz", + "integrity": "sha512-xe1bCKPJaKsD0tfd7Rb6bGfUogJTpKbTEEthsfdb7hTfTRNJVQTdirabQx0o6ERVba/smkM720soMY+0QnrlSQ==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.2.tgz", + "integrity": "sha512-yOM7LdK0p6gk6+Q773OEwtlsikT1TL3yMmYsTtRlDRPha5vV2DC5x7LqRWDr6f3cSYNMKVqxzffXv8ivxNBIFQ==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.2.tgz", + "integrity": "sha512-qiWuJJV3DybA2IfzvRimeKXGrGuVPv1zobSY/26KnP3HbV0VcNb3ECzgvtbvF3xjSMkcooou6HASXZuLdjnhpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.2.tgz", + "integrity": "sha512-akcZquRzCY/KpUoZAMBhGf7oi4LmXq1BzRA5CPAC3rkUf28Y/sAYV3jSL+JKd7cwEyFvR5G0XVZ0gaMedP+60A==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.2.tgz", + "integrity": "sha512-fNwYHrPyYyxauPzX/cpYw8Z7LQpp+DGA0KCoswA0aVFBpmdMil9XgjB8V3Ny64Ihu797+GKcuJqnsOKEmor7fA==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.2.tgz", + "integrity": "sha512-XfvsgzR7DZqREdst7K1Mj3ilSUM5xLAHJcIMDFPKdxTs9q5VHOT8aMA+a683fqBu7DQl8+Sd9HCsQYL8EMY9qA==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.2.tgz", + "integrity": "sha512-Pp7gVZggEFlbcuztay+/U0gVG9S1XAh8i7I1Re/htbAzo43P5wHZHw6pTyzotISqlKohoh9RpIfnOz3RbemK1w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.2.tgz", + "integrity": "sha512-zkgL2xff6i7u5hau/m6FGeS8gRkLEdgLw522WGmdWWlLd9btmNl3S80mcEjtGq+kvgUekQ3+BOYLLLcPlS2LIA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.2.tgz", + "integrity": "sha512-qOheJomrkVCbbHFJ7L3J97cnhfogKqguAQphv26+3ZsAQIF1L19b+dArl//s8rjJHJLz9byykyM8NBP4nmSa1g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.2.tgz", + "integrity": "sha512-XlxLD54wQhH3FciCgMofxBw27NzUe818gJH410qWvc41UT0ZFcgxVjyX5/EK8MPTupjeVWqN5oy+9pCA9mqfCA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.2.tgz", + "integrity": "sha512-vdryWeRb2bLJZf0Fv/W8se6nvsHe2PkTCxV0meheK3nQE+G90VCJcke51Miy1yQRsfm2uqIyjXOu4wmUzbTtkQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.2.tgz", + "integrity": "sha512-bcq2h2pkKmH2po4cZV8VWzO4lL40STyu/nLoFpYMQp9C2tCVNTdcVv86MwSsn3D5s1FBe2Ty1atqvVAUTMimNg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.2.tgz", + "integrity": "sha512-EGoo5DMVMRkTId8fuTDaoxVlR5ZTsKULUezRjd9gCw5eeY+DjCvDpZAOlNUvKPGX+7rS1RWx6j+yOpNPx0cUgQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.2.tgz", + "integrity": "sha512-MErl12k7BFHZG1TI9QF/3lSSZARzq9KgNy/FjnqFMCkv+N4RSSzoUCA5h2mqHX4Mox3WaTVKblyzhQ1zRb2ZuQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.2.tgz", + "integrity": "sha512-ILs8k07Wh4p0PsNY4wYLEaXZKMOpVhrG5QDB0yHhGhuzOfDlnyHN6sflL4El/MpUP1y8uY2lUZrv4oBS6pTT3g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.2.tgz", + "integrity": "sha512-hKgB3nz/TKD3Wv78XEsyXzQsNjvhOHmwKQTvXADGOyU/cIClZDO7DsoggbdmJDPGp5V80tA3Vfv61PaKTLH3LA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.2.tgz", + "integrity": "sha512-T4wf1mudIDxN8Q/CWIBJC1u5gQUc+r5mPvlwoSbIvNkyVTP2TAFeobEmst5AQ4gMyAz4sSByVdoTDfvTmGK/8g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.2.tgz", + "integrity": "sha512-tC3IY7qoaD9Ll3/8WJQn49j5V2f/NuI9S41NOE2iM5MPs3sPIvOkVToLcz/7Bz4pyF7PSvrtwu8I/pUrGOSecQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.2.tgz", + "integrity": "sha512-6NHnk/K3eq2ZFYcU1X8g67s9qIJRCOTT92gwLMVBp08dB2uuuwI1/Q/empzL2Bfr2f2WRLJVwpp90RmacQyFkw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", + "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.0.tgz", + "integrity": "sha512-/v8HZt6RlyIZxB3ntehELOcUcfxKPVGWXnQdJuHRmzrqgF8nQypcC/oxGW+Ot4VGKDq81XugPKxx0n5PBtf9PA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/type-utils": "8.70.0", + "@typescript-eslint/utils": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.70.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.9.tgz", + "integrity": "sha512-brTTsvFRt5C1gGHtPst/281UjPD5t9fBqbgoMPlVWy11ZLTPfu7HxK4ZYqO9H7o/yC9rSTCI85EaQ4OoY12qYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.0.tgz", + "integrity": "sha512-zYvrmj9Yxd63UGaXw+kdt6A0F0s0qveJyuatIM77bYC2DE4pgmg7a50u8LR7PRtXd0x+h+Tl3eXabGm06SWd3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.0.tgz", + "integrity": "sha512-hFHbTNqhU9G+2eKFXCBVb1tjFT/LceiJ4+HfLO4pTpDI0KHi6iajpcFFkaSQ9gXmCh7n82A0PthaayEdN6mspQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.70.0", + "@typescript-eslint/types": "^8.70.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.0.tgz", + "integrity": "sha512-8nP3Kwh5hlgZ4FicGvmznAmJe8UL4sdU8tLukrPaMuQmDuk4Y8xYfzu/aYZW4xT2JCgc7H/TpDI5cGlxcWJSqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.0.tgz", + "integrity": "sha512-adnkeeNq9Sq1sUf4+FRVc0KdgYghzsgFpZSQVZVvY0LCuUuN0FnQgyGzCJeC4fW1cdXseBAjU2EOqUIjbNcZUw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.0.tgz", + "integrity": "sha512-NUMKIhYVaVIVLnRL9CRt+VVcuLgSHUCpXn4/+K8wql+vdInUzvx8BjUO1oJ7cG9shjFJKtF8F8Hh2kCh3/KBVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/utils": "8.70.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.0.tgz", + "integrity": "sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.0.tgz", + "integrity": "sha512-d9NmHMPEKQ7QCLLm1jI3zmoQBwT5KwFYjXBJ9ymZfKCUU+5rmTRykKAFvH5Qn/ZCds3CEAFS9OC9M/jkl0X2bA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.70.0", + "@typescript-eslint/tsconfig-utils": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.0.tgz", + "integrity": "sha512-oZmtKJz/4fufZ2p3+Cn3ijEojcdfR+1zYDH2xKYrEly0dR/Q/1xUPRCOlKGxod78nWlU2UnDe09GZ3TaknBFGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.0.tgz", + "integrity": "sha512-BoC8PiO4Hkdo0TVJh9Ntxr5MxPDI7/oFsrygN5ADelFSeXG/qgNuucIGA+L5Z6JpPTE/uRfcTWtscjbUaufepQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacheable": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.5.0.tgz", + "integrity": "sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cacheable/memory": "^2.2.0", + "@cacheable/utils": "^2.5.0", + "hookified": "^1.15.0", + "keyv": "^5.6.0", + "qified": "^0.10.1" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.10.0.tgz", + "integrity": "sha512-NPXn6r5zl4uET1DAVPaOwzX3rut4c0wcmw3dWJAfOsTM5+TogXo0DDjz8pwm/hL8cyVNpHqeK4JpN0NjnyFFNw==", + "dev": true, + "license": "MIT", + "workspaces": [ + "packages/*" + ], + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.3", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "11.1.5 || >11.1.6 <12", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true } + } + }, + "node_modules/file-entry-cache": { + "version": "11.1.5", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-11.1.5.tgz", + "integrity": "sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^6.1.23" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "6.1.23", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.23.tgz", + "integrity": "sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cacheable": "^2.5.0", + "flatted": "^3.4.2", + "hookified": "^1.15.0" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/hashery": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.1.tgz", + "integrity": "sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^1.15.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hookified": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz", + "integrity": "sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.6.0.tgz", + "integrity": "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@keyv/serialize": "^1.1.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "~1.33.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true, + "license": "(WTFPL OR MIT)" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-to-regexp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/playwright": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", + "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.56.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", + "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qified": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/qified/-/qified-0.10.1.tgz", + "integrity": "sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^2.1.1" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/qified/node_modules/hookified": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-2.2.0.tgz", + "integrity": "sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==", + "dev": true, + "license": "MIT" + }, + "node_modules/range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.2.tgz", + "integrity": "sha512-l5eyksV4tPBj6lJyEa37YzIOCSOV7lkZzEHUdpjWZbtD7wTcFYmEYXSgm5bT4vV+dZLb9rBG1W9GROOG4NS4Ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.63.2", + "@rollup/rollup-android-arm64": "4.63.2", + "@rollup/rollup-darwin-arm64": "4.63.2", + "@rollup/rollup-darwin-x64": "4.63.2", + "@rollup/rollup-freebsd-arm64": "4.63.2", + "@rollup/rollup-freebsd-x64": "4.63.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.63.2", + "@rollup/rollup-linux-arm-musleabihf": "4.63.2", + "@rollup/rollup-linux-arm64-gnu": "4.63.2", + "@rollup/rollup-linux-arm64-musl": "4.63.2", + "@rollup/rollup-linux-loong64-gnu": "4.63.2", + "@rollup/rollup-linux-loong64-musl": "4.63.2", + "@rollup/rollup-linux-ppc64-gnu": "4.63.2", + "@rollup/rollup-linux-ppc64-musl": "4.63.2", + "@rollup/rollup-linux-riscv64-gnu": "4.63.2", + "@rollup/rollup-linux-riscv64-musl": "4.63.2", + "@rollup/rollup-linux-s390x-gnu": "4.63.2", + "@rollup/rollup-linux-x64-gnu": "4.63.2", + "@rollup/rollup-linux-x64-musl": "4.63.2", + "@rollup/rollup-openbsd-x64": "4.63.2", + "@rollup/rollup-openharmony-arm64": "4.63.2", + "@rollup/rollup-win32-arm64-msvc": "4.63.2", + "@rollup/rollup-win32-ia32-msvc": "4.63.2", + "@rollup/rollup-win32-x64-gnu": "4.63.2", + "@rollup/rollup-win32-x64-msvc": "4.63.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serve-handler": { + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz", + "integrity": "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "mime-types": "2.1.18", + "minimatch": "3.1.5", + "path-is-inside": "1.0.2", + "path-to-regexp": "3.3.0", + "range-parser": "1.2.0" + } + }, + "node_modules/serve-handler/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.0.tgz", + "integrity": "sha512-P/W5cz70/cQAuKfY3xwQMWWTV7BvJ0mAQmi+9mBcsVPaBUpd6Ohpa+fECv9rBFrQcig86jAiNBFNWUqnTjr4pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.70.0", + "@typescript-eslint/parser": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/utils": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } + } } diff --git a/package.json b/package.json index 7f56a38b..4e3da6a7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "appwrite", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API", - "version": "27.0.0", + "version": "28.0.0", "license": "BSD-3-Clause", "main": "dist/cjs/sdk.js", "exports": { @@ -45,14 +45,14 @@ "@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-typescript": "12.3.0", "@types/json-bigint": "1.0.4", - "eslint": "10.9.1", + "eslint": "10.10.0", "playwright": "1.56.1", "prettier": "3.9.6", - "rollup": "4.63.1", + "rollup": "4.63.2", "serve-handler": "6.1.7", "tslib": "2.8.1", "typescript": "5.9.3", - "typescript-eslint": "8.69.0" + "typescript-eslint": "8.70.0" }, "overrides": { "brace-expansion": "5.0.9" diff --git a/src/client.ts b/src/client.ts index 20382a6c..89e59bd3 100644 --- a/src/client.ts +++ b/src/client.ts @@ -373,7 +373,6 @@ class Client { bearer: string; locale: string; session: string; - devkey: string; cookie: string; impersonateuserid: string; impersonateuseremail: string; @@ -386,7 +385,6 @@ class Client { bearer: '', locale: '', session: '', - devkey: '', cookie: '', impersonateuserid: '', impersonateuseremail: '', @@ -399,8 +397,8 @@ class Client { 'x-sdk-name': 'Web', 'x-sdk-platform': 'client', 'x-sdk-language': 'web', - 'x-sdk-version': '27.0.0', - 'X-Appwrite-Response-Format': '2.0.0', + 'x-sdk-version': '28.0.0', + 'X-Appwrite-Response-Format': '2.3.0', }; /** @@ -536,20 +534,6 @@ class Client { this.config.session = value; return this; } - /** - * Set DevKey - * - * Your secret dev API key - * - * @param value string - * - * @return {this} - */ - setDevKey(value: string): this { - this.headers['X-Appwrite-Dev-Key'] = value; - this.config.devkey = value; - return this; - } /** * Set Cookie * @@ -978,12 +962,9 @@ class Client { const options: RequestInit = { method, headers, + credentials: 'include', }; - if (headers['X-Appwrite-Dev-Key'] === undefined) { - options.credentials = 'include'; - } - if (method === 'GET') { for (const [key, value] of Object.entries(Client.flatten(params))) { url.searchParams.append(key, value); diff --git a/src/enums/id-token-provider.ts b/src/enums/id-token-provider.ts new file mode 100644 index 00000000..4f99708a --- /dev/null +++ b/src/enums/id-token-provider.ts @@ -0,0 +1,4 @@ +export enum IdTokenProvider { + Apple = 'apple', + Google = 'google', +} diff --git a/src/enums/o-auth-provider.ts b/src/enums/o-auth-provider.ts index 2d838dd4..92a95970 100644 --- a/src/enums/o-auth-provider.ts +++ b/src/enums/o-auth-provider.ts @@ -21,6 +21,7 @@ export enum OAuthProvider { Gitlab = 'gitlab', Google = 'google', Huggingface = 'huggingface', + Kakao = 'kakao', Keycloak = 'keycloak', Kick = 'kick', Linkedin = 'linkedin', @@ -36,6 +37,7 @@ export enum OAuthProvider { Slack = 'slack', Spotify = 'spotify', Stripe = 'stripe', + Tiktok = 'tiktok', Tradeshift = 'tradeshift', TradeshiftBox = 'tradeshiftBox', Twitch = 'twitch', diff --git a/src/index.ts b/src/index.ts index 8956bf18..81ea1225 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ /** * Appwrite Web SDK * - * This SDK targets Appwrite server version 2.0.x as shipped on Appwrite Cloud. + * This SDK targets Appwrite server version 2.3.x as shipped on Appwrite Cloud. * Self-hosted releases can lag behind Cloud — if you run an older self-hosted * build, use a matching older SDK from * [previous releases](https://github.com/appwrite/sdk-for-web/releases) @@ -38,6 +38,7 @@ export { Channel } from './channel'; export { Operator, Condition } from './operator'; export { AuthenticatorType } from './enums/authenticator-type'; export { AuthenticationFactor } from './enums/authentication-factor'; +export { IdTokenProvider } from './enums/id-token-provider'; export { OAuthProvider } from './enums/o-auth-provider'; export { Browser } from './enums/browser'; export { CreditCard } from './enums/credit-card'; diff --git a/src/models.ts b/src/models.ts index 0bdf24d9..dda14b42 100644 --- a/src/models.ts +++ b/src/models.ts @@ -80,20 +80,6 @@ export namespace Models { identities: Identity[]; }; - /** - * Logs List - */ - export type LogList = { - /** - * Total number of logs that matched your query. - */ - total: number; - /** - * List of logs. - */ - logs: Log[]; - }; - /** * Files List */ @@ -370,100 +356,6 @@ export namespace Models { metadata?: object; }; - /** - * Log - */ - export type Log = { - /** - * Event name. - */ - event: string; - /** - * User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user. - */ - userId: string; - /** - * User email of the actor recorded for this log. During impersonation, this is the original impersonator. - */ - userEmail: string; - /** - * User name of the actor recorded for this log. During impersonation, this is the original impersonator. - */ - userName: string; - /** - * API mode when event triggered. - */ - mode: string; - /** - * User type who triggered the audit log. Possible values: user, admin, guest, hidden, keyProject, keyAccount, keyOrganization. - */ - userType: string; - /** - * IP session in use when the session was created. - */ - ip: string; - /** - * Log creation date in ISO 8601 format. - */ - time: string; - /** - * Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json). - */ - osCode: string; - /** - * Operating system name. - */ - osName: string; - /** - * Operating system version. - */ - osVersion: string; - /** - * Client type. - */ - clientType: string; - /** - * Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json). - */ - clientCode: string; - /** - * Client name. - */ - clientName: string; - /** - * Client version. - */ - clientVersion: string; - /** - * Client engine name. - */ - clientEngine: string; - /** - * Client engine name. - */ - clientEngineVersion: string; - /** - * Device name. - */ - deviceName: string; - /** - * Device brand name. - */ - deviceBrand: string; - /** - * Device model name. - */ - deviceModel: string; - /** - * Country two-character ISO 3166-1 alpha code. - */ - countryCode: string; - /** - * Country name. - */ - countryName: string; - }; - /** * User */ @@ -546,6 +438,10 @@ export namespace Models { * Whether the user email is in its canonical form. */ emailIsCanonical?: boolean; + /** + * Whether the password was found in a known data breach the last time it was checked. Null when the password has never been checked. + */ + passwordPwned?: boolean; /** * Phone verification status. */ @@ -862,6 +758,10 @@ export namespace Models { * Identity Provider Refresh Token. */ providerRefreshToken: string; + /** + * Identity Provider ID token (JWT) from the most recent native sign-in. Empty for identities created through the browser OAuth2 flow. + */ + providerIdToken: string; }; /** @@ -1237,7 +1137,7 @@ export namespace Models { */ errors: string; /** - * Resource(function/site) execution duration in seconds. + * Total time the resource(function/site) took to respond, in seconds. */ duration: number; /** diff --git a/src/services/account.ts b/src/services/account.ts index c00bdbdc..72b18fb8 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -4,6 +4,7 @@ import type { Models } from '../models'; import { AuthenticatorType } from '../enums/authenticator-type'; import { AuthenticationFactor } from '../enums/authentication-factor'; +import { IdTokenProvider } from '../enums/id-token-provider'; import { OAuthProvider } from '../enums/o-auth-provider'; export class Account { client: Client; @@ -247,7 +248,7 @@ export class Account { const consentId = params.consentId; - if (typeof consentId === 'undefined') { + if (typeof consentId === 'undefined' || consentId === '') { throw new AppwriteException( 'Missing required parameter: "consentId"', ); @@ -301,7 +302,7 @@ export class Account { const consentId = params.consentId; - if (typeof consentId === 'undefined') { + if (typeof consentId === 'undefined' || consentId === '') { throw new AppwriteException( 'Missing required parameter: "consentId"', ); @@ -380,7 +381,7 @@ export class Account { const queries = params.queries; const total = params.total; - if (typeof consentId === 'undefined') { + if (typeof consentId === 'undefined' || consentId === '') { throw new AppwriteException( 'Missing required parameter: "consentId"', ); @@ -456,12 +457,12 @@ export class Account { const consentId = params.consentId; const tokenId = params.tokenId; - if (typeof consentId === 'undefined') { + if (typeof consentId === 'undefined' || consentId === '') { throw new AppwriteException( 'Missing required parameter: "consentId"', ); } - if (typeof tokenId === 'undefined') { + if (typeof tokenId === 'undefined' || tokenId === '') { throw new AppwriteException( 'Missing required parameter: "tokenId"', ); @@ -527,12 +528,12 @@ export class Account { const consentId = params.consentId; const tokenId = params.tokenId; - if (typeof consentId === 'undefined') { + if (typeof consentId === 'undefined' || consentId === '') { throw new AppwriteException( 'Missing required parameter: "consentId"', ); } - if (typeof tokenId === 'undefined') { + if (typeof tokenId === 'undefined' || tokenId === '') { throw new AppwriteException( 'Missing required parameter: "tokenId"', ); @@ -741,7 +742,7 @@ export class Account { const identityId = params.identityId; - if (typeof identityId === 'undefined') { + if (typeof identityId === 'undefined' || identityId === '') { throw new AppwriteException( 'Missing required parameter: "identityId"', ); @@ -756,6 +757,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -814,72 +816,6 @@ export class Account { return this.client.call('post', uri, apiHeaders, payload); } - /** - * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log. - * - * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset - * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. - * @throws {AppwriteException} - * @returns {Promise} - */ - listLogs(params?: { - queries?: string[]; - total?: boolean; - }): Promise; - /** - * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log. - * - * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset - * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - listLogs(queries?: string[], total?: boolean): Promise; - listLogs( - paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], - ...rest: [boolean?] - ): Promise { - let params: { queries?: string[]; total?: boolean }; - - if ( - (typeof paramsOrFirst === 'undefined' && rest.length === 0) || - (paramsOrFirst && - typeof paramsOrFirst === 'object' && - !Array.isArray(paramsOrFirst)) - ) { - params = (paramsOrFirst || {}) as { - queries?: string[]; - total?: boolean; - }; - } else { - params = { - queries: paramsOrFirst as string[], - total: rest[0] as boolean, - }; - } - - const queries = params.queries; - const total = params.total; - - const apiPath = '/account/logs'; - const payload: Payload = {}; - if (typeof queries !== 'undefined') { - payload['queries'] = queries; - } - if (typeof total !== 'undefined') { - payload['total'] = total; - } - const uri = new URL(this.client.config.endpoint + apiPath); - - const apiHeaders: { [header: string]: string } = { - 'X-Appwrite-Project': this.client.config.project, - accept: 'application/json', - }; - - return this.client.call('get', uri, apiHeaders, payload); - } - /** * Enable or disable MFA on an account. * @@ -1270,6 +1206,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -1325,6 +1262,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -2236,6 +2174,174 @@ export class Account { return this.client.call('put', uri, apiHeaders, payload); } + /** + * Use this endpoint to send a 6-digit password recovery code to the user's email address. Unlike [createRecovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a recovery page. Learn more about how to [complete the recovery process](https://appwrite.io/docs/references/cloud/client-web/account#updateRecoveryOTP). The code sent to the user's email address is valid for 15 minutes. + * + * Enable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing. + * + * + * @param {string} params.email - User email. + * @param {boolean} params.phrase - Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow. + * @throws {AppwriteException} + * @returns {Promise} + */ + createRecoveryOTP(params: { + email: string; + phrase?: boolean; + }): Promise; + /** + * Use this endpoint to send a 6-digit password recovery code to the user's email address. Unlike [createRecovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a recovery page. Learn more about how to [complete the recovery process](https://appwrite.io/docs/references/cloud/client-web/account#updateRecoveryOTP). The code sent to the user's email address is valid for 15 minutes. + * + * Enable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing. + * + * + * @param {string} email - User email. + * @param {boolean} phrase - Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createRecoveryOTP(email: string, phrase?: boolean): Promise; + createRecoveryOTP( + paramsOrFirst: { email: string; phrase?: boolean } | string, + ...rest: [boolean?] + ): Promise { + let params: { email: string; phrase?: boolean }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + email: string; + phrase?: boolean; + }; + } else { + params = { + email: paramsOrFirst as string, + phrase: rest[0] as boolean, + }; + } + + const email = params.email; + const phrase = params.phrase; + + if (typeof email === 'undefined') { + throw new AppwriteException('Missing required parameter: "email"'); + } + const apiPath = '/account/recovery/otp'; + const payload: Payload = {}; + if (typeof email !== 'undefined') { + payload['email'] = email; + } + if (typeof phrase !== 'undefined') { + payload['phrase'] = phrase; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated. + * + * + * @param {string} params.userId - User ID. + * @param {string} params.secret - Valid recovery OTP code. + * @param {string} params.password - New user password. Must be between 8 and 256 chars. + * @throws {AppwriteException} + * @returns {Promise} + */ + updateRecoveryOTP(params: { + userId: string; + secret: string; + password: string; + }): Promise; + /** + * Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated. + * + * + * @param {string} userId - User ID. + * @param {string} secret - Valid recovery OTP code. + * @param {string} password - New user password. Must be between 8 and 256 chars. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateRecoveryOTP( + userId: string, + secret: string, + password: string, + ): Promise; + updateRecoveryOTP( + paramsOrFirst: + { userId: string; secret: string; password: string } | string, + ...rest: [string?, string?] + ): Promise { + let params: { userId: string; secret: string; password: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + secret: string; + password: string; + }; + } else { + params = { + userId: paramsOrFirst as string, + secret: rest[0] as string, + password: rest[1] as string, + }; + } + + const userId = params.userId; + const secret = params.secret; + const password = params.password; + + if (typeof userId === 'undefined') { + throw new AppwriteException('Missing required parameter: "userId"'); + } + if (typeof secret === 'undefined') { + throw new AppwriteException('Missing required parameter: "secret"'); + } + if (typeof password === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "password"', + ); + } + const apiPath = '/account/recovery/otp'; + const payload: Payload = {}; + if (typeof userId !== 'undefined') { + payload['userId'] = userId; + } + if (typeof secret !== 'undefined') { + payload['secret'] = secret; + } + if (typeof password !== 'undefined') { + payload['password'] = password; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('put', uri, apiHeaders, payload); + } + /** * Get the list of active sessions across different devices for the currently logged in user. * @@ -2269,6 +2375,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -2375,6 +2482,169 @@ export class Account { return this.client.call('post', uri, apiHeaders, payload); } + /** + * Allow the user to login to their account using an OpenID Connect ID token obtained natively from the OAuth2 provider, for example via Google Credential Manager on Android or Sign in with Apple on iOS. No browser or redirect is involved: the ID token is verified against the provider's published signing keys and a session is created in a single request. + * + * Native sign-in is switched on per provider with its nativeEnabled setting. It is independent of the browser-based flow's enabled setting, which has no effect on this endpoint. The token's audience must match the provider's configured client ID or one of its native client IDs; tokens issued for any other client ID are rejected. For Sign in with Apple, register your app's bundle ID as a native client ID. For Google, the web client ID used by Credential Manager is usually the configured client ID; add your Android and iOS client IDs as native client IDs if your app requests tokens for them. + * + * Pass the raw nonce used when requesting the ID token so it can be validated against the token's nonce claim. When signing in with Apple, the nonce is required: hash it with SHA-256 before passing it to the Apple SDK, and send the raw value here - Apple tokens requested without a nonce are rejected. For Google the nonce is optional: it is validated whenever the token carries one, and ignored when the provider issued the token without one. Apple only returns the user's name on the first authorization, and never inside the ID token - capture it on the client and pass it via the name parameter. + * + * If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the verified email received from the provider and attach the new session to the existing user. If no matching user is found - the server will create a new user. + * + * This flow does not return provider refresh tokens. You may pass an access token the provider handed your client, along with its lifetime, to store it on the session - but Appwrite cannot renew it once it expires. If your app needs long-lived access to provider APIs, use the browser-based OAuth2 flow instead. + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * + * + * @param {IdTokenProvider} params.provider - OAuth2 provider that issued the ID token. Currently, supported providers are: apple, google. + * @param {string} params.idToken - OpenID Connect ID token (JWT) obtained natively from the provider, for example via Google Credential Manager or Sign in with Apple. + * @param {string} params.nonce - Raw nonce used when requesting the ID token. Required for Apple, and whenever the token carries a nonce claim, which must match it. Ignored when the provider issued the token without a nonce. + * @param {string} params.accessToken - Provider access token to store alongside the session for calling provider APIs. Never used for authentication. + * @param {number} params.accessTokenExpiry - Seconds until the provider access token expires, as reported by the provider. Stored so clients can tell when the stored token goes stale. + * @param {string} params.name - User name. Only used when creating a new user and the ID token has no name claim, such as on the first Sign in with Apple authorization. + * @throws {AppwriteException} + * @returns {Promise} + */ + createIdTokenSession(params: { + provider: IdTokenProvider; + idToken: string; + nonce?: string; + accessToken?: string; + accessTokenExpiry?: number; + name?: string; + }): Promise; + /** + * Allow the user to login to their account using an OpenID Connect ID token obtained natively from the OAuth2 provider, for example via Google Credential Manager on Android or Sign in with Apple on iOS. No browser or redirect is involved: the ID token is verified against the provider's published signing keys and a session is created in a single request. + * + * Native sign-in is switched on per provider with its nativeEnabled setting. It is independent of the browser-based flow's enabled setting, which has no effect on this endpoint. The token's audience must match the provider's configured client ID or one of its native client IDs; tokens issued for any other client ID are rejected. For Sign in with Apple, register your app's bundle ID as a native client ID. For Google, the web client ID used by Credential Manager is usually the configured client ID; add your Android and iOS client IDs as native client IDs if your app requests tokens for them. + * + * Pass the raw nonce used when requesting the ID token so it can be validated against the token's nonce claim. When signing in with Apple, the nonce is required: hash it with SHA-256 before passing it to the Apple SDK, and send the raw value here - Apple tokens requested without a nonce are rejected. For Google the nonce is optional: it is validated whenever the token carries one, and ignored when the provider issued the token without one. Apple only returns the user's name on the first authorization, and never inside the ID token - capture it on the client and pass it via the name parameter. + * + * If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the verified email received from the provider and attach the new session to the existing user. If no matching user is found - the server will create a new user. + * + * This flow does not return provider refresh tokens. You may pass an access token the provider handed your client, along with its lifetime, to store it on the session - but Appwrite cannot renew it once it expires. If your app needs long-lived access to provider APIs, use the browser-based OAuth2 flow instead. + * + * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). + * + * + * @param {IdTokenProvider} provider - OAuth2 provider that issued the ID token. Currently, supported providers are: apple, google. + * @param {string} idToken - OpenID Connect ID token (JWT) obtained natively from the provider, for example via Google Credential Manager or Sign in with Apple. + * @param {string} nonce - Raw nonce used when requesting the ID token. Required for Apple, and whenever the token carries a nonce claim, which must match it. Ignored when the provider issued the token without a nonce. + * @param {string} accessToken - Provider access token to store alongside the session for calling provider APIs. Never used for authentication. + * @param {number} accessTokenExpiry - Seconds until the provider access token expires, as reported by the provider. Stored so clients can tell when the stored token goes stale. + * @param {string} name - User name. Only used when creating a new user and the ID token has no name claim, such as on the first Sign in with Apple authorization. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createIdTokenSession( + provider: IdTokenProvider, + idToken: string, + nonce?: string, + accessToken?: string, + accessTokenExpiry?: number, + name?: string, + ): Promise; + createIdTokenSession( + paramsOrFirst: + | { + provider: IdTokenProvider; + idToken: string; + nonce?: string; + accessToken?: string; + accessTokenExpiry?: number; + name?: string; + } + | IdTokenProvider, + ...rest: [string?, string?, string?, number?, string?] + ): Promise { + let params: { + provider: IdTokenProvider; + idToken: string; + nonce?: string; + accessToken?: string; + accessTokenExpiry?: number; + name?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) && + ('provider' in paramsOrFirst || + 'idToken' in paramsOrFirst || + 'nonce' in paramsOrFirst || + 'accessToken' in paramsOrFirst || + 'accessTokenExpiry' in paramsOrFirst || + 'name' in paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + provider: IdTokenProvider; + idToken: string; + nonce?: string; + accessToken?: string; + accessTokenExpiry?: number; + name?: string; + }; + } else { + params = { + provider: paramsOrFirst as IdTokenProvider, + idToken: rest[0] as string, + nonce: rest[1] as string, + accessToken: rest[2] as string, + accessTokenExpiry: rest[3] as number, + name: rest[4] as string, + }; + } + + const provider = params.provider; + const idToken = params.idToken; + const nonce = params.nonce; + const accessToken = params.accessToken; + const accessTokenExpiry = params.accessTokenExpiry; + const name = params.name; + + if (typeof provider === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "provider"', + ); + } + if (typeof idToken === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "idToken"', + ); + } + const apiPath = '/account/sessions/id-token'; + const payload: Payload = {}; + if (typeof provider !== 'undefined') { + payload['provider'] = provider; + } + if (typeof idToken !== 'undefined') { + payload['idToken'] = idToken; + } + if (typeof nonce !== 'undefined') { + payload['nonce'] = nonce; + } + if (typeof accessToken !== 'undefined') { + payload['accessToken'] = accessToken; + } + if (typeof accessTokenExpiry !== 'undefined') { + payload['accessTokenExpiry'] = accessTokenExpiry; + } + if (typeof name !== 'undefined') { + payload['name'] = name; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + /** * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login. * @@ -2459,7 +2729,7 @@ export class Account { * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * - * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. @@ -2480,7 +2750,7 @@ export class Account { * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * * - * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. @@ -2757,7 +3027,7 @@ export class Account { const sessionId = params.sessionId; - if (typeof sessionId === 'undefined') { + if (typeof sessionId === 'undefined' || sessionId === '') { throw new AppwriteException( 'Missing required parameter: "sessionId"', ); @@ -2813,7 +3083,7 @@ export class Account { const sessionId = params.sessionId; - if (typeof sessionId === 'undefined') { + if (typeof sessionId === 'undefined' || sessionId === '') { throw new AppwriteException( 'Missing required parameter: "sessionId"', ); @@ -2868,7 +3138,7 @@ export class Account { const sessionId = params.sessionId; - if (typeof sessionId === 'undefined') { + if (typeof sessionId === 'undefined' || sessionId === '') { throw new AppwriteException( 'Missing required parameter: "sessionId"', ); @@ -2883,6 +3153,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -2911,7 +3182,7 @@ export class Account { } /** - * Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. + * Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. A session holds one push target per provider, so if one already exists this endpoint updates and returns that target instead of creating a second one, and a device that rotates its token is never notified twice. * * @param {string} params.targetId - Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param {string} params.identifier - The target identifier (token, email, phone etc.) @@ -2925,7 +3196,7 @@ export class Account { providerId?: string; }): Promise; /** - * Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. + * Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. A session holds one push target per provider, so if one already exists this endpoint updates and returns that target instead of creating a second one, and a device that rotates its token is never notified twice. * * @param {string} targetId - Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. * @param {string} identifier - The target identifier (token, email, phone etc.) @@ -3055,7 +3326,7 @@ export class Account { const targetId = params.targetId; const identifier = params.identifier; - if (typeof targetId === 'undefined') { + if (typeof targetId === 'undefined' || targetId === '') { throw new AppwriteException( 'Missing required parameter: "targetId"', ); @@ -3120,7 +3391,7 @@ export class Account { const targetId = params.targetId; - if (typeof targetId === 'undefined') { + if (typeof targetId === 'undefined' || targetId === '') { throw new AppwriteException( 'Missing required parameter: "targetId"', ); @@ -3135,6 +3406,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -3345,9 +3617,11 @@ export class Account { * * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. * + * If there is already an active session, the OAuth2 identity is attached to the logged-in account and that session stays active until the token is exchanged for a new one. + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * - * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. @@ -3365,9 +3639,11 @@ export class Account { * * If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. * + * If there is already an active session, the OAuth2 identity is attached to the logged-in account and that session stays active until the token is exchanged for a new one. + * * A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). * - * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. + * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom. * @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. * @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. @@ -3807,6 +4083,144 @@ export class Account { return this.client.call('put', uri, apiHeaders, payload); } + /** + * Use this endpoint to send a 6-digit verification code to the currently logged in user's email address. Unlike [createEmailVerification](https://appwrite.io/docs/references/cloud/client-web/account#createEmailVerification), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a verification page. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateEmailVerificationOTP). The code sent to the user's email address is valid for 15 minutes. + * + * Enable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing. + * + * + * @param {boolean} params.phrase - Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow. + * @throws {AppwriteException} + * @returns {Promise} + */ + createEmailVerificationOTP(params?: { + phrase?: boolean; + }): Promise; + /** + * Use this endpoint to send a 6-digit verification code to the currently logged in user's email address. Unlike [createEmailVerification](https://appwrite.io/docs/references/cloud/client-web/account#createEmailVerification), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a verification page. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateEmailVerificationOTP). The code sent to the user's email address is valid for 15 minutes. + * + * Enable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing. + * + * + * @param {boolean} phrase - Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createEmailVerificationOTP(phrase?: boolean): Promise; + createEmailVerificationOTP( + paramsOrFirst?: { phrase?: boolean } | boolean, + ): Promise { + let params: { phrase?: boolean }; + + if ( + typeof paramsOrFirst === 'undefined' || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { phrase?: boolean }; + } else { + params = { + phrase: paramsOrFirst as boolean, + }; + } + + const phrase = params.phrase; + + const apiPath = '/account/verifications/email/otp'; + const payload: Payload = {}; + if (typeof phrase !== 'undefined') { + payload['phrase'] = phrase; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Use this endpoint to complete the user email verification process using the 6-digit code that was emailed by [createEmailVerificationOTP](https://appwrite.io/docs/references/cloud/client-web/account#createEmailVerificationOTP). Pass the **userId** of the user being verified along with the **secret** code from the email. If confirmed, this route will return a 200 status code and the code is consumed. + * + * + * @param {string} params.userId - User ID. + * @param {string} params.secret - Valid verification OTP code. + * @throws {AppwriteException} + * @returns {Promise} + */ + updateEmailVerificationOTP(params: { + userId: string; + secret: string; + }): Promise; + /** + * Use this endpoint to complete the user email verification process using the 6-digit code that was emailed by [createEmailVerificationOTP](https://appwrite.io/docs/references/cloud/client-web/account#createEmailVerificationOTP). Pass the **userId** of the user being verified along with the **secret** code from the email. If confirmed, this route will return a 200 status code and the code is consumed. + * + * + * @param {string} userId - User ID. + * @param {string} secret - Valid verification OTP code. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateEmailVerificationOTP( + userId: string, + secret: string, + ): Promise; + updateEmailVerificationOTP( + paramsOrFirst: { userId: string; secret: string } | string, + ...rest: [string?] + ): Promise { + let params: { userId: string; secret: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + userId: string; + secret: string; + }; + } else { + params = { + userId: paramsOrFirst as string, + secret: rest[0] as string, + }; + } + + const userId = params.userId; + const secret = params.secret; + + if (typeof userId === 'undefined') { + throw new AppwriteException('Missing required parameter: "userId"'); + } + if (typeof secret === 'undefined') { + throw new AppwriteException('Missing required parameter: "secret"'); + } + const apiPath = '/account/verifications/email/otp'; + const payload: Payload = {}; + if (typeof userId !== 'undefined') { + payload['userId'] = userId; + } + if (typeof secret !== 'undefined') { + payload['secret'] = secret; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('put', uri, apiHeaders, payload); + } + /** * Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. * diff --git a/src/services/databases.ts b/src/services/databases.ts index 194fa6d2..35c9a4f7 100644 --- a/src/services/databases.ts +++ b/src/services/databases.ts @@ -156,7 +156,7 @@ export class Databases { const transactionId = params.transactionId; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -240,7 +240,7 @@ export class Databases { const commit = params.commit; const rollback = params.rollback; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -304,7 +304,7 @@ export class Databases { const transactionId = params.transactionId; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -319,6 +319,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -376,7 +377,7 @@ export class Databases { const transactionId = params.transactionId; const operations = params.operations; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -498,12 +499,12 @@ export class Databases { const total = params.total; const ttl = params.ttl; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); @@ -660,12 +661,12 @@ export class Databases { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); @@ -797,17 +798,17 @@ export class Databases { const queries = params.queries; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -964,17 +965,17 @@ export class Databases { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1135,17 +1136,17 @@ export class Databases { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1259,17 +1260,17 @@ export class Databases { const documentId = params.documentId; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1294,6 +1295,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -1409,22 +1411,22 @@ export class Databases { const min = params.min; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); } - if (typeof attribute === 'undefined') { + if (typeof attribute === 'undefined' || attribute === '') { throw new AppwriteException( 'Missing required parameter: "attribute"', ); @@ -1569,22 +1571,22 @@ export class Databases { const max = params.max; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); } - if (typeof attribute === 'undefined') { + if (typeof attribute === 'undefined' || attribute === '') { throw new AppwriteException( 'Missing required parameter: "attribute"', ); diff --git a/src/services/documents-db.ts b/src/services/documents-db.ts index 2ed9a441..f30378d6 100644 --- a/src/services/documents-db.ts +++ b/src/services/documents-db.ts @@ -153,7 +153,7 @@ export class DocumentsDB { const transactionId = params.transactionId; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -236,7 +236,7 @@ export class DocumentsDB { const commit = params.commit; const rollback = params.rollback; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -299,7 +299,7 @@ export class DocumentsDB { const transactionId = params.transactionId; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -314,6 +314,7 @@ export class DocumentsDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -370,7 +371,7 @@ export class DocumentsDB { const transactionId = params.transactionId; const operations = params.operations; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -491,12 +492,12 @@ export class DocumentsDB { const total = params.total; const ttl = params.ttl; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); @@ -652,12 +653,12 @@ export class DocumentsDB { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); @@ -779,12 +780,12 @@ export class DocumentsDB { const documents = params.documents; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); @@ -906,17 +907,17 @@ export class DocumentsDB { const queries = params.queries; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1072,17 +1073,17 @@ export class DocumentsDB { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1242,17 +1243,17 @@ export class DocumentsDB { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1365,17 +1366,17 @@ export class DocumentsDB { const documentId = params.documentId; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1400,6 +1401,7 @@ export class DocumentsDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -1514,22 +1516,22 @@ export class DocumentsDB { const min = params.min; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); } - if (typeof attribute === 'undefined') { + if (typeof attribute === 'undefined' || attribute === '') { throw new AppwriteException( 'Missing required parameter: "attribute"', ); @@ -1673,22 +1675,22 @@ export class DocumentsDB { const max = params.max; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); } - if (typeof attribute === 'undefined') { + if (typeof attribute === 'undefined' || attribute === '') { throw new AppwriteException( 'Missing required parameter: "attribute"', ); diff --git a/src/services/functions.ts b/src/services/functions.ts index 41c969df..b9a9264d 100644 --- a/src/services/functions.ts +++ b/src/services/functions.ts @@ -68,7 +68,7 @@ export class Functions { const queries = params.queries; const total = params.total; - if (typeof functionId === 'undefined') { + if (typeof functionId === 'undefined' || functionId === '') { throw new AppwriteException( 'Missing required parameter: "functionId"', ); @@ -204,7 +204,7 @@ export class Functions { const headers = params.headers; const scheduledAt = params.scheduledAt; - if (typeof functionId === 'undefined') { + if (typeof functionId === 'undefined' || functionId === '') { throw new AppwriteException( 'Missing required parameter: "functionId"', ); @@ -293,12 +293,12 @@ export class Functions { const functionId = params.functionId; const executionId = params.executionId; - if (typeof functionId === 'undefined') { + if (typeof functionId === 'undefined' || functionId === '') { throw new AppwriteException( 'Missing required parameter: "functionId"', ); } - if (typeof executionId === 'undefined') { + if (typeof executionId === 'undefined' || executionId === '') { throw new AppwriteException( 'Missing required parameter: "executionId"', ); diff --git a/src/services/messaging.ts b/src/services/messaging.ts index 17e14ab5..d120f1df 100644 --- a/src/services/messaging.ts +++ b/src/services/messaging.ts @@ -67,7 +67,7 @@ export class Messaging { const subscriberId = params.subscriberId; const targetId = params.targetId; - if (typeof topicId === 'undefined') { + if (typeof topicId === 'undefined' || topicId === '') { throw new AppwriteException( 'Missing required parameter: "topicId"', ); @@ -151,12 +151,12 @@ export class Messaging { const topicId = params.topicId; const subscriberId = params.subscriberId; - if (typeof topicId === 'undefined') { + if (typeof topicId === 'undefined' || topicId === '') { throw new AppwriteException( 'Missing required parameter: "topicId"', ); } - if (typeof subscriberId === 'undefined') { + if (typeof subscriberId === 'undefined' || subscriberId === '') { throw new AppwriteException( 'Missing required parameter: "subscriberId"', ); @@ -173,6 +173,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); diff --git a/src/services/organization.ts b/src/services/organization.ts index 214ae071..1ea78383 100644 --- a/src/services/organization.ts +++ b/src/services/organization.ts @@ -188,7 +188,7 @@ export class Organization { const installationId = params.installationId; - if (typeof installationId === 'undefined') { + if (typeof installationId === 'undefined' || installationId === '') { throw new AppwriteException( 'Missing required parameter: "installationId"', ); @@ -259,7 +259,7 @@ export class Organization { const installationId = params.installationId; const authorizationDetails = params.authorizationDetails; - if (typeof installationId === 'undefined') { + if (typeof installationId === 'undefined' || installationId === '') { throw new AppwriteException( 'Missing required parameter: "installationId"', ); @@ -319,7 +319,7 @@ export class Organization { const installationId = params.installationId; - if (typeof installationId === 'undefined') { + if (typeof installationId === 'undefined' || installationId === '') { throw new AppwriteException( 'Missing required parameter: "installationId"', ); diff --git a/src/services/presences.ts b/src/services/presences.ts index e1e91a0c..a612176b 100644 --- a/src/services/presences.ts +++ b/src/services/presences.ts @@ -128,7 +128,7 @@ export class Presences { const presenceId = params.presenceId; - if (typeof presenceId === 'undefined') { + if (typeof presenceId === 'undefined' || presenceId === '') { throw new AppwriteException( 'Missing required parameter: "presenceId"', ); @@ -235,7 +235,7 @@ export class Presences { const expiresAt = params.expiresAt; const metadata = params.metadata; - if (typeof presenceId === 'undefined') { + if (typeof presenceId === 'undefined' || presenceId === '') { throw new AppwriteException( 'Missing required parameter: "presenceId"', ); @@ -367,7 +367,7 @@ export class Presences { const permissions = params.permissions; const purge = params.purge; - if (typeof presenceId === 'undefined') { + if (typeof presenceId === 'undefined' || presenceId === '') { throw new AppwriteException( 'Missing required parameter: "presenceId"', ); @@ -439,7 +439,7 @@ export class Presences { const presenceId = params.presenceId; - if (typeof presenceId === 'undefined') { + if (typeof presenceId === 'undefined' || presenceId === '') { throw new AppwriteException( 'Missing required parameter: "presenceId"', ); @@ -454,6 +454,7 @@ export class Presences { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); diff --git a/src/services/storage.ts b/src/services/storage.ts index 7c9a0a0f..5fd39113 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -92,7 +92,7 @@ export class Storage { const search = params.search; const total = params.total; - if (typeof bucketId === 'undefined') { + if (typeof bucketId === 'undefined' || bucketId === '') { throw new AppwriteException( 'Missing required parameter: "bucketId"', ); @@ -234,7 +234,7 @@ export class Storage { const permissions = params.permissions; const folder = params.folder; - if (typeof bucketId === 'undefined') { + if (typeof bucketId === 'undefined' || bucketId === '') { throw new AppwriteException( 'Missing required parameter: "bucketId"', ); @@ -323,12 +323,12 @@ export class Storage { const bucketId = params.bucketId; const fileId = params.fileId; - if (typeof bucketId === 'undefined') { + if (typeof bucketId === 'undefined' || bucketId === '') { throw new AppwriteException( 'Missing required parameter: "bucketId"', ); } - if (typeof fileId === 'undefined') { + if (typeof fileId === 'undefined' || fileId === '') { throw new AppwriteException('Missing required parameter: "fileId"'); } const apiPath = '/storage/buckets/{bucketId}/files/{fileId}' @@ -421,12 +421,12 @@ export class Storage { const name = params.name; const permissions = params.permissions; - if (typeof bucketId === 'undefined') { + if (typeof bucketId === 'undefined' || bucketId === '') { throw new AppwriteException( 'Missing required parameter: "bucketId"', ); } - if (typeof fileId === 'undefined') { + if (typeof fileId === 'undefined' || fileId === '') { throw new AppwriteException('Missing required parameter: "fileId"'); } const apiPath = '/storage/buckets/{bucketId}/files/{fileId}' @@ -494,12 +494,12 @@ export class Storage { const bucketId = params.bucketId; const fileId = params.fileId; - if (typeof bucketId === 'undefined') { + if (typeof bucketId === 'undefined' || bucketId === '') { throw new AppwriteException( 'Missing required parameter: "bucketId"', ); } - if (typeof fileId === 'undefined') { + if (typeof fileId === 'undefined' || fileId === '') { throw new AppwriteException('Missing required parameter: "fileId"'); } const apiPath = '/storage/buckets/{bucketId}/files/{fileId}' @@ -511,6 +511,7 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -570,12 +571,12 @@ export class Storage { const fileId = params.fileId; const token = params.token; - if (typeof bucketId === 'undefined') { + if (typeof bucketId === 'undefined' || bucketId === '') { throw new AppwriteException( 'Missing required parameter: "bucketId"', ); } - if (typeof fileId === 'undefined') { + if (typeof fileId === 'undefined' || fileId === '') { throw new AppwriteException('Missing required parameter: "fileId"'); } const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download' @@ -777,12 +778,12 @@ export class Storage { const output = params.output; const token = params.token; - if (typeof bucketId === 'undefined') { + if (typeof bucketId === 'undefined' || bucketId === '') { throw new AppwriteException( 'Missing required parameter: "bucketId"', ); } - if (typeof fileId === 'undefined') { + if (typeof fileId === 'undefined' || fileId === '') { throw new AppwriteException('Missing required parameter: "fileId"'); } const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview' @@ -891,12 +892,12 @@ export class Storage { const fileId = params.fileId; const token = params.token; - if (typeof bucketId === 'undefined') { + if (typeof bucketId === 'undefined' || bucketId === '') { throw new AppwriteException( 'Missing required parameter: "bucketId"', ); } - if (typeof fileId === 'undefined') { + if (typeof fileId === 'undefined' || fileId === '') { throw new AppwriteException('Missing required parameter: "fileId"'); } const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view' diff --git a/src/services/tables-db.ts b/src/services/tables-db.ts index aa8a8b50..3a3d1fc7 100644 --- a/src/services/tables-db.ts +++ b/src/services/tables-db.ts @@ -153,7 +153,7 @@ export class TablesDB { const transactionId = params.transactionId; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -236,7 +236,7 @@ export class TablesDB { const commit = params.commit; const rollback = params.rollback; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -299,7 +299,7 @@ export class TablesDB { const transactionId = params.transactionId; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -314,6 +314,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -370,7 +371,7 @@ export class TablesDB { const transactionId = params.transactionId; const operations = params.operations; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -489,12 +490,12 @@ export class TablesDB { const total = params.total; const ttl = params.ttl; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof tableId === 'undefined') { + if (typeof tableId === 'undefined' || tableId === '') { throw new AppwriteException( 'Missing required parameter: "tableId"', ); @@ -639,12 +640,12 @@ export class TablesDB { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof tableId === 'undefined') { + if (typeof tableId === 'undefined' || tableId === '') { throw new AppwriteException( 'Missing required parameter: "tableId"', ); @@ -767,17 +768,17 @@ export class TablesDB { const queries = params.queries; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof tableId === 'undefined') { + if (typeof tableId === 'undefined' || tableId === '') { throw new AppwriteException( 'Missing required parameter: "tableId"', ); } - if (typeof rowId === 'undefined') { + if (typeof rowId === 'undefined' || rowId === '') { throw new AppwriteException('Missing required parameter: "rowId"'); } const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}' @@ -918,17 +919,17 @@ export class TablesDB { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof tableId === 'undefined') { + if (typeof tableId === 'undefined' || tableId === '') { throw new AppwriteException( 'Missing required parameter: "tableId"', ); } - if (typeof rowId === 'undefined') { + if (typeof rowId === 'undefined' || rowId === '') { throw new AppwriteException('Missing required parameter: "rowId"'); } const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}' @@ -1073,17 +1074,17 @@ export class TablesDB { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof tableId === 'undefined') { + if (typeof tableId === 'undefined' || tableId === '') { throw new AppwriteException( 'Missing required parameter: "tableId"', ); } - if (typeof rowId === 'undefined') { + if (typeof rowId === 'undefined' || rowId === '') { throw new AppwriteException('Missing required parameter: "rowId"'); } const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}' @@ -1187,17 +1188,17 @@ export class TablesDB { const rowId = params.rowId; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof tableId === 'undefined') { + if (typeof tableId === 'undefined' || tableId === '') { throw new AppwriteException( 'Missing required parameter: "tableId"', ); } - if (typeof rowId === 'undefined') { + if (typeof rowId === 'undefined' || rowId === '') { throw new AppwriteException('Missing required parameter: "rowId"'); } const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}' @@ -1213,6 +1214,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -1321,20 +1323,20 @@ export class TablesDB { const min = params.min; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof tableId === 'undefined') { + if (typeof tableId === 'undefined' || tableId === '') { throw new AppwriteException( 'Missing required parameter: "tableId"', ); } - if (typeof rowId === 'undefined') { + if (typeof rowId === 'undefined' || rowId === '') { throw new AppwriteException('Missing required parameter: "rowId"'); } - if (typeof column === 'undefined') { + if (typeof column === 'undefined' || column === '') { throw new AppwriteException('Missing required parameter: "column"'); } const apiPath = @@ -1467,20 +1469,20 @@ export class TablesDB { const max = params.max; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof tableId === 'undefined') { + if (typeof tableId === 'undefined' || tableId === '') { throw new AppwriteException( 'Missing required parameter: "tableId"', ); } - if (typeof rowId === 'undefined') { + if (typeof rowId === 'undefined' || rowId === '') { throw new AppwriteException('Missing required parameter: "rowId"'); } - if (typeof column === 'undefined') { + if (typeof column === 'undefined' || column === '') { throw new AppwriteException('Missing required parameter: "column"'); } const apiPath = diff --git a/src/services/teams.ts b/src/services/teams.ts index c44b6f52..54aacf19 100644 --- a/src/services/teams.ts +++ b/src/services/teams.ts @@ -218,7 +218,7 @@ export class Teams { const teamId = params.teamId; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } const apiPath = '/teams/{teamId}'.replace( @@ -286,7 +286,7 @@ export class Teams { const teamId = params.teamId; const name = params.name; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } if (typeof name === 'undefined') { @@ -345,7 +345,7 @@ export class Teams { const teamId = params.teamId; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } const apiPath = '/teams/{teamId}'.replace( @@ -358,6 +358,7 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -421,7 +422,7 @@ export class Teams { const queries = params.queries; const total = params.total; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } const apiPath = '/teams/{teamId}/installations'.replace( @@ -508,7 +509,7 @@ export class Teams { const appId = params.appId; const authorizationDetails = params.authorizationDetails; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } if (typeof appId === 'undefined') { @@ -586,10 +587,10 @@ export class Teams { const teamId = params.teamId; const installationId = params.installationId; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } - if (typeof installationId === 'undefined') { + if (typeof installationId === 'undefined' || installationId === '') { throw new AppwriteException( 'Missing required parameter: "installationId"', ); @@ -678,10 +679,10 @@ export class Teams { const installationId = params.installationId; const authorizationDetails = params.authorizationDetails; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } - if (typeof installationId === 'undefined') { + if (typeof installationId === 'undefined' || installationId === '') { throw new AppwriteException( 'Missing required parameter: "installationId"', ); @@ -754,10 +755,10 @@ export class Teams { const teamId = params.teamId; const installationId = params.installationId; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } - if (typeof installationId === 'undefined') { + if (typeof installationId === 'undefined' || installationId === '') { throw new AppwriteException( 'Missing required parameter: "installationId"', ); @@ -856,7 +857,7 @@ export class Teams { const search = params.search; const total = params.total; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } const apiPath = '/teams/{teamId}/memberships'.replace( @@ -1000,7 +1001,7 @@ export class Teams { const url = params.url; const name = params.name; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } if (typeof roles === 'undefined') { @@ -1090,10 +1091,10 @@ export class Teams { const teamId = params.teamId; const membershipId = params.membershipId; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } - if (typeof membershipId === 'undefined') { + if (typeof membershipId === 'undefined' || membershipId === '') { throw new AppwriteException( 'Missing required parameter: "membershipId"', ); @@ -1175,10 +1176,10 @@ export class Teams { const membershipId = params.membershipId; const roles = params.roles; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } - if (typeof membershipId === 'undefined') { + if (typeof membershipId === 'undefined' || membershipId === '') { throw new AppwriteException( 'Missing required parameter: "membershipId"', ); @@ -1254,10 +1255,10 @@ export class Teams { const teamId = params.teamId; const membershipId = params.membershipId; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } - if (typeof membershipId === 'undefined') { + if (typeof membershipId === 'undefined' || membershipId === '') { throw new AppwriteException( 'Missing required parameter: "membershipId"', ); @@ -1274,6 +1275,7 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -1361,10 +1363,10 @@ export class Teams { const userId = params.userId; const secret = params.secret; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } - if (typeof membershipId === 'undefined') { + if (typeof membershipId === 'undefined' || membershipId === '') { throw new AppwriteException( 'Missing required parameter: "membershipId"', ); @@ -1439,7 +1441,7 @@ export class Teams { const teamId = params.teamId; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } const apiPath = '/teams/{teamId}/prefs'.replace( @@ -1504,7 +1506,7 @@ export class Teams { const teamId = params.teamId; const prefs = params.prefs; - if (typeof teamId === 'undefined') { + if (typeof teamId === 'undefined' || teamId === '') { throw new AppwriteException('Missing required parameter: "teamId"'); } if (typeof prefs === 'undefined') { diff --git a/src/services/vectors-db.ts b/src/services/vectors-db.ts index 083d7ce9..67200334 100644 --- a/src/services/vectors-db.ts +++ b/src/services/vectors-db.ts @@ -153,7 +153,7 @@ export class VectorsDB { const transactionId = params.transactionId; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -236,7 +236,7 @@ export class VectorsDB { const commit = params.commit; const rollback = params.rollback; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -299,7 +299,7 @@ export class VectorsDB { const transactionId = params.transactionId; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -314,6 +314,7 @@ export class VectorsDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); @@ -370,7 +371,7 @@ export class VectorsDB { const transactionId = params.transactionId; const operations = params.operations; - if (typeof transactionId === 'undefined') { + if (typeof transactionId === 'undefined' || transactionId === '') { throw new AppwriteException( 'Missing required parameter: "transactionId"', ); @@ -491,12 +492,12 @@ export class VectorsDB { const total = params.total; const ttl = params.ttl; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); @@ -652,12 +653,12 @@ export class VectorsDB { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); @@ -799,12 +800,12 @@ export class VectorsDB { const total = params.total; const ttl = params.ttl; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); @@ -927,17 +928,17 @@ export class VectorsDB { const queries = params.queries; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1093,17 +1094,17 @@ export class VectorsDB { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1263,17 +1264,17 @@ export class VectorsDB { const permissions = params.permissions; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1386,17 +1387,17 @@ export class VectorsDB { const documentId = params.documentId; const transactionId = params.transactionId; - if (typeof databaseId === 'undefined') { + if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', ); } - if (typeof collectionId === 'undefined') { + if (typeof collectionId === 'undefined' || collectionId === '') { throw new AppwriteException( 'Missing required parameter: "collectionId"', ); } - if (typeof documentId === 'undefined') { + if (typeof documentId === 'undefined' || documentId === '') { throw new AppwriteException( 'Missing required parameter: "documentId"', ); @@ -1421,6 +1422,7 @@ export class VectorsDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + accept: 'application/json', }; return this.client.call('delete', uri, apiHeaders, payload); From 62fd3433b898a94bf5082e552c558480efcfd3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 25 Sep 2026 12:16:37 +0200 Subject: [PATCH 7/8] chore: update Web SDK to 28.1.0 --- CHANGELOG.md | 6 + README.md | 2 +- .../apps/create-installation-token.md | 16 + docs/examples/apps/create-key.md | 15 + docs/examples/apps/create-secret.md | 15 + docs/examples/apps/create.md | 33 + docs/examples/apps/delete-installation.md | 16 + docs/examples/apps/delete-key.md | 16 + docs/examples/apps/delete-secret.md | 16 + docs/examples/apps/delete-tokens.md | 15 + docs/examples/apps/delete.md | 15 + docs/examples/apps/get-installation.md | 16 + docs/examples/apps/get-key.md | 16 + docs/examples/apps/get-secret.md | 16 + docs/examples/apps/get.md | 15 + .../examples/apps/list-installation-scopes.md | 13 + docs/examples/apps/list-installations.md | 17 + docs/examples/apps/list-keys.md | 17 + docs/examples/apps/list-o-auth-2-scopes.md | 13 + docs/examples/apps/list-secrets.md | 17 + docs/examples/apps/list.md | 16 + docs/examples/apps/update-team.md | 16 + docs/examples/apps/update.md | 34 + docs/examples/oauth2/approve.md | 17 + docs/examples/oauth2/authorize-post.md | 28 + docs/examples/oauth2/authorize.md | 28 + .../oauth2/create-device-authorization.md | 19 + docs/examples/oauth2/create-grant.md | 15 + docs/examples/oauth2/create-par.md | 27 + docs/examples/oauth2/create-token.md | 24 + docs/examples/oauth2/get-grant.md | 15 + docs/examples/oauth2/list-organizations.md | 17 + docs/examples/oauth2/list-projects.md | 17 + docs/examples/oauth2/logout-post.md | 20 + docs/examples/oauth2/logout.md | 20 + docs/examples/oauth2/reject.md | 15 + docs/examples/oauth2/revoke.md | 18 + package-lock.json | 4499 +++++++++-------- package.json | 2 +- src/client.ts | 2 +- src/index.ts | 2 + src/models.ts | 540 ++ src/services/apps.ts | 1807 +++++++ src/services/oauth-2.ts | 1822 +++++++ 44 files changed, 7079 insertions(+), 2246 deletions(-) create mode 100644 docs/examples/apps/create-installation-token.md create mode 100644 docs/examples/apps/create-key.md create mode 100644 docs/examples/apps/create-secret.md create mode 100644 docs/examples/apps/create.md create mode 100644 docs/examples/apps/delete-installation.md create mode 100644 docs/examples/apps/delete-key.md create mode 100644 docs/examples/apps/delete-secret.md create mode 100644 docs/examples/apps/delete-tokens.md create mode 100644 docs/examples/apps/delete.md create mode 100644 docs/examples/apps/get-installation.md create mode 100644 docs/examples/apps/get-key.md create mode 100644 docs/examples/apps/get-secret.md create mode 100644 docs/examples/apps/get.md create mode 100644 docs/examples/apps/list-installation-scopes.md create mode 100644 docs/examples/apps/list-installations.md create mode 100644 docs/examples/apps/list-keys.md create mode 100644 docs/examples/apps/list-o-auth-2-scopes.md create mode 100644 docs/examples/apps/list-secrets.md create mode 100644 docs/examples/apps/list.md create mode 100644 docs/examples/apps/update-team.md create mode 100644 docs/examples/apps/update.md create mode 100644 docs/examples/oauth2/approve.md create mode 100644 docs/examples/oauth2/authorize-post.md create mode 100644 docs/examples/oauth2/authorize.md create mode 100644 docs/examples/oauth2/create-device-authorization.md create mode 100644 docs/examples/oauth2/create-grant.md create mode 100644 docs/examples/oauth2/create-par.md create mode 100644 docs/examples/oauth2/create-token.md create mode 100644 docs/examples/oauth2/get-grant.md create mode 100644 docs/examples/oauth2/list-organizations.md create mode 100644 docs/examples/oauth2/list-projects.md create mode 100644 docs/examples/oauth2/logout-post.md create mode 100644 docs/examples/oauth2/logout.md create mode 100644 docs/examples/oauth2/reject.md create mode 100644 docs/examples/oauth2/revoke.md create mode 100644 src/services/apps.ts create mode 100644 src/services/oauth-2.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 588ec87b..a2825657 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 28.1.0 + +* Added: `Apps` service to create and manage OAuth2 apps, their secrets, keys, and installations +* Added: `Oauth2` service for authorization, consent, device, PAR, and token flows +* Added: `App`, `AppSecret`, `AppKey`, `AppScope` and `Oauth2*` response models + ## 28.0.0 * Breaking: removed `Account.listLogs` and the `Log`, `LogList` models diff --git a/README.md b/README.md index bee9ad21..a9d1bd4a 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ import { Client, Account } from 'appwrite'; To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: ```html - + ``` ## Getting Started diff --git a/docs/examples/apps/create-installation-token.md b/docs/examples/apps/create-installation-token.md new file mode 100644 index 00000000..fc90377c --- /dev/null +++ b/docs/examples/apps/create-installation-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.createInstallationToken({ + appId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/create-key.md b/docs/examples/apps/create-key.md new file mode 100644 index 00000000..f7e92c4c --- /dev/null +++ b/docs/examples/apps/create-key.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.createKey({ + appId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/create-secret.md b/docs/examples/apps/create-secret.md new file mode 100644 index 00000000..76a2c717 --- /dev/null +++ b/docs/examples/apps/create-secret.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.createSecret({ + appId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/create.md b/docs/examples/apps/create.md new file mode 100644 index 00000000..948940ac --- /dev/null +++ b/docs/examples/apps/create.md @@ -0,0 +1,33 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.create({ + appId: '', + name: '', + redirectUris: [], + description: '', // optional + clientUri: 'https://example.com', // optional + logoUri: 'https://example.com', // optional + privacyPolicyUrl: 'https://example.com', // optional + termsUrl: 'https://example.com', // optional + contacts: [], // optional + tagline: '', // optional + tags: [], // optional + images: [], // optional + supportUrl: 'https://example.com', // optional + dataDeletionUrl: 'https://example.com', // optional + postLogoutRedirectUris: [], // optional + enabled: false, // optional + type: 'public', // optional + deviceFlow: false, // optional + teamId: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/apps/delete-installation.md b/docs/examples/apps/delete-installation.md new file mode 100644 index 00000000..813de0a6 --- /dev/null +++ b/docs/examples/apps/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.deleteInstallation({ + appId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/delete-key.md b/docs/examples/apps/delete-key.md new file mode 100644 index 00000000..a0e06cfb --- /dev/null +++ b/docs/examples/apps/delete-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.deleteKey({ + appId: '', + keyId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/delete-secret.md b/docs/examples/apps/delete-secret.md new file mode 100644 index 00000000..3a827edb --- /dev/null +++ b/docs/examples/apps/delete-secret.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.deleteSecret({ + appId: '', + secretId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/delete-tokens.md b/docs/examples/apps/delete-tokens.md new file mode 100644 index 00000000..9fe9f7ce --- /dev/null +++ b/docs/examples/apps/delete-tokens.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.deleteTokens({ + appId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/delete.md b/docs/examples/apps/delete.md new file mode 100644 index 00000000..ea0e7e38 --- /dev/null +++ b/docs/examples/apps/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.delete({ + appId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/get-installation.md b/docs/examples/apps/get-installation.md new file mode 100644 index 00000000..1ef3ab90 --- /dev/null +++ b/docs/examples/apps/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.getInstallation({ + appId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/get-key.md b/docs/examples/apps/get-key.md new file mode 100644 index 00000000..43d45749 --- /dev/null +++ b/docs/examples/apps/get-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.getKey({ + appId: '', + keyId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/get-secret.md b/docs/examples/apps/get-secret.md new file mode 100644 index 00000000..f5fea62f --- /dev/null +++ b/docs/examples/apps/get-secret.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.getSecret({ + appId: '', + secretId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/get.md b/docs/examples/apps/get.md new file mode 100644 index 00000000..2c0f2eff --- /dev/null +++ b/docs/examples/apps/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.get({ + appId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/list-installation-scopes.md b/docs/examples/apps/list-installation-scopes.md new file mode 100644 index 00000000..5230dfb0 --- /dev/null +++ b/docs/examples/apps/list-installation-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.listInstallationScopes(); + +console.log(result); +``` diff --git a/docs/examples/apps/list-installations.md b/docs/examples/apps/list-installations.md new file mode 100644 index 00000000..3c3317f1 --- /dev/null +++ b/docs/examples/apps/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.listInstallations({ + appId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/apps/list-keys.md b/docs/examples/apps/list-keys.md new file mode 100644 index 00000000..8598aa92 --- /dev/null +++ b/docs/examples/apps/list-keys.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.listKeys({ + appId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/apps/list-o-auth-2-scopes.md b/docs/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 00000000..4026247c --- /dev/null +++ b/docs/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.listOAuth2Scopes(); + +console.log(result); +``` diff --git a/docs/examples/apps/list-secrets.md b/docs/examples/apps/list-secrets.md new file mode 100644 index 00000000..a839d9c6 --- /dev/null +++ b/docs/examples/apps/list-secrets.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.listSecrets({ + appId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/apps/list.md b/docs/examples/apps/list.md new file mode 100644 index 00000000..dbac28fd --- /dev/null +++ b/docs/examples/apps/list.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.list({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/docs/examples/apps/update-team.md b/docs/examples/apps/update-team.md new file mode 100644 index 00000000..e1eac207 --- /dev/null +++ b/docs/examples/apps/update-team.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.updateTeam({ + appId: '', + teamId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/apps/update.md b/docs/examples/apps/update.md new file mode 100644 index 00000000..d9fbd53e --- /dev/null +++ b/docs/examples/apps/update.md @@ -0,0 +1,34 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.update({ + appId: '', + name: '', + description: '', // optional + clientUri: 'https://example.com', // optional + logoUri: 'https://example.com', // optional + privacyPolicyUrl: 'https://example.com', // optional + termsUrl: 'https://example.com', // optional + contacts: [], // optional + tagline: '', // optional + tags: [], // optional + images: [], // optional + supportUrl: 'https://example.com', // optional + dataDeletionUrl: 'https://example.com', // optional + enabled: false, // optional + redirectUris: [], // optional + postLogoutRedirectUris: [], // optional + type: 'public', // optional + deviceFlow: false, // optional + installationScopes: [], // optional + installationRedirectUrl: 'https://example.com', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/approve.md b/docs/examples/oauth2/approve.md new file mode 100644 index 00000000..ee6da4a3 --- /dev/null +++ b/docs/examples/oauth2/approve.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.approve({ + grantId: '', + authorizationDetails: '', // optional + scope: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/authorize-post.md b/docs/examples/oauth2/authorize-post.md new file mode 100644 index 00000000..7664d105 --- /dev/null +++ b/docs/examples/oauth2/authorize-post.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.authorizePost({ + clientId: '', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '', // optional + state: '', // optional + nonce: '', // optional + codeChallenge: '', // optional + codeChallengeMethod: 's256', // optional + prompt: '', // optional + maxAge: 0, // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '', // optional + requestUri: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/authorize.md b/docs/examples/oauth2/authorize.md new file mode 100644 index 00000000..495fd11e --- /dev/null +++ b/docs/examples/oauth2/authorize.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.authorize({ + clientId: '', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '', // optional + state: '', // optional + nonce: '', // optional + codeChallenge: '', // optional + codeChallengeMethod: 's256', // optional + prompt: '', // optional + maxAge: 0, // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '', // optional + requestUri: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/create-device-authorization.md b/docs/examples/oauth2/create-device-authorization.md new file mode 100644 index 00000000..56c0236b --- /dev/null +++ b/docs/examples/oauth2/create-device-authorization.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.createDeviceAuthorization({ + clientId: '', // optional + scope: '', // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/create-grant.md b/docs/examples/oauth2/create-grant.md new file mode 100644 index 00000000..cd5e693a --- /dev/null +++ b/docs/examples/oauth2/create-grant.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.createGrant({ + userCode: '', +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/create-par.md b/docs/examples/oauth2/create-par.md new file mode 100644 index 00000000..c345b2c0 --- /dev/null +++ b/docs/examples/oauth2/create-par.md @@ -0,0 +1,27 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.createPAR({ + clientId: '', + redirectUri: 'https://example.com', + responseType: 'code', + scope: '', // optional + state: '', // optional + nonce: '', // optional + codeChallenge: '', // optional + codeChallengeMethod: 's256', // optional + prompt: '', // optional + maxAge: 0, // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/create-token.md b/docs/examples/oauth2/create-token.md new file mode 100644 index 00000000..0a2a3c71 --- /dev/null +++ b/docs/examples/oauth2/create-token.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.createToken({ + grantType: '', + code: '', // optional + refreshToken: '', // optional + deviceCode: '', // optional + clientId: '', // optional + clientSecret: '', // optional + codeVerifier: '', // optional + redirectUri: 'https://example.com', // optional + resource: '', // optional + audience: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/get-grant.md b/docs/examples/oauth2/get-grant.md new file mode 100644 index 00000000..43c159fc --- /dev/null +++ b/docs/examples/oauth2/get-grant.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.getGrant({ + grantId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/list-organizations.md b/docs/examples/oauth2/list-organizations.md new file mode 100644 index 00000000..2efdecf7 --- /dev/null +++ b/docs/examples/oauth2/list-organizations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.listOrganizations({ + limit: 1, // optional + offset: 0, // optional + search: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/list-projects.md b/docs/examples/oauth2/list-projects.md new file mode 100644 index 00000000..bf7ed6ae --- /dev/null +++ b/docs/examples/oauth2/list-projects.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.listProjects({ + limit: 1, // optional + offset: 0, // optional + search: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/logout-post.md b/docs/examples/oauth2/logout-post.md new file mode 100644 index 00000000..9f19e4b9 --- /dev/null +++ b/docs/examples/oauth2/logout-post.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.logoutPost({ + idTokenHint: '', // optional + logoutHint: '', // optional + clientId: '', // optional + postLogoutRedirectUri: 'https://example.com', // optional + state: '', // optional + uiLocales: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/logout.md b/docs/examples/oauth2/logout.md new file mode 100644 index 00000000..df14c7a6 --- /dev/null +++ b/docs/examples/oauth2/logout.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.logout({ + idTokenHint: '', // optional + logoutHint: '', // optional + clientId: '', // optional + postLogoutRedirectUri: 'https://example.com', // optional + state: '', // optional + uiLocales: '', // optional +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/reject.md b/docs/examples/oauth2/reject.md new file mode 100644 index 00000000..fe6f8698 --- /dev/null +++ b/docs/examples/oauth2/reject.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.reject({ + grantId: '', +}); + +console.log(result); +``` diff --git a/docs/examples/oauth2/revoke.md b/docs/examples/oauth2/revoke.md new file mode 100644 index 00000000..1998f5e8 --- /dev/null +++ b/docs/examples/oauth2/revoke.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.revoke({ + token: '', + tokenTypeHint: 'access_token', // optional + clientId: '', // optional + clientSecret: '', // optional +}); + +console.log(result); +``` diff --git a/package-lock.json b/package-lock.json index 632c6972..4e6fc056 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,2247 +1,2260 @@ { - "name": "appwrite", - "version": "28.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "appwrite", - "version": "28.0.0", - "license": "BSD-3-Clause", - "dependencies": { - "json-bigint": "1.0.0" - }, - "devDependencies": { - "@eslint/js": "10.0.1", - "@rollup/plugin-commonjs": "29.0.3", - "@rollup/plugin-node-resolve": "16.0.3", - "@rollup/plugin-typescript": "12.3.0", - "@types/json-bigint": "1.0.4", - "eslint": "10.10.0", - "playwright": "1.56.1", - "prettier": "3.9.6", - "rollup": "4.63.2", - "serve-handler": "6.1.7", - "tslib": "2.8.1", - "typescript": "5.9.3", - "typescript-eslint": "8.70.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@cacheable/memory": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@cacheable/memory/-/memory-2.2.0.tgz", - "integrity": "sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cacheable/utils": "^2.5.0", - "@keyv/bigmap": "^1.3.1", - "hookified": "^1.15.1", - "keyv": "^5.6.0" - } - }, - "node_modules/@cacheable/utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.5.0.tgz", - "integrity": "sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hashery": "^1.5.1", - "keyv": "^5.6.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", - "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", - "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^3.0.5", - "debug": "^4.3.1", - "minimatch": "^10.2.4" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", - "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", - "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/js": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", - "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "eslint": "^10.0.0" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/@eslint/object-schema": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", - "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz", - "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1", - "levn": "^0.4.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", - "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/types": "^0.15.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.8", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", - "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.2", - "@humanfs/types": "^0.15.0", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/types": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", - "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@keyv/bigmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.3.1.tgz", - "integrity": "sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "hashery": "^1.4.0", - "hookified": "^1.15.0" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "keyv": "^5.6.0" - } - }, - "node_modules/@keyv/serialize": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz", - "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@napi-rs/lzma-linux-x64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", - "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^22.20 || ^24.12 || >=25" - } - }, - "node_modules/@rollup/plugin-commonjs": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz", - "integrity": "sha512-ZaOxZceP7SOUW7Lqw5IRVweSQYWaeIPnXIGLiB690EBA3FGJTO40EEr2L5yZplJWsgTCogILRSpcAe7+U0Otdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "commondir": "^1.0.1", - "estree-walker": "^2.0.2", - "fdir": "^6.2.0", - "is-reference": "1.2.1", - "magic-string": "^0.30.3", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=16.0.0 || 14 >= 14.17" - }, - "peerDependencies": { - "rollup": "^2.68.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", - "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-typescript": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz", - "integrity": "sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.1.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.14.0||^3.0.0||^4.0.0", - "tslib": "*", - "typescript": ">=3.7.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - }, - "tslib": { - "optional": true - } - } - }, - "node_modules/@rollup/pluginutils": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz", - "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.2.tgz", - "integrity": "sha512-Xa6RDoWa+hNiX6PgsljlH6W75RaONx3y6PVlbLhkEWW+GaPQ3dP5gwbL/erAzQHWwkvW5UxdD5l87Qx2FAQ/4A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.2.tgz", - "integrity": "sha512-vNASxsghMfQ5s+v3PrpnJd+ryL/26lxCCaGI+sDJ7VzmHiYXIrrVltsDhaawxLM1WcoMU2oYlbPHLaYQtBzhcg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.2.tgz", - "integrity": "sha512-0dWDjmlrpZAgjPD/aPzUDhBW8APLRjAni5bOrM76wiiZm+E+KTMVKNhAzaTBohz8UyO2fKNAl0+fygbe2HZXOA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.2.tgz", - "integrity": "sha512-N58uktcwzk3+qT4KHEuNdIxX1N01RWrkfVoml69EAbSaNDL+sbNVLx2RMl4Qd23lpA0fgPvyh5hHb4weD5WKmg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.2.tgz", - "integrity": "sha512-HWF2zH8EAp2scWRpt2PGe6iUGz7zi04waXsdRr3zb4DWCk2ImIo5FZu0jjmD53nP/DGSvnW0e7/1ToCNZs2lZw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.2.tgz", - "integrity": "sha512-MkvcwHMnzPSMOQEwB6wHnLzmc+hT8BGc5bW/Mhmjjgx3wbj6VBnlc47XsK74kD0K9MikFfXpQqyz4NUXaUW62A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.2.tgz", - "integrity": "sha512-xe1bCKPJaKsD0tfd7Rb6bGfUogJTpKbTEEthsfdb7hTfTRNJVQTdirabQx0o6ERVba/smkM720soMY+0QnrlSQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.2.tgz", - "integrity": "sha512-yOM7LdK0p6gk6+Q773OEwtlsikT1TL3yMmYsTtRlDRPha5vV2DC5x7LqRWDr6f3cSYNMKVqxzffXv8ivxNBIFQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.2.tgz", - "integrity": "sha512-qiWuJJV3DybA2IfzvRimeKXGrGuVPv1zobSY/26KnP3HbV0VcNb3ECzgvtbvF3xjSMkcooou6HASXZuLdjnhpQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.2.tgz", - "integrity": "sha512-akcZquRzCY/KpUoZAMBhGf7oi4LmXq1BzRA5CPAC3rkUf28Y/sAYV3jSL+JKd7cwEyFvR5G0XVZ0gaMedP+60A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.2.tgz", - "integrity": "sha512-fNwYHrPyYyxauPzX/cpYw8Z7LQpp+DGA0KCoswA0aVFBpmdMil9XgjB8V3Ny64Ihu797+GKcuJqnsOKEmor7fA==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.2.tgz", - "integrity": "sha512-XfvsgzR7DZqREdst7K1Mj3ilSUM5xLAHJcIMDFPKdxTs9q5VHOT8aMA+a683fqBu7DQl8+Sd9HCsQYL8EMY9qA==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.2.tgz", - "integrity": "sha512-Pp7gVZggEFlbcuztay+/U0gVG9S1XAh8i7I1Re/htbAzo43P5wHZHw6pTyzotISqlKohoh9RpIfnOz3RbemK1w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.2.tgz", - "integrity": "sha512-zkgL2xff6i7u5hau/m6FGeS8gRkLEdgLw522WGmdWWlLd9btmNl3S80mcEjtGq+kvgUekQ3+BOYLLLcPlS2LIA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.2.tgz", - "integrity": "sha512-qOheJomrkVCbbHFJ7L3J97cnhfogKqguAQphv26+3ZsAQIF1L19b+dArl//s8rjJHJLz9byykyM8NBP4nmSa1g==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.2.tgz", - "integrity": "sha512-XlxLD54wQhH3FciCgMofxBw27NzUe818gJH410qWvc41UT0ZFcgxVjyX5/EK8MPTupjeVWqN5oy+9pCA9mqfCA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.2.tgz", - "integrity": "sha512-vdryWeRb2bLJZf0Fv/W8se6nvsHe2PkTCxV0meheK3nQE+G90VCJcke51Miy1yQRsfm2uqIyjXOu4wmUzbTtkQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.2.tgz", - "integrity": "sha512-bcq2h2pkKmH2po4cZV8VWzO4lL40STyu/nLoFpYMQp9C2tCVNTdcVv86MwSsn3D5s1FBe2Ty1atqvVAUTMimNg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.2.tgz", - "integrity": "sha512-EGoo5DMVMRkTId8fuTDaoxVlR5ZTsKULUezRjd9gCw5eeY+DjCvDpZAOlNUvKPGX+7rS1RWx6j+yOpNPx0cUgQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.2.tgz", - "integrity": "sha512-MErl12k7BFHZG1TI9QF/3lSSZARzq9KgNy/FjnqFMCkv+N4RSSzoUCA5h2mqHX4Mox3WaTVKblyzhQ1zRb2ZuQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.2.tgz", - "integrity": "sha512-ILs8k07Wh4p0PsNY4wYLEaXZKMOpVhrG5QDB0yHhGhuzOfDlnyHN6sflL4El/MpUP1y8uY2lUZrv4oBS6pTT3g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.2.tgz", - "integrity": "sha512-hKgB3nz/TKD3Wv78XEsyXzQsNjvhOHmwKQTvXADGOyU/cIClZDO7DsoggbdmJDPGp5V80tA3Vfv61PaKTLH3LA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.2.tgz", - "integrity": "sha512-T4wf1mudIDxN8Q/CWIBJC1u5gQUc+r5mPvlwoSbIvNkyVTP2TAFeobEmst5AQ4gMyAz4sSByVdoTDfvTmGK/8g==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.2.tgz", - "integrity": "sha512-tC3IY7qoaD9Ll3/8WJQn49j5V2f/NuI9S41NOE2iM5MPs3sPIvOkVToLcz/7Bz4pyF7PSvrtwu8I/pUrGOSecQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.2.tgz", - "integrity": "sha512-6NHnk/K3eq2ZFYcU1X8g67s9qIJRCOTT92gwLMVBp08dB2uuuwI1/Q/empzL2Bfr2f2WRLJVwpp90RmacQyFkw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@types/esrecurse": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", - "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", - "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/resolve": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", - "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.0.tgz", - "integrity": "sha512-/v8HZt6RlyIZxB3ntehELOcUcfxKPVGWXnQdJuHRmzrqgF8nQypcC/oxGW+Ot4VGKDq81XugPKxx0n5PBtf9PA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.70.0", - "@typescript-eslint/type-utils": "8.70.0", - "@typescript-eslint/utils": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.70.0", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.10.tgz", - "integrity": "sha512-HpbUakT7xp5miBUywCHf36ZEuAJNklBJDDsGpUIjMzOSmM8ELSfA9Sa/QDPeNeqeoN31u+UTCkL4klCOVvRm4Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.0.tgz", - "integrity": "sha512-zYvrmj9Yxd63UGaXw+kdt6A0F0s0qveJyuatIM77bYC2DE4pgmg7a50u8LR7PRtXd0x+h+Tl3eXabGm06SWd3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.70.0", - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.0.tgz", - "integrity": "sha512-hFHbTNqhU9G+2eKFXCBVb1tjFT/LceiJ4+HfLO4pTpDI0KHi6iajpcFFkaSQ9gXmCh7n82A0PthaayEdN6mspQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.70.0", - "@typescript-eslint/types": "^8.70.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.0.tgz", - "integrity": "sha512-8nP3Kwh5hlgZ4FicGvmznAmJe8UL4sdU8tLukrPaMuQmDuk4Y8xYfzu/aYZW4xT2JCgc7H/TpDI5cGlxcWJSqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.0.tgz", - "integrity": "sha512-adnkeeNq9Sq1sUf4+FRVc0KdgYghzsgFpZSQVZVvY0LCuUuN0FnQgyGzCJeC4fW1cdXseBAjU2EOqUIjbNcZUw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.0.tgz", - "integrity": "sha512-NUMKIhYVaVIVLnRL9CRt+VVcuLgSHUCpXn4/+K8wql+vdInUzvx8BjUO1oJ7cG9shjFJKtF8F8Hh2kCh3/KBVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0", - "@typescript-eslint/utils": "8.70.0", - "debug": "^4.4.3", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.0.tgz", - "integrity": "sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.0.tgz", - "integrity": "sha512-d9NmHMPEKQ7QCLLm1jI3zmoQBwT5KwFYjXBJ9ymZfKCUU+5rmTRykKAFvH5Qn/ZCds3CEAFS9OC9M/jkl0X2bA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.70.0", - "@typescript-eslint/tsconfig-utils": "8.70.0", - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.0.tgz", - "integrity": "sha512-oZmtKJz/4fufZ2p3+Cn3ijEojcdfR+1zYDH2xKYrEly0dR/Q/1xUPRCOlKGxod78nWlU2UnDe09GZ3TaknBFGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.70.0", - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.0.tgz", - "integrity": "sha512-BoC8PiO4Hkdo0TVJh9Ntxr5MxPDI7/oFsrygN5ADelFSeXG/qgNuucIGA+L5Z6JpPTE/uRfcTWtscjbUaufepQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.70.0", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/acorn": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", - "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", - "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/bignumber.js": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", - "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cacheable": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.5.0.tgz", - "integrity": "sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cacheable/memory": "^2.2.0", - "@cacheable/utils": "^2.5.0", - "hookified": "^1.15.0", - "keyv": "^5.6.0", - "qified": "^0.10.1" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true, - "license": "MIT" - }, - "node_modules/content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.10.0.tgz", - "integrity": "sha512-NPXn6r5zl4uET1DAVPaOwzX3rut4c0wcmw3dWJAfOsTM5+TogXo0DDjz8pwm/hL8cyVNpHqeK4JpN0NjnyFFNw==", - "dev": true, - "license": "MIT", - "workspaces": [ - "packages/*" - ], - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.5", - "@eslint/config-helpers": "^0.7.0", - "@eslint/core": "^1.2.1", - "@eslint/plugin-kit": "^0.7.3", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.14.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^9.1.2", - "eslint-visitor-keys": "^5.0.1", - "espree": "^11.2.0", - "esquery": "^1.7.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "11.1.5 || >11.1.6 <12", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "minimatch": "^10.2.5", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", - "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@types/esrecurse": "^4.3.1", - "@types/estree": "^1.0.8", - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/espree": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", - "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.16.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^5.0.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true, - "license": "MIT" - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/file-entry-cache": { - "version": "11.1.5", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-11.1.5.tgz", - "integrity": "sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^6.1.23" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "6.1.23", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.23.tgz", - "integrity": "sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "cacheable": "^2.5.0", - "flatted": "^3.4.2", - "hookified": "^1.15.0" - } - }, - "node_modules/flatted": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", - "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/hashery": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.1.tgz", - "integrity": "sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "hookified": "^1.15.0" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/hasown": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", - "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hookified": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz", - "integrity": "sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/is-core-module": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", - "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "license": "MIT", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/keyv": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.6.0.tgz", - "integrity": "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@keyv/serialize": "^1.1.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "~1.33.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true, - "license": "(WTFPL OR MIT)" - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-to-regexp": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", - "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", - "dev": true, - "license": "MIT" - }, - "node_modules/picomatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", - "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/playwright": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", - "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.56.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/playwright-core": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", - "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", - "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/qified": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/qified/-/qified-0.10.1.tgz", - "integrity": "sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hookified": "^2.1.1" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/qified/node_modules/hookified": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/hookified/-/hookified-2.2.0.tgz", - "integrity": "sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==", - "dev": true, - "license": "MIT" - }, - "node_modules/range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/resolve": { - "version": "1.22.12", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", - "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/rollup": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.2.tgz", - "integrity": "sha512-l5eyksV4tPBj6lJyEa37YzIOCSOV7lkZzEHUdpjWZbtD7wTcFYmEYXSgm5bT4vV+dZLb9rBG1W9GROOG4NS4Ew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.9" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@napi-rs/lzma-linux-x64-gnu": "1.5.1", - "@rollup/rollup-android-arm-eabi": "4.63.2", - "@rollup/rollup-android-arm64": "4.63.2", - "@rollup/rollup-darwin-arm64": "4.63.2", - "@rollup/rollup-darwin-x64": "4.63.2", - "@rollup/rollup-freebsd-arm64": "4.63.2", - "@rollup/rollup-freebsd-x64": "4.63.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.63.2", - "@rollup/rollup-linux-arm-musleabihf": "4.63.2", - "@rollup/rollup-linux-arm64-gnu": "4.63.2", - "@rollup/rollup-linux-arm64-musl": "4.63.2", - "@rollup/rollup-linux-loong64-gnu": "4.63.2", - "@rollup/rollup-linux-loong64-musl": "4.63.2", - "@rollup/rollup-linux-ppc64-gnu": "4.63.2", - "@rollup/rollup-linux-ppc64-musl": "4.63.2", - "@rollup/rollup-linux-riscv64-gnu": "4.63.2", - "@rollup/rollup-linux-riscv64-musl": "4.63.2", - "@rollup/rollup-linux-s390x-gnu": "4.63.2", - "@rollup/rollup-linux-x64-gnu": "4.63.2", - "@rollup/rollup-linux-x64-musl": "4.63.2", - "@rollup/rollup-openbsd-x64": "4.63.2", - "@rollup/rollup-openharmony-arm64": "4.63.2", - "@rollup/rollup-win32-arm64-msvc": "4.63.2", - "@rollup/rollup-win32-ia32-msvc": "4.63.2", - "@rollup/rollup-win32-x64-gnu": "4.63.2", - "@rollup/rollup-win32-x64-msvc": "4.63.2", - "fsevents": "~2.3.2" - } - }, - "node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serve-handler": { - "version": "6.1.7", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz", - "integrity": "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.0.0", - "content-disposition": "0.5.2", - "mime-types": "2.1.18", - "minimatch": "3.1.5", - "path-is-inside": "1.0.2", - "path-to-regexp": "3.3.0", - "range-parser": "1.2.0" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/ts-api-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", - "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.0.tgz", - "integrity": "sha512-P/W5cz70/cQAuKfY3xwQMWWTV7BvJ0mAQmi+9mBcsVPaBUpd6Ohpa+fECv9rBFrQcig86jAiNBFNWUqnTjr4pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.70.0", - "@typescript-eslint/parser": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0", - "@typescript-eslint/utils": "8.70.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "name": "appwrite", + "version": "28.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "appwrite", + "version": "28.1.0", + "license": "BSD-3-Clause", + "dependencies": { + "json-bigint": "1.0.0" + }, + "devDependencies": { + "@eslint/js": "10.0.1", + "@rollup/plugin-commonjs": "29.0.3", + "@rollup/plugin-node-resolve": "16.0.3", + "@rollup/plugin-typescript": "12.3.0", + "@types/json-bigint": "1.0.4", + "eslint": "10.10.0", + "playwright": "1.56.1", + "prettier": "3.9.6", + "rollup": "4.63.2", + "serve-handler": "6.1.7", + "tslib": "2.8.1", + "typescript": "5.9.3", + "typescript-eslint": "8.70.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "overrides": { + "brace-expansion": "5.0.9" + } + }, + "node_modules/@cacheable/memory": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@cacheable/memory/-/memory-2.2.0.tgz", + "integrity": "sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cacheable/utils": "^2.5.0", + "@keyv/bigmap": "^1.3.1", + "hookified": "^1.15.1", + "keyv": "^5.6.0" + } + }, + "node_modules/@cacheable/utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.5.0.tgz", + "integrity": "sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hashery": "^1.5.1", + "keyv": "^5.6.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz", + "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@keyv/bigmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.3.1.tgz", + "integrity": "sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hashery": "^1.4.0", + "hookified": "^1.15.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "keyv": "^5.6.0" + } + }, + "node_modules/@keyv/serialize": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz", + "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz", + "integrity": "sha512-ZaOxZceP7SOUW7Lqw5IRVweSQYWaeIPnXIGLiB690EBA3FGJTO40EEr2L5yZplJWsgTCogILRSpcAe7+U0Otdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "fdir": "^6.2.0", + "is-reference": "1.2.1", + "magic-string": "^0.30.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0 || 14 >= 14.17" + }, + "peerDependencies": { + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", + "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-typescript": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz", + "integrity": "sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0||^4.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz", + "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.2.tgz", + "integrity": "sha512-Xa6RDoWa+hNiX6PgsljlH6W75RaONx3y6PVlbLhkEWW+GaPQ3dP5gwbL/erAzQHWwkvW5UxdD5l87Qx2FAQ/4A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.2.tgz", + "integrity": "sha512-vNASxsghMfQ5s+v3PrpnJd+ryL/26lxCCaGI+sDJ7VzmHiYXIrrVltsDhaawxLM1WcoMU2oYlbPHLaYQtBzhcg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.2.tgz", + "integrity": "sha512-0dWDjmlrpZAgjPD/aPzUDhBW8APLRjAni5bOrM76wiiZm+E+KTMVKNhAzaTBohz8UyO2fKNAl0+fygbe2HZXOA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.2.tgz", + "integrity": "sha512-N58uktcwzk3+qT4KHEuNdIxX1N01RWrkfVoml69EAbSaNDL+sbNVLx2RMl4Qd23lpA0fgPvyh5hHb4weD5WKmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.2.tgz", + "integrity": "sha512-HWF2zH8EAp2scWRpt2PGe6iUGz7zi04waXsdRr3zb4DWCk2ImIo5FZu0jjmD53nP/DGSvnW0e7/1ToCNZs2lZw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.2.tgz", + "integrity": "sha512-MkvcwHMnzPSMOQEwB6wHnLzmc+hT8BGc5bW/Mhmjjgx3wbj6VBnlc47XsK74kD0K9MikFfXpQqyz4NUXaUW62A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.2.tgz", + "integrity": "sha512-xe1bCKPJaKsD0tfd7Rb6bGfUogJTpKbTEEthsfdb7hTfTRNJVQTdirabQx0o6ERVba/smkM720soMY+0QnrlSQ==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.2.tgz", + "integrity": "sha512-yOM7LdK0p6gk6+Q773OEwtlsikT1TL3yMmYsTtRlDRPha5vV2DC5x7LqRWDr6f3cSYNMKVqxzffXv8ivxNBIFQ==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.2.tgz", + "integrity": "sha512-qiWuJJV3DybA2IfzvRimeKXGrGuVPv1zobSY/26KnP3HbV0VcNb3ECzgvtbvF3xjSMkcooou6HASXZuLdjnhpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.2.tgz", + "integrity": "sha512-akcZquRzCY/KpUoZAMBhGf7oi4LmXq1BzRA5CPAC3rkUf28Y/sAYV3jSL+JKd7cwEyFvR5G0XVZ0gaMedP+60A==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.2.tgz", + "integrity": "sha512-fNwYHrPyYyxauPzX/cpYw8Z7LQpp+DGA0KCoswA0aVFBpmdMil9XgjB8V3Ny64Ihu797+GKcuJqnsOKEmor7fA==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.2.tgz", + "integrity": "sha512-XfvsgzR7DZqREdst7K1Mj3ilSUM5xLAHJcIMDFPKdxTs9q5VHOT8aMA+a683fqBu7DQl8+Sd9HCsQYL8EMY9qA==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.2.tgz", + "integrity": "sha512-Pp7gVZggEFlbcuztay+/U0gVG9S1XAh8i7I1Re/htbAzo43P5wHZHw6pTyzotISqlKohoh9RpIfnOz3RbemK1w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.2.tgz", + "integrity": "sha512-zkgL2xff6i7u5hau/m6FGeS8gRkLEdgLw522WGmdWWlLd9btmNl3S80mcEjtGq+kvgUekQ3+BOYLLLcPlS2LIA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.2.tgz", + "integrity": "sha512-qOheJomrkVCbbHFJ7L3J97cnhfogKqguAQphv26+3ZsAQIF1L19b+dArl//s8rjJHJLz9byykyM8NBP4nmSa1g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.2.tgz", + "integrity": "sha512-XlxLD54wQhH3FciCgMofxBw27NzUe818gJH410qWvc41UT0ZFcgxVjyX5/EK8MPTupjeVWqN5oy+9pCA9mqfCA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.2.tgz", + "integrity": "sha512-vdryWeRb2bLJZf0Fv/W8se6nvsHe2PkTCxV0meheK3nQE+G90VCJcke51Miy1yQRsfm2uqIyjXOu4wmUzbTtkQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.2.tgz", + "integrity": "sha512-bcq2h2pkKmH2po4cZV8VWzO4lL40STyu/nLoFpYMQp9C2tCVNTdcVv86MwSsn3D5s1FBe2Ty1atqvVAUTMimNg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.2.tgz", + "integrity": "sha512-EGoo5DMVMRkTId8fuTDaoxVlR5ZTsKULUezRjd9gCw5eeY+DjCvDpZAOlNUvKPGX+7rS1RWx6j+yOpNPx0cUgQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.2.tgz", + "integrity": "sha512-MErl12k7BFHZG1TI9QF/3lSSZARzq9KgNy/FjnqFMCkv+N4RSSzoUCA5h2mqHX4Mox3WaTVKblyzhQ1zRb2ZuQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.2.tgz", + "integrity": "sha512-ILs8k07Wh4p0PsNY4wYLEaXZKMOpVhrG5QDB0yHhGhuzOfDlnyHN6sflL4El/MpUP1y8uY2lUZrv4oBS6pTT3g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.2.tgz", + "integrity": "sha512-hKgB3nz/TKD3Wv78XEsyXzQsNjvhOHmwKQTvXADGOyU/cIClZDO7DsoggbdmJDPGp5V80tA3Vfv61PaKTLH3LA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.2.tgz", + "integrity": "sha512-T4wf1mudIDxN8Q/CWIBJC1u5gQUc+r5mPvlwoSbIvNkyVTP2TAFeobEmst5AQ4gMyAz4sSByVdoTDfvTmGK/8g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.2.tgz", + "integrity": "sha512-tC3IY7qoaD9Ll3/8WJQn49j5V2f/NuI9S41NOE2iM5MPs3sPIvOkVToLcz/7Bz4pyF7PSvrtwu8I/pUrGOSecQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.2.tgz", + "integrity": "sha512-6NHnk/K3eq2ZFYcU1X8g67s9qIJRCOTT92gwLMVBp08dB2uuuwI1/Q/empzL2Bfr2f2WRLJVwpp90RmacQyFkw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", + "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.0.tgz", + "integrity": "sha512-/v8HZt6RlyIZxB3ntehELOcUcfxKPVGWXnQdJuHRmzrqgF8nQypcC/oxGW+Ot4VGKDq81XugPKxx0n5PBtf9PA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/type-utils": "8.70.0", + "@typescript-eslint/utils": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.70.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.9.tgz", + "integrity": "sha512-brTTsvFRt5C1gGHtPst/281UjPD5t9fBqbgoMPlVWy11ZLTPfu7HxK4ZYqO9H7o/yC9rSTCI85EaQ4OoY12qYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.0.tgz", + "integrity": "sha512-zYvrmj9Yxd63UGaXw+kdt6A0F0s0qveJyuatIM77bYC2DE4pgmg7a50u8LR7PRtXd0x+h+Tl3eXabGm06SWd3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.0.tgz", + "integrity": "sha512-hFHbTNqhU9G+2eKFXCBVb1tjFT/LceiJ4+HfLO4pTpDI0KHi6iajpcFFkaSQ9gXmCh7n82A0PthaayEdN6mspQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.70.0", + "@typescript-eslint/types": "^8.70.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.0.tgz", + "integrity": "sha512-8nP3Kwh5hlgZ4FicGvmznAmJe8UL4sdU8tLukrPaMuQmDuk4Y8xYfzu/aYZW4xT2JCgc7H/TpDI5cGlxcWJSqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.0.tgz", + "integrity": "sha512-adnkeeNq9Sq1sUf4+FRVc0KdgYghzsgFpZSQVZVvY0LCuUuN0FnQgyGzCJeC4fW1cdXseBAjU2EOqUIjbNcZUw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.0.tgz", + "integrity": "sha512-NUMKIhYVaVIVLnRL9CRt+VVcuLgSHUCpXn4/+K8wql+vdInUzvx8BjUO1oJ7cG9shjFJKtF8F8Hh2kCh3/KBVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/utils": "8.70.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.0.tgz", + "integrity": "sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.0.tgz", + "integrity": "sha512-d9NmHMPEKQ7QCLLm1jI3zmoQBwT5KwFYjXBJ9ymZfKCUU+5rmTRykKAFvH5Qn/ZCds3CEAFS9OC9M/jkl0X2bA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.70.0", + "@typescript-eslint/tsconfig-utils": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.0.tgz", + "integrity": "sha512-oZmtKJz/4fufZ2p3+Cn3ijEojcdfR+1zYDH2xKYrEly0dR/Q/1xUPRCOlKGxod78nWlU2UnDe09GZ3TaknBFGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.0.tgz", + "integrity": "sha512-BoC8PiO4Hkdo0TVJh9Ntxr5MxPDI7/oFsrygN5ADelFSeXG/qgNuucIGA+L5Z6JpPTE/uRfcTWtscjbUaufepQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacheable": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.5.0.tgz", + "integrity": "sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cacheable/memory": "^2.2.0", + "@cacheable/utils": "^2.5.0", + "hookified": "^1.15.0", + "keyv": "^5.6.0", + "qified": "^0.10.1" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.10.0.tgz", + "integrity": "sha512-NPXn6r5zl4uET1DAVPaOwzX3rut4c0wcmw3dWJAfOsTM5+TogXo0DDjz8pwm/hL8cyVNpHqeK4JpN0NjnyFFNw==", + "dev": true, + "license": "MIT", + "workspaces": [ + "packages/*" + ], + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.3", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "11.1.5 || >11.1.6 <12", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true } + } + }, + "node_modules/file-entry-cache": { + "version": "11.1.5", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-11.1.5.tgz", + "integrity": "sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^6.1.23" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "6.1.23", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.23.tgz", + "integrity": "sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cacheable": "^2.5.0", + "flatted": "^3.4.2", + "hookified": "^1.15.0" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/hashery": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.1.tgz", + "integrity": "sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^1.15.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hookified": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz", + "integrity": "sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.6.0.tgz", + "integrity": "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@keyv/serialize": "^1.1.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "~1.33.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true, + "license": "(WTFPL OR MIT)" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-to-regexp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/playwright": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", + "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.56.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", + "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qified": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/qified/-/qified-0.10.1.tgz", + "integrity": "sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^2.1.1" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/qified/node_modules/hookified": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-2.2.0.tgz", + "integrity": "sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==", + "dev": true, + "license": "MIT" + }, + "node_modules/range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.2.tgz", + "integrity": "sha512-l5eyksV4tPBj6lJyEa37YzIOCSOV7lkZzEHUdpjWZbtD7wTcFYmEYXSgm5bT4vV+dZLb9rBG1W9GROOG4NS4Ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.63.2", + "@rollup/rollup-android-arm64": "4.63.2", + "@rollup/rollup-darwin-arm64": "4.63.2", + "@rollup/rollup-darwin-x64": "4.63.2", + "@rollup/rollup-freebsd-arm64": "4.63.2", + "@rollup/rollup-freebsd-x64": "4.63.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.63.2", + "@rollup/rollup-linux-arm-musleabihf": "4.63.2", + "@rollup/rollup-linux-arm64-gnu": "4.63.2", + "@rollup/rollup-linux-arm64-musl": "4.63.2", + "@rollup/rollup-linux-loong64-gnu": "4.63.2", + "@rollup/rollup-linux-loong64-musl": "4.63.2", + "@rollup/rollup-linux-ppc64-gnu": "4.63.2", + "@rollup/rollup-linux-ppc64-musl": "4.63.2", + "@rollup/rollup-linux-riscv64-gnu": "4.63.2", + "@rollup/rollup-linux-riscv64-musl": "4.63.2", + "@rollup/rollup-linux-s390x-gnu": "4.63.2", + "@rollup/rollup-linux-x64-gnu": "4.63.2", + "@rollup/rollup-linux-x64-musl": "4.63.2", + "@rollup/rollup-openbsd-x64": "4.63.2", + "@rollup/rollup-openharmony-arm64": "4.63.2", + "@rollup/rollup-win32-arm64-msvc": "4.63.2", + "@rollup/rollup-win32-ia32-msvc": "4.63.2", + "@rollup/rollup-win32-x64-gnu": "4.63.2", + "@rollup/rollup-win32-x64-msvc": "4.63.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serve-handler": { + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz", + "integrity": "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "mime-types": "2.1.18", + "minimatch": "3.1.5", + "path-is-inside": "1.0.2", + "path-to-regexp": "3.3.0", + "range-parser": "1.2.0" + } + }, + "node_modules/serve-handler/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.0.tgz", + "integrity": "sha512-P/W5cz70/cQAuKfY3xwQMWWTV7BvJ0mAQmi+9mBcsVPaBUpd6Ohpa+fECv9rBFrQcig86jAiNBFNWUqnTjr4pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.70.0", + "@typescript-eslint/parser": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/utils": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } + } } diff --git a/package.json b/package.json index 4e3da6a7..92fb84e4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "appwrite", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API", - "version": "28.0.0", + "version": "28.1.0", "license": "BSD-3-Clause", "main": "dist/cjs/sdk.js", "exports": { diff --git a/src/client.ts b/src/client.ts index 89e59bd3..83690d67 100644 --- a/src/client.ts +++ b/src/client.ts @@ -397,7 +397,7 @@ class Client { 'x-sdk-name': 'Web', 'x-sdk-platform': 'client', 'x-sdk-language': 'web', - 'x-sdk-version': '28.0.0', + 'x-sdk-version': '28.1.0', 'X-Appwrite-Response-Format': '2.3.0', }; diff --git a/src/index.ts b/src/index.ts index 81ea1225..02956e9d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,6 +9,7 @@ */ export { Client, Query, AppwriteException } from './client'; export { Account } from './services/account'; +export { Apps } from './services/apps'; export { Avatars } from './services/avatars'; export { Databases } from './services/databases'; export { DocumentsDB } from './services/documents-db'; @@ -16,6 +17,7 @@ export { Functions } from './services/functions'; export { Graphql } from './services/graphql'; export { Locale } from './services/locale'; export { Messaging } from './services/messaging'; +export { Oauth2 } from './services/oauth-2'; export { Organization } from './services/organization'; export { Presences } from './services/presences'; export { Storage } from './services/storage'; diff --git a/src/models.ts b/src/models.ts index dda14b42..9b12125a 100644 --- a/src/models.ts +++ b/src/models.ts @@ -1444,6 +1444,226 @@ export namespace Models { expired: boolean; }; + /** + * App + */ + export type App = { + /** + * App ID. + */ + $id: string; + /** + * App creation time in ISO 8601 format. + */ + $createdAt: string; + /** + * App update date in ISO 8601 format. + */ + $updatedAt: string; + /** + * Application name. + */ + name: string; + /** + * Application description shown to users during OAuth2 consent. + */ + description: string; + /** + * Application homepage URL shown to users during OAuth2 consent. + */ + clientUri: string; + /** + * Application logo URL shown to users during OAuth2 consent. + */ + logoUri: string; + /** + * Application privacy policy URL shown to users during OAuth2 consent. + */ + privacyPolicyUrl: string; + /** + * Application terms of service URL shown to users during OAuth2 consent. + */ + termsUrl: string; + /** + * Application support or security contact emails. + */ + contacts: string[]; + /** + * Application tagline shown to users during OAuth2 consent. + */ + tagline: string; + /** + * Application tags shown to users during OAuth2 consent. + */ + tags: string[]; + /** + * Application labels. Read-only for clients; only a server SDK using a project API key can update them. + */ + labels: string[]; + /** + * Application image URLs shown to users during OAuth2 consent. + */ + images: string[]; + /** + * Application support URL shown to users during OAuth2 consent. + */ + supportUrl: string; + /** + * Application data deletion URL shown to users during OAuth2 consent. + */ + dataDeletionUrl: string; + /** + * List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate. + */ + redirectUris: string[]; + /** + * List of authorized post-logout redirect URIs for OpenID Connect RP-Initiated Logout. The logout endpoint only redirects users to URIs in this list after ending their session. + */ + postLogoutRedirectUris: string[]; + /** + * Whether the app is enabled or not. + */ + enabled: boolean; + /** + * OAuth2 client type. `public` for SPAs, mobile, and native apps that cannot keep a client secret (PKCE required); `confidential` for server-side clients that authenticate with a client secret. + */ + type: string; + /** + * Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628). + */ + deviceFlow: boolean; + /** + * ID of team that owns the application, if owned by team. Otherwise, user ID will be used. + */ + teamId: string; + /** + * ID of user who owns the application, if owned by user. Otherwise, team ID will be used. + */ + userId: string; + /** + * Scopes the application requests when installed on a team. Organization-level and project-level scopes only. + */ + installationScopes: string[]; + /** + * URL users are redirected to after creating or updating an installation of this application. Empty for no redirect. + */ + installationRedirectUrl: string; + /** + * List of application secrets. + */ + secrets: AppSecret[]; + }; + + /** + * AppSecret + */ + export type AppSecret = { + /** + * Secret ID. + */ + $id: string; + /** + * Secret creation time in ISO 8601 format. + */ + $createdAt: string; + /** + * Secret update time in ISO 8601 format. + */ + $updatedAt: string; + /** + * Application ID this secret belongs to. + */ + appId: string; + /** + * Always empty. The application client secret is returned only once, in the response of the createSecret method. + */ + secret: string; + /** + * Last few characters of the client secret, used to help identify it. + */ + hint: string; + /** + * ID of the user who created the secret. + */ + createdById: string; + /** + * Name of the user who created the secret. + */ + createdByName: string; + /** + * Time the secret was last used for authentication in ISO 8601 format. Null if never used. + */ + lastAccessedAt?: string; + }; + + /** + * AppSecretPlaintext + */ + export type AppSecretPlaintext = { + /** + * Secret ID. + */ + $id: string; + /** + * Secret creation time in ISO 8601 format. + */ + $createdAt: string; + /** + * Secret update time in ISO 8601 format. + */ + $updatedAt: string; + /** + * Application ID this secret belongs to. + */ + appId: string; + /** + * Application client secret. Returned only when the secret is created; subsequent reads always return an empty value. + */ + secret: string; + /** + * Last few characters of the client secret, used to help identify it. + */ + hint: string; + /** + * ID of the user who created the secret. + */ + createdById: string; + /** + * Name of the user who created the secret. + */ + createdByName: string; + /** + * Time the secret was last used for authentication in ISO 8601 format. Null if never used. + */ + lastAccessedAt?: string; + }; + + /** + * AppScope + */ + export type AppScope = { + /** + * Scope value as requested by apps. + */ + value: string; + /** + * Human-readable description of what the scope grants. + */ + description: string; + /** + * What the scope grants access to. One of `account`, `project`, or `organization`. Only `project` and `organization` scopes are installable. + */ + type: string; + /** + * Scope category, used to group scopes on consent and installation screens. + */ + category: string; + /** + * Whether the scope is deprecated. Deprecated scopes can still be requested but should not be offered for new grants. + */ + deprecated: boolean; + }; + /** * AppInstallation */ @@ -1490,6 +1710,214 @@ export namespace Models { lastAccessedAt?: string; }; + /** + * AppKey + */ + export type AppKey = { + /** + * App key ID. + */ + $id: string; + /** + * App key creation time in ISO 8601 format. + */ + $createdAt: string; + /** + * App key update time in ISO 8601 format. + */ + $updatedAt: string; + /** + * Application ID this app key belongs to. + */ + appId: string; + /** + * App key secret. + */ + secret: string; + /** + * Last few characters of the app key secret, used to help identify it. + */ + hint: string; + /** + * ID of the user who created the app key. + */ + createdById: string; + /** + * Name of the user who created the app key. + */ + createdByName: string; + /** + * Time the app key was last used for authentication in ISO 8601 format. Null if never used. + */ + lastAccessedAt?: string; + }; + + /** + * OAuth2 Authorize + */ + export type Oauth2Authorize = { + /** + * OAuth2 grant ID. Set when the user must give explicit consent; pass it to the approve or reject endpoint. Empty when a redirect URL is returned instead. + */ + grantId: string; + /** + * URL the end user should be redirected to when the flow can complete without consent. Empty when consent is still required. + */ + redirectUrl: string; + }; + + /** + * OAuth2 Approve + */ + export type Oauth2Approve = { + /** + * URL the end user should be redirected to after the grant is approved, carrying the authorization `code` and/or `id_token` along with the original `state`. + */ + redirectUrl: string; + }; + + /** + * OAuth2 Reject + */ + export type Oauth2Reject = { + /** + * URL the end user should be redirected to after the grant is rejected, carrying an `access_denied` error. + */ + redirectUrl: string; + }; + + /** + * OAuth2 Grant + */ + export type Oauth2Grant = { + /** + * Grant ID. + */ + $id: string; + /** + * Grant creation time in ISO 8601 format. + */ + $createdAt: string; + /** + * Grant update date in ISO 8601 format. + */ + $updatedAt: string; + /** + * ID of the user the grant belongs to. + */ + userId: string; + /** + * ID of the OAuth2 client (app) the grant was requested for. + */ + appId: string; + /** + * Requested OAuth2 scopes the user is being asked to consent to. + */ + scopes: string[]; + /** + * Requested RFC 8707 resource indicators the user is being asked to consent to. + */ + resources: string[]; + /** + * Requested authorization_details the user is being asked to consent to, as a JSON string. Each entry has a `type` plus project-defined fields. + */ + authorizationDetails: string; + /** + * OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account. + */ + prompt: string; + /** + * Redirect URI the user will be sent to after the flow completes. + */ + redirectUri: string; + /** + * Unix timestamp of when the user last authenticated. + */ + authTime: number; + /** + * Grant expiration time in ISO 8601 format. + */ + expire: string; + }; + + /** + * OAuth2 Device Authorization + */ + export type Oauth2DeviceAuthorization = { + /** + * Device verification code used by the client to poll the token endpoint. + */ + device_code: string; + /** + * Short code the end user enters on the verification page. + */ + user_code: string; + /** + * URL where the end user enters the user code. + */ + verification_uri: string; + /** + * Verification URL with the user code prefilled as a query parameter. + */ + verification_uri_complete: string; + /** + * Lifetime of the device code and user code in seconds. + */ + expires_in: number; + /** + * Minimum polling interval for the token endpoint in seconds. + */ + interval: number; + }; + + /** + * OAuth2 PAR + */ + export type Oauth2PAR = { + /** + * Authorization request handle to pass to the authorize endpoint. + */ + request_uri: string; + /** + * Lifetime of the authorization request handle in seconds. + */ + expires_in: number; + }; + + /** + * OAuth2 Token + */ + export type Oauth2Token = { + /** + * OAuth2 access token. + */ + access_token: string; + /** + * OAuth2 token type. + */ + token_type: string; + /** + * Access token lifetime in seconds. + */ + expires_in: number; + /** + * OAuth2 refresh token. + */ + refresh_token: string; + /** + * Space-separated scopes granted to the access token. + */ + scope: string; + /** + * Granted RFC 9396 authorization details as a JSON string. + */ + authorization_details?: string; + /** + * OpenID Connect ID token. Returned when the `openid` scope is granted. + */ + id_token?: string; + }; + /** * OAuth2 Consent */ @@ -1586,6 +2014,62 @@ export namespace Models { expire: string; }; + /** + * OAuth2 Project + */ + export type Oauth2Project = { + /** + * Project ID. + */ + $id: string; + /** + * Region ID the project is deployed in. + */ + region: string; + /** + * API endpoint of the region the project is deployed in. Empty when the region has no public hostname configured. + */ + endpoint: string; + }; + + /** + * OAuth2 Organization + */ + export type Oauth2Organization = { + /** + * Organization ID. + */ + $id: string; + }; + + /** + * OAuth2 accessible projects list + */ + export type Oauth2ProjectList = { + /** + * Total number of projects that matched your query. + */ + total: number; + /** + * List of projects. + */ + projects: Oauth2Project[]; + }; + + /** + * OAuth2 accessible organizations list + */ + export type Oauth2OrganizationList = { + /** + * Total number of organizations that matched your query. + */ + total: number; + /** + * List of organizations. + */ + organizations: Oauth2Organization[]; + }; + /** * OAuth2 consents list */ @@ -1614,6 +2098,48 @@ export namespace Models { tokens: Oauth2ConsentToken[]; }; + /** + * Apps list + */ + export type AppsList = { + /** + * Total number of apps that matched your query. + */ + total: number; + /** + * List of apps. + */ + apps: App[]; + }; + + /** + * App secrets list + */ + export type AppSecretList = { + /** + * Total number of secrets that matched your query. + */ + total: number; + /** + * List of secrets. + */ + secrets: AppSecret[]; + }; + + /** + * App scopes list + */ + export type AppScopeList = { + /** + * Total number of scopes that matched your query. + */ + total: number; + /** + * List of scopes. + */ + scopes: AppScope[]; + }; + /** * App installations list */ @@ -1627,4 +2153,18 @@ export namespace Models { */ installations: AppInstallation[]; }; + + /** + * App keys list + */ + export type AppKeyList = { + /** + * Total number of keys that matched your query. + */ + total: number; + /** + * List of keys. + */ + keys: AppKey[]; + }; } diff --git a/src/services/apps.ts b/src/services/apps.ts new file mode 100644 index 00000000..b746385f --- /dev/null +++ b/src/services/apps.ts @@ -0,0 +1,1807 @@ +import { AppwriteException, Client, type Payload } from '../client'; +import type { Models } from '../models'; + +export class Apps { + client: Client; + + constructor(client: Client) { + this.client = client; + } + + /** + * List applications. + * + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + */ + list(params?: { + queries?: string[]; + total?: boolean; + }): Promise; + /** + * List applications. + * + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + list(queries?: string[], total?: boolean): Promise; + list( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] + ): Promise { + let params: { queries?: string[]; total?: boolean }; + + if ( + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; + } else { + params = { + queries: paramsOrFirst as string[], + total: rest[0] as boolean, + }; + } + + const queries = params.queries; + const total = params.total; + + const apiPath = '/apps'; + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Create a new application. + * + * @param {string} params.appId - Application ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param {string} params.name - Application name. + * @param {string[]} params.redirectUris - Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:/oauth), and must not contain a fragment. + * @param {string} params.description - Application description shown to users during OAuth2 consent. + * @param {string} params.clientUri - Application homepage URL shown to users during OAuth2 consent. + * @param {string} params.logoUri - Application logo URL shown to users during OAuth2 consent. + * @param {string} params.privacyPolicyUrl - Application privacy policy URL shown to users during OAuth2 consent. + * @param {string} params.termsUrl - Application terms of service URL shown to users during OAuth2 consent. + * @param {string[]} params.contacts - Application support or security contact emails. Maximum of 100 contacts are allowed. + * @param {string} params.tagline - Application tagline shown to users during OAuth2 consent. + * @param {string[]} params.tags - Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long. + * @param {string[]} params.images - Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed. + * @param {string} params.supportUrl - Application support URL shown to users during OAuth2 consent. + * @param {string} params.dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent. + * @param {string[]} params.postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list. + * @param {boolean} params.enabled - Is application enabled? + * @param {string} params.type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`. + * @param {boolean} params.deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false. + * @param {string} params.teamId - Team unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + create(params: { + appId: string; + name: string; + redirectUris: string[]; + description?: string; + clientUri?: string; + logoUri?: string; + privacyPolicyUrl?: string; + termsUrl?: string; + contacts?: string[]; + tagline?: string; + tags?: string[]; + images?: string[]; + supportUrl?: string; + dataDeletionUrl?: string; + postLogoutRedirectUris?: string[]; + enabled?: boolean; + type?: string; + deviceFlow?: boolean; + teamId?: string; + }): Promise; + /** + * Create a new application. + * + * @param {string} appId - Application ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. + * @param {string} name - Application name. + * @param {string[]} redirectUris - Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:/oauth), and must not contain a fragment. + * @param {string} description - Application description shown to users during OAuth2 consent. + * @param {string} clientUri - Application homepage URL shown to users during OAuth2 consent. + * @param {string} logoUri - Application logo URL shown to users during OAuth2 consent. + * @param {string} privacyPolicyUrl - Application privacy policy URL shown to users during OAuth2 consent. + * @param {string} termsUrl - Application terms of service URL shown to users during OAuth2 consent. + * @param {string[]} contacts - Application support or security contact emails. Maximum of 100 contacts are allowed. + * @param {string} tagline - Application tagline shown to users during OAuth2 consent. + * @param {string[]} tags - Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long. + * @param {string[]} images - Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed. + * @param {string} supportUrl - Application support URL shown to users during OAuth2 consent. + * @param {string} dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent. + * @param {string[]} postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list. + * @param {boolean} enabled - Is application enabled? + * @param {string} type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`. + * @param {boolean} deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false. + * @param {string} teamId - Team unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + create( + appId: string, + name: string, + redirectUris: string[], + description?: string, + clientUri?: string, + logoUri?: string, + privacyPolicyUrl?: string, + termsUrl?: string, + contacts?: string[], + tagline?: string, + tags?: string[], + images?: string[], + supportUrl?: string, + dataDeletionUrl?: string, + postLogoutRedirectUris?: string[], + enabled?: boolean, + type?: string, + deviceFlow?: boolean, + teamId?: string, + ): Promise; + create( + paramsOrFirst: + | { + appId: string; + name: string; + redirectUris: string[]; + description?: string; + clientUri?: string; + logoUri?: string; + privacyPolicyUrl?: string; + termsUrl?: string; + contacts?: string[]; + tagline?: string; + tags?: string[]; + images?: string[]; + supportUrl?: string; + dataDeletionUrl?: string; + postLogoutRedirectUris?: string[]; + enabled?: boolean; + type?: string; + deviceFlow?: boolean; + teamId?: string; + } + | string, + ...rest: [ + string?, + string[]?, + string?, + string?, + string?, + string?, + string?, + string[]?, + string?, + string[]?, + string[]?, + string?, + string?, + string[]?, + boolean?, + string?, + boolean?, + string?, + ] + ): Promise { + let params: { + appId: string; + name: string; + redirectUris: string[]; + description?: string; + clientUri?: string; + logoUri?: string; + privacyPolicyUrl?: string; + termsUrl?: string; + contacts?: string[]; + tagline?: string; + tags?: string[]; + images?: string[]; + supportUrl?: string; + dataDeletionUrl?: string; + postLogoutRedirectUris?: string[]; + enabled?: boolean; + type?: string; + deviceFlow?: boolean; + teamId?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + name: string; + redirectUris: string[]; + description?: string; + clientUri?: string; + logoUri?: string; + privacyPolicyUrl?: string; + termsUrl?: string; + contacts?: string[]; + tagline?: string; + tags?: string[]; + images?: string[]; + supportUrl?: string; + dataDeletionUrl?: string; + postLogoutRedirectUris?: string[]; + enabled?: boolean; + type?: string; + deviceFlow?: boolean; + teamId?: string; + }; + } else { + params = { + appId: paramsOrFirst as string, + name: rest[0] as string, + redirectUris: rest[1] as string[], + description: rest[2] as string, + clientUri: rest[3] as string, + logoUri: rest[4] as string, + privacyPolicyUrl: rest[5] as string, + termsUrl: rest[6] as string, + contacts: rest[7] as string[], + tagline: rest[8] as string, + tags: rest[9] as string[], + images: rest[10] as string[], + supportUrl: rest[11] as string, + dataDeletionUrl: rest[12] as string, + postLogoutRedirectUris: rest[13] as string[], + enabled: rest[14] as boolean, + type: rest[15] as string, + deviceFlow: rest[16] as boolean, + teamId: rest[17] as string, + }; + } + + const appId = params.appId; + const name = params.name; + const redirectUris = params.redirectUris; + const description = params.description; + const clientUri = params.clientUri; + const logoUri = params.logoUri; + const privacyPolicyUrl = params.privacyPolicyUrl; + const termsUrl = params.termsUrl; + const contacts = params.contacts; + const tagline = params.tagline; + const tags = params.tags; + const images = params.images; + const supportUrl = params.supportUrl; + const dataDeletionUrl = params.dataDeletionUrl; + const postLogoutRedirectUris = params.postLogoutRedirectUris; + const enabled = params.enabled; + const type = params.type; + const deviceFlow = params.deviceFlow; + const teamId = params.teamId; + + if (typeof appId === 'undefined') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + if (typeof name === 'undefined') { + throw new AppwriteException('Missing required parameter: "name"'); + } + if (typeof redirectUris === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "redirectUris"', + ); + } + const apiPath = '/apps'; + const payload: Payload = {}; + if (typeof appId !== 'undefined') { + payload['appId'] = appId; + } + if (typeof name !== 'undefined') { + payload['name'] = name; + } + if (typeof description !== 'undefined') { + payload['description'] = description; + } + if (typeof clientUri !== 'undefined') { + payload['clientUri'] = clientUri; + } + if (typeof logoUri !== 'undefined') { + payload['logoUri'] = logoUri; + } + if (typeof privacyPolicyUrl !== 'undefined') { + payload['privacyPolicyUrl'] = privacyPolicyUrl; + } + if (typeof termsUrl !== 'undefined') { + payload['termsUrl'] = termsUrl; + } + if (typeof contacts !== 'undefined') { + payload['contacts'] = contacts; + } + if (typeof tagline !== 'undefined') { + payload['tagline'] = tagline; + } + if (typeof tags !== 'undefined') { + payload['tags'] = tags; + } + if (typeof images !== 'undefined') { + payload['images'] = images; + } + if (typeof supportUrl !== 'undefined') { + payload['supportUrl'] = supportUrl; + } + if (typeof dataDeletionUrl !== 'undefined') { + payload['dataDeletionUrl'] = dataDeletionUrl; + } + if (typeof redirectUris !== 'undefined') { + payload['redirectUris'] = redirectUris; + } + if (typeof postLogoutRedirectUris !== 'undefined') { + payload['postLogoutRedirectUris'] = postLogoutRedirectUris; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + if (typeof type !== 'undefined') { + payload['type'] = type; + } + if (typeof deviceFlow !== 'undefined') { + payload['deviceFlow'] = deviceFlow; + } + if (typeof teamId !== 'undefined') { + payload['teamId'] = teamId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * List scopes an application can request when installed on a team. + * + * @throws {AppwriteException} + * @returns {Promise} + */ + listInstallationScopes(): Promise { + const apiPath = '/apps/scopes/installations'; + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * List scopes an application can request during the OAuth2 flow. + * + * @throws {AppwriteException} + * @returns {Promise} + */ + listOAuth2Scopes(): Promise { + const apiPath = '/apps/scopes/oauth2'; + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Get an application by its unique ID. + * + * @param {string} params.appId - Application unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + get(params: { appId: string }): Promise; + /** + * Get an application by its unique ID. + * + * @param {string} appId - Application unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + get(appId: string): Promise; + get(paramsOrFirst: { appId: string } | string): Promise { + let params: { appId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { appId: string }; + } else { + params = { + appId: paramsOrFirst as string, + }; + } + + const appId = params.appId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + const apiPath = '/apps/{appId}'.replace( + '{appId}', + encodeURIComponent(String(appId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Update an application by its unique ID. + * + * @param {string} params.appId - Application unique ID. + * @param {string} params.name - Application name. + * @param {string} params.description - Application description shown to users during OAuth2 consent. + * @param {string} params.clientUri - Application homepage URL shown to users during OAuth2 consent. + * @param {string} params.logoUri - Application logo URL shown to users during OAuth2 consent. + * @param {string} params.privacyPolicyUrl - Application privacy policy URL shown to users during OAuth2 consent. + * @param {string} params.termsUrl - Application terms of service URL shown to users during OAuth2 consent. + * @param {string[]} params.contacts - Application support or security contact emails. Maximum of 100 contacts are allowed. + * @param {string} params.tagline - Application tagline shown to users during OAuth2 consent. + * @param {string[]} params.tags - Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long. + * @param {string[]} params.images - Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed. + * @param {string} params.supportUrl - Application support URL shown to users during OAuth2 consent. + * @param {string} params.dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent. + * @param {boolean} params.enabled - Is application enabled? + * @param {string[]} params.redirectUris - Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:/oauth), and must not contain a fragment. + * @param {string[]} params.postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list. + * @param {string} params.type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`. + * @param {boolean} params.deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false. + * @param {string[]} params.installationScopes - Scopes the application requests when installed on a team. Only scopes allowed by the project's OAuth2 server installation scopes configuration are accepted; use the list installation scopes endpoint to discover available values. Maximum of 100 scopes are allowed. + * @param {string} params.installationRedirectUrl - URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect. + * @throws {AppwriteException} + * @returns {Promise} + */ + update(params: { + appId: string; + name: string; + description?: string; + clientUri?: string; + logoUri?: string; + privacyPolicyUrl?: string; + termsUrl?: string; + contacts?: string[]; + tagline?: string; + tags?: string[]; + images?: string[]; + supportUrl?: string; + dataDeletionUrl?: string; + enabled?: boolean; + redirectUris?: string[]; + postLogoutRedirectUris?: string[]; + type?: string; + deviceFlow?: boolean; + installationScopes?: string[]; + installationRedirectUrl?: string; + }): Promise; + /** + * Update an application by its unique ID. + * + * @param {string} appId - Application unique ID. + * @param {string} name - Application name. + * @param {string} description - Application description shown to users during OAuth2 consent. + * @param {string} clientUri - Application homepage URL shown to users during OAuth2 consent. + * @param {string} logoUri - Application logo URL shown to users during OAuth2 consent. + * @param {string} privacyPolicyUrl - Application privacy policy URL shown to users during OAuth2 consent. + * @param {string} termsUrl - Application terms of service URL shown to users during OAuth2 consent. + * @param {string[]} contacts - Application support or security contact emails. Maximum of 100 contacts are allowed. + * @param {string} tagline - Application tagline shown to users during OAuth2 consent. + * @param {string[]} tags - Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long. + * @param {string[]} images - Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed. + * @param {string} supportUrl - Application support URL shown to users during OAuth2 consent. + * @param {string} dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent. + * @param {boolean} enabled - Is application enabled? + * @param {string[]} redirectUris - Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:/oauth), and must not contain a fragment. + * @param {string[]} postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list. + * @param {string} type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`. + * @param {boolean} deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false. + * @param {string[]} installationScopes - Scopes the application requests when installed on a team. Only scopes allowed by the project's OAuth2 server installation scopes configuration are accepted; use the list installation scopes endpoint to discover available values. Maximum of 100 scopes are allowed. + * @param {string} installationRedirectUrl - URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + update( + appId: string, + name: string, + description?: string, + clientUri?: string, + logoUri?: string, + privacyPolicyUrl?: string, + termsUrl?: string, + contacts?: string[], + tagline?: string, + tags?: string[], + images?: string[], + supportUrl?: string, + dataDeletionUrl?: string, + enabled?: boolean, + redirectUris?: string[], + postLogoutRedirectUris?: string[], + type?: string, + deviceFlow?: boolean, + installationScopes?: string[], + installationRedirectUrl?: string, + ): Promise; + update( + paramsOrFirst: + | { + appId: string; + name: string; + description?: string; + clientUri?: string; + logoUri?: string; + privacyPolicyUrl?: string; + termsUrl?: string; + contacts?: string[]; + tagline?: string; + tags?: string[]; + images?: string[]; + supportUrl?: string; + dataDeletionUrl?: string; + enabled?: boolean; + redirectUris?: string[]; + postLogoutRedirectUris?: string[]; + type?: string; + deviceFlow?: boolean; + installationScopes?: string[]; + installationRedirectUrl?: string; + } + | string, + ...rest: [ + string?, + string?, + string?, + string?, + string?, + string?, + string[]?, + string?, + string[]?, + string[]?, + string?, + string?, + boolean?, + string[]?, + string[]?, + string?, + boolean?, + string[]?, + string?, + ] + ): Promise { + let params: { + appId: string; + name: string; + description?: string; + clientUri?: string; + logoUri?: string; + privacyPolicyUrl?: string; + termsUrl?: string; + contacts?: string[]; + tagline?: string; + tags?: string[]; + images?: string[]; + supportUrl?: string; + dataDeletionUrl?: string; + enabled?: boolean; + redirectUris?: string[]; + postLogoutRedirectUris?: string[]; + type?: string; + deviceFlow?: boolean; + installationScopes?: string[]; + installationRedirectUrl?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + name: string; + description?: string; + clientUri?: string; + logoUri?: string; + privacyPolicyUrl?: string; + termsUrl?: string; + contacts?: string[]; + tagline?: string; + tags?: string[]; + images?: string[]; + supportUrl?: string; + dataDeletionUrl?: string; + enabled?: boolean; + redirectUris?: string[]; + postLogoutRedirectUris?: string[]; + type?: string; + deviceFlow?: boolean; + installationScopes?: string[]; + installationRedirectUrl?: string; + }; + } else { + params = { + appId: paramsOrFirst as string, + name: rest[0] as string, + description: rest[1] as string, + clientUri: rest[2] as string, + logoUri: rest[3] as string, + privacyPolicyUrl: rest[4] as string, + termsUrl: rest[5] as string, + contacts: rest[6] as string[], + tagline: rest[7] as string, + tags: rest[8] as string[], + images: rest[9] as string[], + supportUrl: rest[10] as string, + dataDeletionUrl: rest[11] as string, + enabled: rest[12] as boolean, + redirectUris: rest[13] as string[], + postLogoutRedirectUris: rest[14] as string[], + type: rest[15] as string, + deviceFlow: rest[16] as boolean, + installationScopes: rest[17] as string[], + installationRedirectUrl: rest[18] as string, + }; + } + + const appId = params.appId; + const name = params.name; + const description = params.description; + const clientUri = params.clientUri; + const logoUri = params.logoUri; + const privacyPolicyUrl = params.privacyPolicyUrl; + const termsUrl = params.termsUrl; + const contacts = params.contacts; + const tagline = params.tagline; + const tags = params.tags; + const images = params.images; + const supportUrl = params.supportUrl; + const dataDeletionUrl = params.dataDeletionUrl; + const enabled = params.enabled; + const redirectUris = params.redirectUris; + const postLogoutRedirectUris = params.postLogoutRedirectUris; + const type = params.type; + const deviceFlow = params.deviceFlow; + const installationScopes = params.installationScopes; + const installationRedirectUrl = params.installationRedirectUrl; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + if (typeof name === 'undefined') { + throw new AppwriteException('Missing required parameter: "name"'); + } + const apiPath = '/apps/{appId}'.replace( + '{appId}', + encodeURIComponent(String(appId)), + ); + const payload: Payload = {}; + if (typeof name !== 'undefined') { + payload['name'] = name; + } + if (typeof description !== 'undefined') { + payload['description'] = description; + } + if (typeof clientUri !== 'undefined') { + payload['clientUri'] = clientUri; + } + if (typeof logoUri !== 'undefined') { + payload['logoUri'] = logoUri; + } + if (typeof privacyPolicyUrl !== 'undefined') { + payload['privacyPolicyUrl'] = privacyPolicyUrl; + } + if (typeof termsUrl !== 'undefined') { + payload['termsUrl'] = termsUrl; + } + if (typeof contacts !== 'undefined') { + payload['contacts'] = contacts; + } + if (typeof tagline !== 'undefined') { + payload['tagline'] = tagline; + } + if (typeof tags !== 'undefined') { + payload['tags'] = tags; + } + if (typeof images !== 'undefined') { + payload['images'] = images; + } + if (typeof supportUrl !== 'undefined') { + payload['supportUrl'] = supportUrl; + } + if (typeof dataDeletionUrl !== 'undefined') { + payload['dataDeletionUrl'] = dataDeletionUrl; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + if (typeof redirectUris !== 'undefined') { + payload['redirectUris'] = redirectUris; + } + if (typeof postLogoutRedirectUris !== 'undefined') { + payload['postLogoutRedirectUris'] = postLogoutRedirectUris; + } + if (typeof type !== 'undefined') { + payload['type'] = type; + } + if (typeof deviceFlow !== 'undefined') { + payload['deviceFlow'] = deviceFlow; + } + if (typeof installationScopes !== 'undefined') { + payload['installationScopes'] = installationScopes; + } + if (typeof installationRedirectUrl !== 'undefined') { + payload['installationRedirectUrl'] = installationRedirectUrl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('put', uri, apiHeaders, payload); + } + + /** + * Delete an application by its unique ID. + * + * @param {string} params.appId - Application unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + delete(params: { appId: string }): Promise<{}>; + /** + * Delete an application by its unique ID. + * + * @param {string} appId - Application unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + delete(appId: string): Promise<{}>; + delete(paramsOrFirst: { appId: string } | string): Promise<{}> { + let params: { appId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { appId: string }; + } else { + params = { + appId: paramsOrFirst as string, + }; + } + + const appId = params.appId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + const apiPath = '/apps/{appId}'.replace( + '{appId}', + encodeURIComponent(String(appId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } + + /** + * List installations of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. + * + * @param {string} params.appId - Application unique ID. + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + */ + listInstallations(params: { + appId: string; + queries?: string[]; + total?: boolean; + }): Promise; + /** + * List installations of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. + * + * @param {string} appId - Application unique ID. + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listInstallations( + appId: string, + queries?: string[], + total?: boolean, + ): Promise; + listInstallations( + paramsOrFirst: + { appId: string; queries?: string[]; total?: boolean } | string, + ...rest: [string[]?, boolean?] + ): Promise { + let params: { appId: string; queries?: string[]; total?: boolean }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + queries?: string[]; + total?: boolean; + }; + } else { + params = { + appId: paramsOrFirst as string, + queries: rest[0] as string[], + total: rest[1] as boolean, + }; + } + + const appId = params.appId; + const queries = params.queries; + const total = params.total; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + const apiPath = '/apps/{appId}/installations'.replace( + '{appId}', + encodeURIComponent(String(appId)), + ); + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Get an installation of an application by its unique ID. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. + * + * @param {string} params.appId - Application unique ID. + * @param {string} params.installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + getInstallation(params: { + appId: string; + installationId: string; + }): Promise; + /** + * Get an installation of an application by its unique ID. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. + * + * @param {string} appId - Application unique ID. + * @param {string} installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getInstallation( + appId: string, + installationId: string, + ): Promise; + getInstallation( + paramsOrFirst: { appId: string; installationId: string } | string, + ...rest: [string?] + ): Promise { + let params: { appId: string; installationId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + installationId: string; + }; + } else { + params = { + appId: paramsOrFirst as string, + installationId: rest[0] as string, + }; + } + + const appId = params.appId; + const installationId = params.installationId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + if (typeof installationId === 'undefined' || installationId === '') { + throw new AppwriteException( + 'Missing required parameter: "installationId"', + ); + } + const apiPath = '/apps/{appId}/installations/{installationId}' + .replace('{appId}', encodeURIComponent(String(appId))) + .replace( + '{installationId}', + encodeURIComponent(String(installationId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Delete an installation of an application by its unique ID. Requires a caller with update access to the app. Previously issued installation access tokens are revoked. + * + * @param {string} params.appId - Application unique ID. + * @param {string} params.installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteInstallation(params: { + appId: string; + installationId: string; + }): Promise<{}>; + /** + * Delete an installation of an application by its unique ID. Requires a caller with update access to the app. Previously issued installation access tokens are revoked. + * + * @param {string} appId - Application unique ID. + * @param {string} installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteInstallation(appId: string, installationId: string): Promise<{}>; + deleteInstallation( + paramsOrFirst: { appId: string; installationId: string } | string, + ...rest: [string?] + ): Promise<{}> { + let params: { appId: string; installationId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + installationId: string; + }; + } else { + params = { + appId: paramsOrFirst as string, + installationId: rest[0] as string, + }; + } + + const appId = params.appId; + const installationId = params.installationId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + if (typeof installationId === 'undefined' || installationId === '') { + throw new AppwriteException( + 'Missing required parameter: "installationId"', + ); + } + const apiPath = '/apps/{appId}/installations/{installationId}' + .replace('{appId}', encodeURIComponent(String(appId))) + .replace( + '{installationId}', + encodeURIComponent(String(installationId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } + + /** + * Create a token for an installation of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. The returned token carries the scopes and authorization details granted to the installation, and can be used as an `Authorization: Bearer` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted. + * + * @param {string} params.appId - Application unique ID. + * @param {string} params.installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + createInstallationToken(params: { + appId: string; + installationId: string; + }): Promise; + /** + * Create a token for an installation of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. The returned token carries the scopes and authorization details granted to the installation, and can be used as an `Authorization: Bearer` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted. + * + * @param {string} appId - Application unique ID. + * @param {string} installationId - Installation unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createInstallationToken( + appId: string, + installationId: string, + ): Promise; + createInstallationToken( + paramsOrFirst: { appId: string; installationId: string } | string, + ...rest: [string?] + ): Promise { + let params: { appId: string; installationId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + installationId: string; + }; + } else { + params = { + appId: paramsOrFirst as string, + installationId: rest[0] as string, + }; + } + + const appId = params.appId; + const installationId = params.installationId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + if (typeof installationId === 'undefined' || installationId === '') { + throw new AppwriteException( + 'Missing required parameter: "installationId"', + ); + } + const apiPath = '/apps/{appId}/installations/{installationId}/tokens' + .replace('{appId}', encodeURIComponent(String(appId))) + .replace( + '{installationId}', + encodeURIComponent(String(installationId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * List app keys for an application. + * + * @param {string} params.appId - Application unique ID. + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + */ + listKeys(params: { + appId: string; + queries?: string[]; + total?: boolean; + }): Promise; + /** + * List app keys for an application. + * + * @param {string} appId - Application unique ID. + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listKeys( + appId: string, + queries?: string[], + total?: boolean, + ): Promise; + listKeys( + paramsOrFirst: + { appId: string; queries?: string[]; total?: boolean } | string, + ...rest: [string[]?, boolean?] + ): Promise { + let params: { appId: string; queries?: string[]; total?: boolean }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + queries?: string[]; + total?: boolean; + }; + } else { + params = { + appId: paramsOrFirst as string, + queries: rest[0] as string[], + total: rest[1] as boolean, + }; + } + + const appId = params.appId; + const queries = params.queries; + const total = params.total; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + const apiPath = '/apps/{appId}/keys'.replace( + '{appId}', + encodeURIComponent(String(appId)), + ); + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens. + * + * @param {string} params.appId - Application unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + createKey(params: { appId: string }): Promise; + /** + * Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens. + * + * @param {string} appId - Application unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createKey(appId: string): Promise; + createKey( + paramsOrFirst: { appId: string } | string, + ): Promise { + let params: { appId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { appId: string }; + } else { + params = { + appId: paramsOrFirst as string, + }; + } + + const appId = params.appId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + const apiPath = '/apps/{appId}/keys'.replace( + '{appId}', + encodeURIComponent(String(appId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get an app key by its unique ID. + * + * @param {string} params.appId - Application unique ID. + * @param {string} params.keyId - App key unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + getKey(params: { appId: string; keyId: string }): Promise; + /** + * Get an app key by its unique ID. + * + * @param {string} appId - Application unique ID. + * @param {string} keyId - App key unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getKey(appId: string, keyId: string): Promise; + getKey( + paramsOrFirst: { appId: string; keyId: string } | string, + ...rest: [string?] + ): Promise { + let params: { appId: string; keyId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { appId: string; keyId: string }; + } else { + params = { + appId: paramsOrFirst as string, + keyId: rest[0] as string, + }; + } + + const appId = params.appId; + const keyId = params.keyId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + if (typeof keyId === 'undefined' || keyId === '') { + throw new AppwriteException('Missing required parameter: "keyId"'); + } + const apiPath = '/apps/{appId}/keys/{keyId}' + .replace('{appId}', encodeURIComponent(String(appId))) + .replace('{keyId}', encodeURIComponent(String(keyId))); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Delete an app key by its unique ID. + * + * @param {string} params.appId - Application unique ID. + * @param {string} params.keyId - App key unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteKey(params: { appId: string; keyId: string }): Promise<{}>; + /** + * Delete an app key by its unique ID. + * + * @param {string} appId - Application unique ID. + * @param {string} keyId - App key unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteKey(appId: string, keyId: string): Promise<{}>; + deleteKey( + paramsOrFirst: { appId: string; keyId: string } | string, + ...rest: [string?] + ): Promise<{}> { + let params: { appId: string; keyId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { appId: string; keyId: string }; + } else { + params = { + appId: paramsOrFirst as string, + keyId: rest[0] as string, + }; + } + + const appId = params.appId; + const keyId = params.keyId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + if (typeof keyId === 'undefined' || keyId === '') { + throw new AppwriteException('Missing required parameter: "keyId"'); + } + const apiPath = '/apps/{appId}/keys/{keyId}' + .replace('{appId}', encodeURIComponent(String(appId))) + .replace('{keyId}', encodeURIComponent(String(keyId))); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } + + /** + * List client secrets for an application. + * + * @param {string} params.appId - Application unique ID. + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + */ + listSecrets(params: { + appId: string; + queries?: string[]; + total?: boolean; + }): Promise; + /** + * List client secrets for an application. + * + * @param {string} appId - Application unique ID. + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listSecrets( + appId: string, + queries?: string[], + total?: boolean, + ): Promise; + listSecrets( + paramsOrFirst: + { appId: string; queries?: string[]; total?: boolean } | string, + ...rest: [string[]?, boolean?] + ): Promise { + let params: { appId: string; queries?: string[]; total?: boolean }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + queries?: string[]; + total?: boolean; + }; + } else { + params = { + appId: paramsOrFirst as string, + queries: rest[0] as string[], + total: rest[1] as boolean, + }; + } + + const appId = params.appId; + const queries = params.queries; + const total = params.total; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + const apiPath = '/apps/{appId}/secrets'.replace( + '{appId}', + encodeURIComponent(String(appId)), + ); + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof total !== 'undefined') { + payload['total'] = total; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Create a new client secret for an application. + * + * @param {string} params.appId - Application unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + createSecret(params: { appId: string }): Promise; + /** + * Create a new client secret for an application. + * + * @param {string} appId - Application unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createSecret(appId: string): Promise; + createSecret( + paramsOrFirst: { appId: string } | string, + ): Promise { + let params: { appId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { appId: string }; + } else { + params = { + appId: paramsOrFirst as string, + }; + } + + const appId = params.appId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + const apiPath = '/apps/{appId}/secrets'.replace( + '{appId}', + encodeURIComponent(String(appId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get an application client secret by its unique ID. + * + * @param {string} params.appId - Application unique ID. + * @param {string} params.secretId - Secret unique ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + getSecret(params: { + appId: string; + secretId: string; + }): Promise; + /** + * Get an application client secret by its unique ID. + * + * @param {string} appId - Application unique ID. + * @param {string} secretId - Secret unique ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getSecret(appId: string, secretId: string): Promise; + getSecret( + paramsOrFirst: { appId: string; secretId: string } | string, + ...rest: [string?] + ): Promise { + let params: { appId: string; secretId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + secretId: string; + }; + } else { + params = { + appId: paramsOrFirst as string, + secretId: rest[0] as string, + }; + } + + const appId = params.appId; + const secretId = params.secretId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + if (typeof secretId === 'undefined' || secretId === '') { + throw new AppwriteException( + 'Missing required parameter: "secretId"', + ); + } + const apiPath = '/apps/{appId}/secrets/{secretId}' + .replace('{appId}', encodeURIComponent(String(appId))) + .replace('{secretId}', encodeURIComponent(String(secretId))); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Delete an application client secret by its unique ID. + * + * @param {string} params.appId - Application unique ID. + * @param {string} params.secretId - Secret unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteSecret(params: { appId: string; secretId: string }): Promise<{}>; + /** + * Delete an application client secret by its unique ID. + * + * @param {string} appId - Application unique ID. + * @param {string} secretId - Secret unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteSecret(appId: string, secretId: string): Promise<{}>; + deleteSecret( + paramsOrFirst: { appId: string; secretId: string } | string, + ...rest: [string?] + ): Promise<{}> { + let params: { appId: string; secretId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + appId: string; + secretId: string; + }; + } else { + params = { + appId: paramsOrFirst as string, + secretId: rest[0] as string, + }; + } + + const appId = params.appId; + const secretId = params.secretId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + if (typeof secretId === 'undefined' || secretId === '') { + throw new AppwriteException( + 'Missing required parameter: "secretId"', + ); + } + const apiPath = '/apps/{appId}/secrets/{secretId}' + .replace('{appId}', encodeURIComponent(String(appId))) + .replace('{secretId}', encodeURIComponent(String(secretId))); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } + + /** + * Transfer an application to another team by its unique ID. + * + * @param {string} params.appId - Application unique ID. + * @param {string} params.teamId - Team ID of the team to transfer application to. + * @throws {AppwriteException} + * @returns {Promise} + */ + updateTeam(params: { appId: string; teamId: string }): Promise; + /** + * Transfer an application to another team by its unique ID. + * + * @param {string} appId - Application unique ID. + * @param {string} teamId - Team ID of the team to transfer application to. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateTeam(appId: string, teamId: string): Promise; + updateTeam( + paramsOrFirst: { appId: string; teamId: string } | string, + ...rest: [string?] + ): Promise { + let params: { appId: string; teamId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { appId: string; teamId: string }; + } else { + params = { + appId: paramsOrFirst as string, + teamId: rest[0] as string, + }; + } + + const appId = params.appId; + const teamId = params.teamId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + if (typeof teamId === 'undefined') { + throw new AppwriteException('Missing required parameter: "teamId"'); + } + const apiPath = '/apps/{appId}/team'.replace( + '{appId}', + encodeURIComponent(String(appId)), + ); + const payload: Payload = {}; + if (typeof teamId !== 'undefined') { + payload['teamId'] = teamId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('patch', uri, apiHeaders, payload); + } + + /** + * Revoke all tokens for an application by its unique ID. + * + * @param {string} params.appId - Application unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteTokens(params: { appId: string }): Promise<{}>; + /** + * Revoke all tokens for an application by its unique ID. + * + * @param {string} appId - Application unique ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteTokens(appId: string): Promise<{}>; + deleteTokens(paramsOrFirst: { appId: string } | string): Promise<{}> { + let params: { appId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { appId: string }; + } else { + params = { + appId: paramsOrFirst as string, + }; + } + + const appId = params.appId; + + if (typeof appId === 'undefined' || appId === '') { + throw new AppwriteException('Missing required parameter: "appId"'); + } + const apiPath = '/apps/{appId}/tokens'.replace( + '{appId}', + encodeURIComponent(String(appId)), + ); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('delete', uri, apiHeaders, payload); + } +} diff --git a/src/services/oauth-2.ts b/src/services/oauth-2.ts new file mode 100644 index 00000000..921f6903 --- /dev/null +++ b/src/services/oauth-2.ts @@ -0,0 +1,1822 @@ +import { AppwriteException, Client, type Payload } from '../client'; +import type { Models } from '../models'; + +export class Oauth2 { + client: Client; + + constructor(client: Client) { + this.client = client; + } + + /** + * Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect. + * + * @param {string} params.grantId - Grant ID made during authorization, provided to consent screen in URL search params. + * @param {string} params.authorizationDetails - Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details. + * @param {string} params.scope - Space-separated scopes the user consented to. Must be a subset of the scopes originally requested; identity scopes such as `openid` are always retained. Optional; omit to keep the originally requested scopes. + * @throws {AppwriteException} + * @returns {Promise} + */ + approve(params: { + grantId: string; + authorizationDetails?: string; + scope?: string; + }): Promise; + /** + * Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect. + * + * @param {string} grantId - Grant ID made during authorization, provided to consent screen in URL search params. + * @param {string} authorizationDetails - Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details. + * @param {string} scope - Space-separated scopes the user consented to. Must be a subset of the scopes originally requested; identity scopes such as `openid` are always retained. Optional; omit to keep the originally requested scopes. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + approve( + grantId: string, + authorizationDetails?: string, + scope?: string, + ): Promise; + approve( + paramsOrFirst: + | { grantId: string; authorizationDetails?: string; scope?: string } + | string, + ...rest: [string?, string?] + ): Promise { + let params: { + grantId: string; + authorizationDetails?: string; + scope?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + grantId: string; + authorizationDetails?: string; + scope?: string; + }; + } else { + params = { + grantId: paramsOrFirst as string, + authorizationDetails: rest[0] as string, + scope: rest[1] as string, + }; + } + + const grantId = params.grantId; + const authorizationDetails = params.authorizationDetails; + const scope = params.scope; + + if (typeof grantId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "grantId"', + ); + } + const apiPath = '/oauth2/{project_id}/approve'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof grantId !== 'undefined') { + payload['grant_id'] = grantId; + } + if (typeof authorizationDetails !== 'undefined') { + payload['authorization_details'] = authorizationDetails; + } + if (typeof scope !== 'undefined') { + payload['scope'] = scope; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect. + * + * @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} params.redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not. + * @param {string} params.responseType - OAuth2 / OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow). + * @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`. + * @param {string} params.state - OAuth2 state. You receive this back in the redirect URI. + * @param {string} params.nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`. + * @param {string} params.codeChallenge - PKCE code challenge. Required when OAuth2 app is public. + * @param {string} params.codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public. + * @param {string} params.prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account. + * @param {number} params.maxAge - OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required. + * @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields + * @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment. + * @param {string} params.audience - Compatibility alias for a single OAuth2 resource indicator URI. + * @param {string} params.requestUri - OAuth2 authorization request handle returned by the pushed authorization request endpoint. + * @throws {AppwriteException} + * @returns {Promise} + */ + authorize(params?: { + clientId?: string; + redirectUri?: string; + responseType?: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + requestUri?: string; + }): Promise; + /** + * Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect. + * + * @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not. + * @param {string} responseType - OAuth2 / OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow). + * @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`. + * @param {string} state - OAuth2 state. You receive this back in the redirect URI. + * @param {string} nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`. + * @param {string} codeChallenge - PKCE code challenge. Required when OAuth2 app is public. + * @param {string} codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public. + * @param {string} prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account. + * @param {number} maxAge - OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required. + * @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields + * @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment. + * @param {string} audience - Compatibility alias for a single OAuth2 resource indicator URI. + * @param {string} requestUri - OAuth2 authorization request handle returned by the pushed authorization request endpoint. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + authorize( + clientId?: string, + redirectUri?: string, + responseType?: string, + scope?: string, + state?: string, + nonce?: string, + codeChallenge?: string, + codeChallengeMethod?: string, + prompt?: string, + maxAge?: number, + authorizationDetails?: string, + resource?: string, + audience?: string, + requestUri?: string, + ): Promise; + authorize( + paramsOrFirst?: + | { + clientId?: string; + redirectUri?: string; + responseType?: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + requestUri?: string; + } + | string, + ...rest: [ + string?, + string?, + string?, + string?, + string?, + string?, + string?, + string?, + number?, + string?, + string?, + string?, + string?, + ] + ): Promise { + let params: { + clientId?: string; + redirectUri?: string; + responseType?: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + requestUri?: string; + }; + + if ( + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + clientId?: string; + redirectUri?: string; + responseType?: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + requestUri?: string; + }; + } else { + params = { + clientId: paramsOrFirst as string, + redirectUri: rest[0] as string, + responseType: rest[1] as string, + scope: rest[2] as string, + state: rest[3] as string, + nonce: rest[4] as string, + codeChallenge: rest[5] as string, + codeChallengeMethod: rest[6] as string, + prompt: rest[7] as string, + maxAge: rest[8] as number, + authorizationDetails: rest[9] as string, + resource: rest[10] as string, + audience: rest[11] as string, + requestUri: rest[12] as string, + }; + } + + const clientId = params.clientId; + const redirectUri = params.redirectUri; + const responseType = params.responseType; + const scope = params.scope; + const state = params.state; + const nonce = params.nonce; + const codeChallenge = params.codeChallenge; + const codeChallengeMethod = params.codeChallengeMethod; + const prompt = params.prompt; + const maxAge = params.maxAge; + const authorizationDetails = params.authorizationDetails; + const resource = params.resource; + const audience = params.audience; + const requestUri = params.requestUri; + + const apiPath = '/oauth2/{project_id}/authorize'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof clientId !== 'undefined') { + payload['client_id'] = clientId; + } + if (typeof redirectUri !== 'undefined') { + payload['redirect_uri'] = redirectUri; + } + if (typeof responseType !== 'undefined') { + payload['response_type'] = responseType; + } + if (typeof scope !== 'undefined') { + payload['scope'] = scope; + } + if (typeof state !== 'undefined') { + payload['state'] = state; + } + if (typeof nonce !== 'undefined') { + payload['nonce'] = nonce; + } + if (typeof codeChallenge !== 'undefined') { + payload['code_challenge'] = codeChallenge; + } + if (typeof codeChallengeMethod !== 'undefined') { + payload['code_challenge_method'] = codeChallengeMethod; + } + if (typeof prompt !== 'undefined') { + payload['prompt'] = prompt; + } + if (typeof maxAge !== 'undefined') { + payload['max_age'] = maxAge; + } + if (typeof authorizationDetails !== 'undefined') { + payload['authorization_details'] = authorizationDetails; + } + if (typeof resource !== 'undefined') { + payload['resource'] = resource; + } + if (typeof audience !== 'undefined') { + payload['audience'] = audience; + } + if (typeof requestUri !== 'undefined') { + payload['request_uri'] = requestUri; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect. + * + * @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} params.redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not. + * @param {string} params.responseType - OAuth2 / OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow). + * @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`. + * @param {string} params.state - OAuth2 state. You receive this back in the redirect URI. + * @param {string} params.nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`. + * @param {string} params.codeChallenge - PKCE code challenge. Required when OAuth2 app is public. + * @param {string} params.codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public. + * @param {string} params.prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account. + * @param {number} params.maxAge - OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required. + * @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields + * @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment. + * @param {string} params.audience - Compatibility alias for a single OAuth2 resource indicator URI. + * @param {string} params.requestUri - OAuth2 authorization request handle returned by the pushed authorization request endpoint. + * @throws {AppwriteException} + * @returns {Promise} + */ + authorizePost(params?: { + clientId?: string; + redirectUri?: string; + responseType?: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + requestUri?: string; + }): Promise; + /** + * Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect. + * + * @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not. + * @param {string} responseType - OAuth2 / OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow). + * @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`. + * @param {string} state - OAuth2 state. You receive this back in the redirect URI. + * @param {string} nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`. + * @param {string} codeChallenge - PKCE code challenge. Required when OAuth2 app is public. + * @param {string} codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public. + * @param {string} prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account. + * @param {number} maxAge - OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required. + * @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields + * @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment. + * @param {string} audience - Compatibility alias for a single OAuth2 resource indicator URI. + * @param {string} requestUri - OAuth2 authorization request handle returned by the pushed authorization request endpoint. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + authorizePost( + clientId?: string, + redirectUri?: string, + responseType?: string, + scope?: string, + state?: string, + nonce?: string, + codeChallenge?: string, + codeChallengeMethod?: string, + prompt?: string, + maxAge?: number, + authorizationDetails?: string, + resource?: string, + audience?: string, + requestUri?: string, + ): Promise; + authorizePost( + paramsOrFirst?: + | { + clientId?: string; + redirectUri?: string; + responseType?: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + requestUri?: string; + } + | string, + ...rest: [ + string?, + string?, + string?, + string?, + string?, + string?, + string?, + string?, + number?, + string?, + string?, + string?, + string?, + ] + ): Promise { + let params: { + clientId?: string; + redirectUri?: string; + responseType?: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + requestUri?: string; + }; + + if ( + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + clientId?: string; + redirectUri?: string; + responseType?: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + requestUri?: string; + }; + } else { + params = { + clientId: paramsOrFirst as string, + redirectUri: rest[0] as string, + responseType: rest[1] as string, + scope: rest[2] as string, + state: rest[3] as string, + nonce: rest[4] as string, + codeChallenge: rest[5] as string, + codeChallengeMethod: rest[6] as string, + prompt: rest[7] as string, + maxAge: rest[8] as number, + authorizationDetails: rest[9] as string, + resource: rest[10] as string, + audience: rest[11] as string, + requestUri: rest[12] as string, + }; + } + + const clientId = params.clientId; + const redirectUri = params.redirectUri; + const responseType = params.responseType; + const scope = params.scope; + const state = params.state; + const nonce = params.nonce; + const codeChallenge = params.codeChallenge; + const codeChallengeMethod = params.codeChallengeMethod; + const prompt = params.prompt; + const maxAge = params.maxAge; + const authorizationDetails = params.authorizationDetails; + const resource = params.resource; + const audience = params.audience; + const requestUri = params.requestUri; + + const apiPath = '/oauth2/{project_id}/authorize'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof clientId !== 'undefined') { + payload['client_id'] = clientId; + } + if (typeof redirectUri !== 'undefined') { + payload['redirect_uri'] = redirectUri; + } + if (typeof responseType !== 'undefined') { + payload['response_type'] = responseType; + } + if (typeof scope !== 'undefined') { + payload['scope'] = scope; + } + if (typeof state !== 'undefined') { + payload['state'] = state; + } + if (typeof nonce !== 'undefined') { + payload['nonce'] = nonce; + } + if (typeof codeChallenge !== 'undefined') { + payload['code_challenge'] = codeChallenge; + } + if (typeof codeChallengeMethod !== 'undefined') { + payload['code_challenge_method'] = codeChallengeMethod; + } + if (typeof prompt !== 'undefined') { + payload['prompt'] = prompt; + } + if (typeof maxAge !== 'undefined') { + payload['max_age'] = maxAge; + } + if (typeof authorizationDetails !== 'undefined') { + payload['authorization_details'] = authorizationDetails; + } + if (typeof resource !== 'undefined') { + payload['resource'] = resource; + } + if (typeof audience !== 'undefined') { + payload['audience'] = audience; + } + if (typeof requestUri !== 'undefined') { + payload['request_uri'] = requestUri; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval. + * + * @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`. + * @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields + * @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment. + * @param {string} params.audience - Compatibility alias for a single OAuth2 resource indicator URI. + * @throws {AppwriteException} + * @returns {Promise} + */ + createDeviceAuthorization(params?: { + clientId?: string; + scope?: string; + authorizationDetails?: string; + resource?: string; + audience?: string; + }): Promise; + /** + * Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval. + * + * @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`. + * @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields + * @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment. + * @param {string} audience - Compatibility alias for a single OAuth2 resource indicator URI. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createDeviceAuthorization( + clientId?: string, + scope?: string, + authorizationDetails?: string, + resource?: string, + audience?: string, + ): Promise; + createDeviceAuthorization( + paramsOrFirst?: + | { + clientId?: string; + scope?: string; + authorizationDetails?: string; + resource?: string; + audience?: string; + } + | string, + ...rest: [string?, string?, string?, string?] + ): Promise { + let params: { + clientId?: string; + scope?: string; + authorizationDetails?: string; + resource?: string; + audience?: string; + }; + + if ( + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + clientId?: string; + scope?: string; + authorizationDetails?: string; + resource?: string; + audience?: string; + }; + } else { + params = { + clientId: paramsOrFirst as string, + scope: rest[0] as string, + authorizationDetails: rest[1] as string, + resource: rest[2] as string, + audience: rest[3] as string, + }; + } + + const clientId = params.clientId; + const scope = params.scope; + const authorizationDetails = params.authorizationDetails; + const resource = params.resource; + const audience = params.audience; + + const apiPath = '/oauth2/{project_id}/device_authorization'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof clientId !== 'undefined') { + payload['client_id'] = clientId; + } + if (typeof scope !== 'undefined') { + payload['scope'] = scope; + } + if (typeof authorizationDetails !== 'undefined') { + payload['authorization_details'] = authorizationDetails; + } + if (typeof resource !== 'undefined') { + payload['resource'] = resource; + } + if (typeof audience !== 'undefined') { + payload['audience'] = audience; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow. + * + * @param {string} params.userCode - User code displayed on the device. + * @throws {AppwriteException} + * @returns {Promise} + */ + createGrant(params: { userCode: string }): Promise; + /** + * Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow. + * + * @param {string} userCode - User code displayed on the device. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createGrant(userCode: string): Promise; + createGrant( + paramsOrFirst: { userCode: string } | string, + ): Promise { + let params: { userCode: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { userCode: string }; + } else { + params = { + userCode: paramsOrFirst as string, + }; + } + + const userCode = params.userCode; + + if (typeof userCode === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "userCode"', + ); + } + const apiPath = '/oauth2/{project_id}/grants'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof userCode !== 'undefined') { + payload['user_code'] = userCode; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK. + * + * @param {string} params.grantId - Grant ID made during authorization, provided to consent screen in URL search params. + * @throws {AppwriteException} + * @returns {Promise} + */ + getGrant(params: { grantId: string }): Promise; + /** + * Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK. + * + * @param {string} grantId - Grant ID made during authorization, provided to consent screen in URL search params. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getGrant(grantId: string): Promise; + getGrant( + paramsOrFirst: { grantId: string } | string, + ): Promise { + let params: { grantId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { grantId: string }; + } else { + params = { + grantId: paramsOrFirst as string, + }; + } + + const grantId = params.grantId; + + if (typeof grantId === 'undefined' || grantId === '') { + throw new AppwriteException( + 'Missing required parameter: "grantId"', + ); + } + const apiPath = '/oauth2/{project_id}/grants/{grant_id}' + .replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ) + .replace('{grant_id}', encodeURIComponent(String(grantId))); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app. + * + * @param {string} params.idTokenHint - ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored. + * @param {string} params.logoutHint - Hint about the user that is logging out. Accepted for OIDC compatibility. + * @param {string} params.clientId - OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app. + * @param {string} params.postLogoutRedirectUri - URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`. + * @param {string} params.state - Opaque value passed back unchanged in the `state` query param of the post-logout redirect. + * @param {string} params.uiLocales - Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + logout(params?: { + idTokenHint?: string; + logoutHint?: string; + clientId?: string; + postLogoutRedirectUri?: string; + state?: string; + uiLocales?: string; + }): Promise<{}>; + /** + * OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app. + * + * @param {string} idTokenHint - ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored. + * @param {string} logoutHint - Hint about the user that is logging out. Accepted for OIDC compatibility. + * @param {string} clientId - OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app. + * @param {string} postLogoutRedirectUri - URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`. + * @param {string} state - Opaque value passed back unchanged in the `state` query param of the post-logout redirect. + * @param {string} uiLocales - Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + logout( + idTokenHint?: string, + logoutHint?: string, + clientId?: string, + postLogoutRedirectUri?: string, + state?: string, + uiLocales?: string, + ): Promise<{}>; + logout( + paramsOrFirst?: + | { + idTokenHint?: string; + logoutHint?: string; + clientId?: string; + postLogoutRedirectUri?: string; + state?: string; + uiLocales?: string; + } + | string, + ...rest: [string?, string?, string?, string?, string?] + ): Promise<{}> { + let params: { + idTokenHint?: string; + logoutHint?: string; + clientId?: string; + postLogoutRedirectUri?: string; + state?: string; + uiLocales?: string; + }; + + if ( + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + idTokenHint?: string; + logoutHint?: string; + clientId?: string; + postLogoutRedirectUri?: string; + state?: string; + uiLocales?: string; + }; + } else { + params = { + idTokenHint: paramsOrFirst as string, + logoutHint: rest[0] as string, + clientId: rest[1] as string, + postLogoutRedirectUri: rest[2] as string, + state: rest[3] as string, + uiLocales: rest[4] as string, + }; + } + + const idTokenHint = params.idTokenHint; + const logoutHint = params.logoutHint; + const clientId = params.clientId; + const postLogoutRedirectUri = params.postLogoutRedirectUri; + const state = params.state; + const uiLocales = params.uiLocales; + + const apiPath = '/oauth2/{project_id}/logout'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof idTokenHint !== 'undefined') { + payload['id_token_hint'] = idTokenHint; + } + if (typeof logoutHint !== 'undefined') { + payload['logout_hint'] = logoutHint; + } + if (typeof clientId !== 'undefined') { + payload['client_id'] = clientId; + } + if (typeof postLogoutRedirectUri !== 'undefined') { + payload['post_logout_redirect_uri'] = postLogoutRedirectUri; + } + if (typeof state !== 'undefined') { + payload['state'] = state; + } + if (typeof uiLocales !== 'undefined') { + payload['ui_locales'] = uiLocales; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app. + * + * @param {string} params.idTokenHint - ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored. + * @param {string} params.logoutHint - Hint about the user that is logging out. Accepted for OIDC compatibility. + * @param {string} params.clientId - OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app. + * @param {string} params.postLogoutRedirectUri - URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`. + * @param {string} params.state - Opaque value passed back unchanged in the `state` query param of the post-logout redirect. + * @param {string} params.uiLocales - Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + logoutPost(params?: { + idTokenHint?: string; + logoutHint?: string; + clientId?: string; + postLogoutRedirectUri?: string; + state?: string; + uiLocales?: string; + }): Promise<{}>; + /** + * OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app. + * + * @param {string} idTokenHint - ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored. + * @param {string} logoutHint - Hint about the user that is logging out. Accepted for OIDC compatibility. + * @param {string} clientId - OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app. + * @param {string} postLogoutRedirectUri - URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`. + * @param {string} state - Opaque value passed back unchanged in the `state` query param of the post-logout redirect. + * @param {string} uiLocales - Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + logoutPost( + idTokenHint?: string, + logoutHint?: string, + clientId?: string, + postLogoutRedirectUri?: string, + state?: string, + uiLocales?: string, + ): Promise<{}>; + logoutPost( + paramsOrFirst?: + | { + idTokenHint?: string; + logoutHint?: string; + clientId?: string; + postLogoutRedirectUri?: string; + state?: string; + uiLocales?: string; + } + | string, + ...rest: [string?, string?, string?, string?, string?] + ): Promise<{}> { + let params: { + idTokenHint?: string; + logoutHint?: string; + clientId?: string; + postLogoutRedirectUri?: string; + state?: string; + uiLocales?: string; + }; + + if ( + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + idTokenHint?: string; + logoutHint?: string; + clientId?: string; + postLogoutRedirectUri?: string; + state?: string; + uiLocales?: string; + }; + } else { + params = { + idTokenHint: paramsOrFirst as string, + logoutHint: rest[0] as string, + clientId: rest[1] as string, + postLogoutRedirectUri: rest[2] as string, + state: rest[3] as string, + uiLocales: rest[4] as string, + }; + } + + const idTokenHint = params.idTokenHint; + const logoutHint = params.logoutHint; + const clientId = params.clientId; + const postLogoutRedirectUri = params.postLogoutRedirectUri; + const state = params.state; + const uiLocales = params.uiLocales; + + const apiPath = '/oauth2/{project_id}/logout'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof idTokenHint !== 'undefined') { + payload['id_token_hint'] = idTokenHint; + } + if (typeof logoutHint !== 'undefined') { + payload['logout_hint'] = logoutHint; + } + if (typeof clientId !== 'undefined') { + payload['client_id'] = clientId; + } + if (typeof postLogoutRedirectUri !== 'undefined') { + payload['post_logout_redirect_uri'] = postLogoutRedirectUri; + } + if (typeof state !== 'undefined') { + payload['state'] = state; + } + if (typeof uiLocales !== 'undefined') { + payload['ui_locales'] = uiLocales; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * List the organizations the OAuth2 access token can access. Resolves the token's `organization` authorization details, expanding the `*` wildcard into the concrete set of organizations the user can see. + * + * @param {number} params.limit - Maximum number of organizations to return. Between 1 and 5000. + * @param {number} params.offset - Number of organizations to skip before returning results. Used for pagination. + * @param {string} params.search - Search term to filter your list results. Max length: 256 chars. + * @throws {AppwriteException} + * @returns {Promise} + */ + listOrganizations(params?: { + limit?: number; + offset?: number; + search?: string; + }): Promise; + /** + * List the organizations the OAuth2 access token can access. Resolves the token's `organization` authorization details, expanding the `*` wildcard into the concrete set of organizations the user can see. + * + * @param {number} limit - Maximum number of organizations to return. Between 1 and 5000. + * @param {number} offset - Number of organizations to skip before returning results. Used for pagination. + * @param {string} search - Search term to filter your list results. Max length: 256 chars. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listOrganizations( + limit?: number, + offset?: number, + search?: string, + ): Promise; + listOrganizations( + paramsOrFirst?: + { limit?: number; offset?: number; search?: string } | number, + ...rest: [number?, string?] + ): Promise { + let params: { limit?: number; offset?: number; search?: string }; + + if ( + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + limit?: number; + offset?: number; + search?: string; + }; + } else { + params = { + limit: paramsOrFirst as number, + offset: rest[0] as number, + search: rest[1] as string, + }; + } + + const limit = params.limit; + const offset = params.offset; + const search = params.search; + + const apiPath = '/oauth2/{project_id}/organizations'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof limit !== 'undefined') { + payload['limit'] = limit; + } + if (typeof offset !== 'undefined') { + payload['offset'] = offset; + } + if (typeof search !== 'undefined') { + payload['search'] = search; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint. + * + * @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} params.redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not. + * @param {string} params.responseType - OAuth2 / OIDC response type. + * @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`. + * @param {string} params.state - OAuth2 state. You receive this back in the redirect URI. + * @param {string} params.nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`. + * @param {string} params.codeChallenge - PKCE code challenge. Required when OAuth2 app is public. + * @param {string} params.codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public. + * @param {string} params.prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account. + * @param {number} params.maxAge - OIDC max_age parameter for customization of consent screen. + * @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields + * @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment. + * @param {string} params.audience - Compatibility alias for a single OAuth2 resource indicator URI. + * @throws {AppwriteException} + * @returns {Promise} + */ + createPAR(params: { + clientId: string; + redirectUri: string; + responseType: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + }): Promise; + /** + * Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint. + * + * @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not. + * @param {string} responseType - OAuth2 / OIDC response type. + * @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`. + * @param {string} state - OAuth2 state. You receive this back in the redirect URI. + * @param {string} nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`. + * @param {string} codeChallenge - PKCE code challenge. Required when OAuth2 app is public. + * @param {string} codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public. + * @param {string} prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account. + * @param {number} maxAge - OIDC max_age parameter for customization of consent screen. + * @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields + * @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment. + * @param {string} audience - Compatibility alias for a single OAuth2 resource indicator URI. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createPAR( + clientId: string, + redirectUri: string, + responseType: string, + scope?: string, + state?: string, + nonce?: string, + codeChallenge?: string, + codeChallengeMethod?: string, + prompt?: string, + maxAge?: number, + authorizationDetails?: string, + resource?: string, + audience?: string, + ): Promise; + createPAR( + paramsOrFirst: + | { + clientId: string; + redirectUri: string; + responseType: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + } + | string, + ...rest: [ + string?, + string?, + string?, + string?, + string?, + string?, + string?, + string?, + number?, + string?, + string?, + string?, + ] + ): Promise { + let params: { + clientId: string; + redirectUri: string; + responseType: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + clientId: string; + redirectUri: string; + responseType: string; + scope?: string; + state?: string; + nonce?: string; + codeChallenge?: string; + codeChallengeMethod?: string; + prompt?: string; + maxAge?: number; + authorizationDetails?: string; + resource?: string; + audience?: string; + }; + } else { + params = { + clientId: paramsOrFirst as string, + redirectUri: rest[0] as string, + responseType: rest[1] as string, + scope: rest[2] as string, + state: rest[3] as string, + nonce: rest[4] as string, + codeChallenge: rest[5] as string, + codeChallengeMethod: rest[6] as string, + prompt: rest[7] as string, + maxAge: rest[8] as number, + authorizationDetails: rest[9] as string, + resource: rest[10] as string, + audience: rest[11] as string, + }; + } + + const clientId = params.clientId; + const redirectUri = params.redirectUri; + const responseType = params.responseType; + const scope = params.scope; + const state = params.state; + const nonce = params.nonce; + const codeChallenge = params.codeChallenge; + const codeChallengeMethod = params.codeChallengeMethod; + const prompt = params.prompt; + const maxAge = params.maxAge; + const authorizationDetails = params.authorizationDetails; + const resource = params.resource; + const audience = params.audience; + + if (typeof clientId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "clientId"', + ); + } + if (typeof redirectUri === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "redirectUri"', + ); + } + if (typeof responseType === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "responseType"', + ); + } + const apiPath = '/oauth2/{project_id}/par'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof clientId !== 'undefined') { + payload['client_id'] = clientId; + } + if (typeof redirectUri !== 'undefined') { + payload['redirect_uri'] = redirectUri; + } + if (typeof responseType !== 'undefined') { + payload['response_type'] = responseType; + } + if (typeof scope !== 'undefined') { + payload['scope'] = scope; + } + if (typeof state !== 'undefined') { + payload['state'] = state; + } + if (typeof nonce !== 'undefined') { + payload['nonce'] = nonce; + } + if (typeof codeChallenge !== 'undefined') { + payload['code_challenge'] = codeChallenge; + } + if (typeof codeChallengeMethod !== 'undefined') { + payload['code_challenge_method'] = codeChallengeMethod; + } + if (typeof prompt !== 'undefined') { + payload['prompt'] = prompt; + } + if (typeof maxAge !== 'undefined') { + payload['max_age'] = maxAge; + } + if (typeof authorizationDetails !== 'undefined') { + payload['authorization_details'] = authorizationDetails; + } + if (typeof resource !== 'undefined') { + payload['resource'] = resource; + } + if (typeof audience !== 'undefined') { + payload['audience'] = audience; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * List the projects the OAuth2 access token can access. Resolves the token's `project` authorization details, expanding the `*` wildcard into the concrete set of projects the user can see. + * + * @param {number} params.limit - Maximum number of projects to return. Between 1 and 5000. + * @param {number} params.offset - Number of projects to skip before returning results. Used for pagination. + * @param {string} params.search - Search term to filter your list results. Max length: 256 chars. + * @throws {AppwriteException} + * @returns {Promise} + */ + listProjects(params?: { + limit?: number; + offset?: number; + search?: string; + }): Promise; + /** + * List the projects the OAuth2 access token can access. Resolves the token's `project` authorization details, expanding the `*` wildcard into the concrete set of projects the user can see. + * + * @param {number} limit - Maximum number of projects to return. Between 1 and 5000. + * @param {number} offset - Number of projects to skip before returning results. Used for pagination. + * @param {string} search - Search term to filter your list results. Max length: 256 chars. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listProjects( + limit?: number, + offset?: number, + search?: string, + ): Promise; + listProjects( + paramsOrFirst?: + { limit?: number; offset?: number; search?: string } | number, + ...rest: [number?, string?] + ): Promise { + let params: { limit?: number; offset?: number; search?: string }; + + if ( + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + limit?: number; + offset?: number; + search?: string; + }; + } else { + params = { + limit: paramsOrFirst as number, + offset: rest[0] as number, + search: rest[1] as string, + }; + } + + const limit = params.limit; + const offset = params.offset; + const search = params.search; + + const apiPath = '/oauth2/{project_id}/projects'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof limit !== 'undefined') { + payload['limit'] = limit; + } + if (typeof offset !== 'undefined') { + payload['offset'] = offset; + } + if (typeof search !== 'undefined') { + payload['search'] = search; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + accept: 'application/json', + }; + + return this.client.call('get', uri, apiHeaders, payload); + } + + /** + * Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect. + * + * @param {string} params.grantId - Grant ID made during authorization, provided to consent screen in URL search params. + * @throws {AppwriteException} + * @returns {Promise} + */ + reject(params: { grantId: string }): Promise; + /** + * Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect. + * + * @param {string} grantId - Grant ID made during authorization, provided to consent screen in URL search params. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + reject(grantId: string): Promise; + reject( + paramsOrFirst: { grantId: string } | string, + ): Promise { + let params: { grantId: string }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { grantId: string }; + } else { + params = { + grantId: paramsOrFirst as string, + }; + } + + const grantId = params.grantId; + + if (typeof grantId === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "grantId"', + ); + } + const apiPath = '/oauth2/{project_id}/reject'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof grantId !== 'undefined') { + payload['grant_id'] = grantId; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Revoke an OAuth2 access token or refresh token. + * + * @param {string} params.token - The access or refresh token to revoke. + * @param {string} params.tokenTypeHint - Type of token to revoke (access_token or refresh_token). + * @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} params.clientSecret - OAuth2 client secret. Required for confidential apps; omitted for public apps. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + revoke(params: { + token: string; + tokenTypeHint?: string; + clientId?: string; + clientSecret?: string; + }): Promise<{}>; + /** + * Revoke an OAuth2 access token or refresh token. + * + * @param {string} token - The access or refresh token to revoke. + * @param {string} tokenTypeHint - Type of token to revoke (access_token or refresh_token). + * @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} clientSecret - OAuth2 client secret. Required for confidential apps; omitted for public apps. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + revoke( + token: string, + tokenTypeHint?: string, + clientId?: string, + clientSecret?: string, + ): Promise<{}>; + revoke( + paramsOrFirst: + | { + token: string; + tokenTypeHint?: string; + clientId?: string; + clientSecret?: string; + } + | string, + ...rest: [string?, string?, string?] + ): Promise<{}> { + let params: { + token: string; + tokenTypeHint?: string; + clientId?: string; + clientSecret?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + token: string; + tokenTypeHint?: string; + clientId?: string; + clientSecret?: string; + }; + } else { + params = { + token: paramsOrFirst as string, + tokenTypeHint: rest[0] as string, + clientId: rest[1] as string, + clientSecret: rest[2] as string, + }; + } + + const token = params.token; + const tokenTypeHint = params.tokenTypeHint; + const clientId = params.clientId; + const clientSecret = params.clientSecret; + + if (typeof token === 'undefined') { + throw new AppwriteException('Missing required parameter: "token"'); + } + const apiPath = '/oauth2/{project_id}/revoke'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof token !== 'undefined') { + payload['token'] = token; + } + if (typeof tokenTypeHint !== 'undefined') { + payload['token_type_hint'] = tokenTypeHint; + } + if (typeof clientId !== 'undefined') { + payload['client_id'] = clientId; + } + if (typeof clientSecret !== 'undefined') { + payload['client_secret'] = clientSecret; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } + + /** + * Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens. + * + * @param {string} params.grantType - OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`. + * @param {string} params.code - Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type. + * @param {string} params.refreshToken - Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type. + * @param {string} params.deviceCode - Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. + * @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} params.clientSecret - OAuth2 client secret. Required for confidential apps. + * @param {string} params.codeVerifier - PKCE code verifier. Required for public apps. + * @param {string} params.redirectUri - Redirect URI. Required for `authorization_code` grant type. + * @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment. + * @param {string} params.audience - Compatibility alias for a single OAuth2 resource indicator URI. + * @throws {AppwriteException} + * @returns {Promise} + */ + createToken(params: { + grantType: string; + code?: string; + refreshToken?: string; + deviceCode?: string; + clientId?: string; + clientSecret?: string; + codeVerifier?: string; + redirectUri?: string; + resource?: string; + audience?: string; + }): Promise; + /** + * Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens. + * + * @param {string} grantType - OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`. + * @param {string} code - Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type. + * @param {string} refreshToken - Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type. + * @param {string} deviceCode - Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. + * @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL. + * @param {string} clientSecret - OAuth2 client secret. Required for confidential apps. + * @param {string} codeVerifier - PKCE code verifier. Required for public apps. + * @param {string} redirectUri - Redirect URI. Required for `authorization_code` grant type. + * @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment. + * @param {string} audience - Compatibility alias for a single OAuth2 resource indicator URI. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createToken( + grantType: string, + code?: string, + refreshToken?: string, + deviceCode?: string, + clientId?: string, + clientSecret?: string, + codeVerifier?: string, + redirectUri?: string, + resource?: string, + audience?: string, + ): Promise; + createToken( + paramsOrFirst: + | { + grantType: string; + code?: string; + refreshToken?: string; + deviceCode?: string; + clientId?: string; + clientSecret?: string; + codeVerifier?: string; + redirectUri?: string; + resource?: string; + audience?: string; + } + | string, + ...rest: [ + string?, + string?, + string?, + string?, + string?, + string?, + string?, + string?, + string?, + ] + ): Promise { + let params: { + grantType: string; + code?: string; + refreshToken?: string; + deviceCode?: string; + clientId?: string; + clientSecret?: string; + codeVerifier?: string; + redirectUri?: string; + resource?: string; + audience?: string; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + grantType: string; + code?: string; + refreshToken?: string; + deviceCode?: string; + clientId?: string; + clientSecret?: string; + codeVerifier?: string; + redirectUri?: string; + resource?: string; + audience?: string; + }; + } else { + params = { + grantType: paramsOrFirst as string, + code: rest[0] as string, + refreshToken: rest[1] as string, + deviceCode: rest[2] as string, + clientId: rest[3] as string, + clientSecret: rest[4] as string, + codeVerifier: rest[5] as string, + redirectUri: rest[6] as string, + resource: rest[7] as string, + audience: rest[8] as string, + }; + } + + const grantType = params.grantType; + const code = params.code; + const refreshToken = params.refreshToken; + const deviceCode = params.deviceCode; + const clientId = params.clientId; + const clientSecret = params.clientSecret; + const codeVerifier = params.codeVerifier; + const redirectUri = params.redirectUri; + const resource = params.resource; + const audience = params.audience; + + if (typeof grantType === 'undefined') { + throw new AppwriteException( + 'Missing required parameter: "grantType"', + ); + } + const apiPath = '/oauth2/{project_id}/token'.replace( + '{project_id}', + encodeURIComponent(String(this.client.config.project)), + ); + const payload: Payload = {}; + if (typeof grantType !== 'undefined') { + payload['grant_type'] = grantType; + } + if (typeof code !== 'undefined') { + payload['code'] = code; + } + if (typeof refreshToken !== 'undefined') { + payload['refresh_token'] = refreshToken; + } + if (typeof deviceCode !== 'undefined') { + payload['device_code'] = deviceCode; + } + if (typeof clientId !== 'undefined') { + payload['client_id'] = clientId; + } + if (typeof clientSecret !== 'undefined') { + payload['client_secret'] = clientSecret; + } + if (typeof codeVerifier !== 'undefined') { + payload['code_verifier'] = codeVerifier; + } + if (typeof redirectUri !== 'undefined') { + payload['redirect_uri'] = redirectUri; + } + if (typeof resource !== 'undefined') { + payload['resource'] = resource; + } + if (typeof audience !== 'undefined') { + payload['audience'] = audience; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + accept: 'application/json', + }; + + return this.client.call('post', uri, apiHeaders, payload); + } +} From 36f19a83c35350612ab6e95207e24184dd9fdc49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 25 Sep 2026 12:17:13 +0200 Subject: [PATCH 8/8] chore: keep the existing lock file, bump only its version --- package-lock.json | 4499 ++++++++++++++++++++++----------------------- 1 file changed, 2243 insertions(+), 2256 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4e6fc056..5f28bd49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,2260 +1,2247 @@ { - "name": "appwrite", - "version": "28.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "appwrite", - "version": "28.1.0", - "license": "BSD-3-Clause", - "dependencies": { - "json-bigint": "1.0.0" - }, - "devDependencies": { - "@eslint/js": "10.0.1", - "@rollup/plugin-commonjs": "29.0.3", - "@rollup/plugin-node-resolve": "16.0.3", - "@rollup/plugin-typescript": "12.3.0", - "@types/json-bigint": "1.0.4", - "eslint": "10.10.0", - "playwright": "1.56.1", - "prettier": "3.9.6", - "rollup": "4.63.2", - "serve-handler": "6.1.7", - "tslib": "2.8.1", - "typescript": "5.9.3", - "typescript-eslint": "8.70.0" - }, - "engines": { - "node": ">=18.0.0" - }, - "overrides": { - "brace-expansion": "5.0.9" - } - }, - "node_modules/@cacheable/memory": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@cacheable/memory/-/memory-2.2.0.tgz", - "integrity": "sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cacheable/utils": "^2.5.0", - "@keyv/bigmap": "^1.3.1", - "hookified": "^1.15.1", - "keyv": "^5.6.0" - } - }, - "node_modules/@cacheable/utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.5.0.tgz", - "integrity": "sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hashery": "^1.5.1", - "keyv": "^5.6.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", - "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", - "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^3.0.5", - "debug": "^4.3.1", - "minimatch": "^10.2.4" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", - "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", - "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/js": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", - "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "eslint": "^10.0.0" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/@eslint/object-schema": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", - "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz", - "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1", - "levn": "^0.4.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", - "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/types": "^0.15.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.8", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", - "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.2", - "@humanfs/types": "^0.15.0", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/types": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", - "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", - "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@keyv/bigmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.3.1.tgz", - "integrity": "sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "hashery": "^1.4.0", - "hookified": "^1.15.0" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "keyv": "^5.6.0" - } - }, - "node_modules/@keyv/serialize": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz", - "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@napi-rs/lzma-linux-x64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", - "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^22.20 || ^24.12 || >=25" - } - }, - "node_modules/@rollup/plugin-commonjs": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz", - "integrity": "sha512-ZaOxZceP7SOUW7Lqw5IRVweSQYWaeIPnXIGLiB690EBA3FGJTO40EEr2L5yZplJWsgTCogILRSpcAe7+U0Otdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "commondir": "^1.0.1", - "estree-walker": "^2.0.2", - "fdir": "^6.2.0", - "is-reference": "1.2.1", - "magic-string": "^0.30.3", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=16.0.0 || 14 >= 14.17" - }, - "peerDependencies": { - "rollup": "^2.68.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", - "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-typescript": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz", - "integrity": "sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.1.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.14.0||^3.0.0||^4.0.0", - "tslib": "*", - "typescript": ">=3.7.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - }, - "tslib": { - "optional": true - } - } - }, - "node_modules/@rollup/pluginutils": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz", - "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.2.tgz", - "integrity": "sha512-Xa6RDoWa+hNiX6PgsljlH6W75RaONx3y6PVlbLhkEWW+GaPQ3dP5gwbL/erAzQHWwkvW5UxdD5l87Qx2FAQ/4A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.2.tgz", - "integrity": "sha512-vNASxsghMfQ5s+v3PrpnJd+ryL/26lxCCaGI+sDJ7VzmHiYXIrrVltsDhaawxLM1WcoMU2oYlbPHLaYQtBzhcg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.2.tgz", - "integrity": "sha512-0dWDjmlrpZAgjPD/aPzUDhBW8APLRjAni5bOrM76wiiZm+E+KTMVKNhAzaTBohz8UyO2fKNAl0+fygbe2HZXOA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.2.tgz", - "integrity": "sha512-N58uktcwzk3+qT4KHEuNdIxX1N01RWrkfVoml69EAbSaNDL+sbNVLx2RMl4Qd23lpA0fgPvyh5hHb4weD5WKmg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.2.tgz", - "integrity": "sha512-HWF2zH8EAp2scWRpt2PGe6iUGz7zi04waXsdRr3zb4DWCk2ImIo5FZu0jjmD53nP/DGSvnW0e7/1ToCNZs2lZw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.2.tgz", - "integrity": "sha512-MkvcwHMnzPSMOQEwB6wHnLzmc+hT8BGc5bW/Mhmjjgx3wbj6VBnlc47XsK74kD0K9MikFfXpQqyz4NUXaUW62A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.2.tgz", - "integrity": "sha512-xe1bCKPJaKsD0tfd7Rb6bGfUogJTpKbTEEthsfdb7hTfTRNJVQTdirabQx0o6ERVba/smkM720soMY+0QnrlSQ==", - "cpu": [ - "arm" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.2.tgz", - "integrity": "sha512-yOM7LdK0p6gk6+Q773OEwtlsikT1TL3yMmYsTtRlDRPha5vV2DC5x7LqRWDr6f3cSYNMKVqxzffXv8ivxNBIFQ==", - "cpu": [ - "arm" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.2.tgz", - "integrity": "sha512-qiWuJJV3DybA2IfzvRimeKXGrGuVPv1zobSY/26KnP3HbV0VcNb3ECzgvtbvF3xjSMkcooou6HASXZuLdjnhpQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.2.tgz", - "integrity": "sha512-akcZquRzCY/KpUoZAMBhGf7oi4LmXq1BzRA5CPAC3rkUf28Y/sAYV3jSL+JKd7cwEyFvR5G0XVZ0gaMedP+60A==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.2.tgz", - "integrity": "sha512-fNwYHrPyYyxauPzX/cpYw8Z7LQpp+DGA0KCoswA0aVFBpmdMil9XgjB8V3Ny64Ihu797+GKcuJqnsOKEmor7fA==", - "cpu": [ - "loong64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.2.tgz", - "integrity": "sha512-XfvsgzR7DZqREdst7K1Mj3ilSUM5xLAHJcIMDFPKdxTs9q5VHOT8aMA+a683fqBu7DQl8+Sd9HCsQYL8EMY9qA==", - "cpu": [ - "loong64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.2.tgz", - "integrity": "sha512-Pp7gVZggEFlbcuztay+/U0gVG9S1XAh8i7I1Re/htbAzo43P5wHZHw6pTyzotISqlKohoh9RpIfnOz3RbemK1w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.2.tgz", - "integrity": "sha512-zkgL2xff6i7u5hau/m6FGeS8gRkLEdgLw522WGmdWWlLd9btmNl3S80mcEjtGq+kvgUekQ3+BOYLLLcPlS2LIA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.2.tgz", - "integrity": "sha512-qOheJomrkVCbbHFJ7L3J97cnhfogKqguAQphv26+3ZsAQIF1L19b+dArl//s8rjJHJLz9byykyM8NBP4nmSa1g==", - "cpu": [ - "riscv64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.2.tgz", - "integrity": "sha512-XlxLD54wQhH3FciCgMofxBw27NzUe818gJH410qWvc41UT0ZFcgxVjyX5/EK8MPTupjeVWqN5oy+9pCA9mqfCA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.2.tgz", - "integrity": "sha512-vdryWeRb2bLJZf0Fv/W8se6nvsHe2PkTCxV0meheK3nQE+G90VCJcke51Miy1yQRsfm2uqIyjXOu4wmUzbTtkQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.2.tgz", - "integrity": "sha512-bcq2h2pkKmH2po4cZV8VWzO4lL40STyu/nLoFpYMQp9C2tCVNTdcVv86MwSsn3D5s1FBe2Ty1atqvVAUTMimNg==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.2.tgz", - "integrity": "sha512-EGoo5DMVMRkTId8fuTDaoxVlR5ZTsKULUezRjd9gCw5eeY+DjCvDpZAOlNUvKPGX+7rS1RWx6j+yOpNPx0cUgQ==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.2.tgz", - "integrity": "sha512-MErl12k7BFHZG1TI9QF/3lSSZARzq9KgNy/FjnqFMCkv+N4RSSzoUCA5h2mqHX4Mox3WaTVKblyzhQ1zRb2ZuQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.2.tgz", - "integrity": "sha512-ILs8k07Wh4p0PsNY4wYLEaXZKMOpVhrG5QDB0yHhGhuzOfDlnyHN6sflL4El/MpUP1y8uY2lUZrv4oBS6pTT3g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.2.tgz", - "integrity": "sha512-hKgB3nz/TKD3Wv78XEsyXzQsNjvhOHmwKQTvXADGOyU/cIClZDO7DsoggbdmJDPGp5V80tA3Vfv61PaKTLH3LA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.2.tgz", - "integrity": "sha512-T4wf1mudIDxN8Q/CWIBJC1u5gQUc+r5mPvlwoSbIvNkyVTP2TAFeobEmst5AQ4gMyAz4sSByVdoTDfvTmGK/8g==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.2.tgz", - "integrity": "sha512-tC3IY7qoaD9Ll3/8WJQn49j5V2f/NuI9S41NOE2iM5MPs3sPIvOkVToLcz/7Bz4pyF7PSvrtwu8I/pUrGOSecQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.2.tgz", - "integrity": "sha512-6NHnk/K3eq2ZFYcU1X8g67s9qIJRCOTT92gwLMVBp08dB2uuuwI1/Q/empzL2Bfr2f2WRLJVwpp90RmacQyFkw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@types/esrecurse": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", - "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", - "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/resolve": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", - "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.0.tgz", - "integrity": "sha512-/v8HZt6RlyIZxB3ntehELOcUcfxKPVGWXnQdJuHRmzrqgF8nQypcC/oxGW+Ot4VGKDq81XugPKxx0n5PBtf9PA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.70.0", - "@typescript-eslint/type-utils": "8.70.0", - "@typescript-eslint/utils": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.70.0", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.9.tgz", - "integrity": "sha512-brTTsvFRt5C1gGHtPst/281UjPD5t9fBqbgoMPlVWy11ZLTPfu7HxK4ZYqO9H7o/yC9rSTCI85EaQ4OoY12qYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.0.tgz", - "integrity": "sha512-zYvrmj9Yxd63UGaXw+kdt6A0F0s0qveJyuatIM77bYC2DE4pgmg7a50u8LR7PRtXd0x+h+Tl3eXabGm06SWd3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.70.0", - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.0.tgz", - "integrity": "sha512-hFHbTNqhU9G+2eKFXCBVb1tjFT/LceiJ4+HfLO4pTpDI0KHi6iajpcFFkaSQ9gXmCh7n82A0PthaayEdN6mspQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.70.0", - "@typescript-eslint/types": "^8.70.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.0.tgz", - "integrity": "sha512-8nP3Kwh5hlgZ4FicGvmznAmJe8UL4sdU8tLukrPaMuQmDuk4Y8xYfzu/aYZW4xT2JCgc7H/TpDI5cGlxcWJSqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.0.tgz", - "integrity": "sha512-adnkeeNq9Sq1sUf4+FRVc0KdgYghzsgFpZSQVZVvY0LCuUuN0FnQgyGzCJeC4fW1cdXseBAjU2EOqUIjbNcZUw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.0.tgz", - "integrity": "sha512-NUMKIhYVaVIVLnRL9CRt+VVcuLgSHUCpXn4/+K8wql+vdInUzvx8BjUO1oJ7cG9shjFJKtF8F8Hh2kCh3/KBVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0", - "@typescript-eslint/utils": "8.70.0", - "debug": "^4.4.3", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.0.tgz", - "integrity": "sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.0.tgz", - "integrity": "sha512-d9NmHMPEKQ7QCLLm1jI3zmoQBwT5KwFYjXBJ9ymZfKCUU+5rmTRykKAFvH5Qn/ZCds3CEAFS9OC9M/jkl0X2bA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.70.0", - "@typescript-eslint/tsconfig-utils": "8.70.0", - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.0.tgz", - "integrity": "sha512-oZmtKJz/4fufZ2p3+Cn3ijEojcdfR+1zYDH2xKYrEly0dR/Q/1xUPRCOlKGxod78nWlU2UnDe09GZ3TaknBFGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.70.0", - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.0.tgz", - "integrity": "sha512-BoC8PiO4Hkdo0TVJh9Ntxr5MxPDI7/oFsrygN5ADelFSeXG/qgNuucIGA+L5Z6JpPTE/uRfcTWtscjbUaufepQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.70.0", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/acorn": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", - "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", - "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/bignumber.js": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", - "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cacheable": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.5.0.tgz", - "integrity": "sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cacheable/memory": "^2.2.0", - "@cacheable/utils": "^2.5.0", - "hookified": "^1.15.0", - "keyv": "^5.6.0", - "qified": "^0.10.1" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true, - "license": "MIT" - }, - "node_modules/content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.10.0.tgz", - "integrity": "sha512-NPXn6r5zl4uET1DAVPaOwzX3rut4c0wcmw3dWJAfOsTM5+TogXo0DDjz8pwm/hL8cyVNpHqeK4JpN0NjnyFFNw==", - "dev": true, - "license": "MIT", - "workspaces": [ - "packages/*" - ], - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.5", - "@eslint/config-helpers": "^0.7.0", - "@eslint/core": "^1.2.1", - "@eslint/plugin-kit": "^0.7.3", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.14.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^9.1.2", - "eslint-visitor-keys": "^5.0.1", - "espree": "^11.2.0", - "esquery": "^1.7.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "11.1.5 || >11.1.6 <12", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "minimatch": "^10.2.5", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", - "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@types/esrecurse": "^4.3.1", - "@types/estree": "^1.0.8", - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", - "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.16.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^5.0.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true, - "license": "MIT" - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true + "name": "appwrite", + "version": "28.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "appwrite", + "version": "28.1.0", + "license": "BSD-3-Clause", + "dependencies": { + "json-bigint": "1.0.0" + }, + "devDependencies": { + "@eslint/js": "10.0.1", + "@rollup/plugin-commonjs": "29.0.3", + "@rollup/plugin-node-resolve": "16.0.3", + "@rollup/plugin-typescript": "12.3.0", + "@types/json-bigint": "1.0.4", + "eslint": "10.10.0", + "playwright": "1.56.1", + "prettier": "3.9.6", + "rollup": "4.63.2", + "serve-handler": "6.1.7", + "tslib": "2.8.1", + "typescript": "5.9.3", + "typescript-eslint": "8.70.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@cacheable/memory": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@cacheable/memory/-/memory-2.2.0.tgz", + "integrity": "sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cacheable/utils": "^2.5.0", + "@keyv/bigmap": "^1.3.1", + "hookified": "^1.15.1", + "keyv": "^5.6.0" + } + }, + "node_modules/@cacheable/utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.5.0.tgz", + "integrity": "sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hashery": "^1.5.1", + "keyv": "^5.6.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz", + "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@keyv/bigmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.3.1.tgz", + "integrity": "sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hashery": "^1.4.0", + "hookified": "^1.15.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "keyv": "^5.6.0" + } + }, + "node_modules/@keyv/serialize": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz", + "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz", + "integrity": "sha512-ZaOxZceP7SOUW7Lqw5IRVweSQYWaeIPnXIGLiB690EBA3FGJTO40EEr2L5yZplJWsgTCogILRSpcAe7+U0Otdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "fdir": "^6.2.0", + "is-reference": "1.2.1", + "magic-string": "^0.30.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0 || 14 >= 14.17" + }, + "peerDependencies": { + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", + "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-typescript": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz", + "integrity": "sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0||^4.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz", + "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.2.tgz", + "integrity": "sha512-Xa6RDoWa+hNiX6PgsljlH6W75RaONx3y6PVlbLhkEWW+GaPQ3dP5gwbL/erAzQHWwkvW5UxdD5l87Qx2FAQ/4A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.2.tgz", + "integrity": "sha512-vNASxsghMfQ5s+v3PrpnJd+ryL/26lxCCaGI+sDJ7VzmHiYXIrrVltsDhaawxLM1WcoMU2oYlbPHLaYQtBzhcg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.2.tgz", + "integrity": "sha512-0dWDjmlrpZAgjPD/aPzUDhBW8APLRjAni5bOrM76wiiZm+E+KTMVKNhAzaTBohz8UyO2fKNAl0+fygbe2HZXOA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.2.tgz", + "integrity": "sha512-N58uktcwzk3+qT4KHEuNdIxX1N01RWrkfVoml69EAbSaNDL+sbNVLx2RMl4Qd23lpA0fgPvyh5hHb4weD5WKmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.2.tgz", + "integrity": "sha512-HWF2zH8EAp2scWRpt2PGe6iUGz7zi04waXsdRr3zb4DWCk2ImIo5FZu0jjmD53nP/DGSvnW0e7/1ToCNZs2lZw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.2.tgz", + "integrity": "sha512-MkvcwHMnzPSMOQEwB6wHnLzmc+hT8BGc5bW/Mhmjjgx3wbj6VBnlc47XsK74kD0K9MikFfXpQqyz4NUXaUW62A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.2.tgz", + "integrity": "sha512-xe1bCKPJaKsD0tfd7Rb6bGfUogJTpKbTEEthsfdb7hTfTRNJVQTdirabQx0o6ERVba/smkM720soMY+0QnrlSQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.2.tgz", + "integrity": "sha512-yOM7LdK0p6gk6+Q773OEwtlsikT1TL3yMmYsTtRlDRPha5vV2DC5x7LqRWDr6f3cSYNMKVqxzffXv8ivxNBIFQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.2.tgz", + "integrity": "sha512-qiWuJJV3DybA2IfzvRimeKXGrGuVPv1zobSY/26KnP3HbV0VcNb3ECzgvtbvF3xjSMkcooou6HASXZuLdjnhpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.2.tgz", + "integrity": "sha512-akcZquRzCY/KpUoZAMBhGf7oi4LmXq1BzRA5CPAC3rkUf28Y/sAYV3jSL+JKd7cwEyFvR5G0XVZ0gaMedP+60A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.2.tgz", + "integrity": "sha512-fNwYHrPyYyxauPzX/cpYw8Z7LQpp+DGA0KCoswA0aVFBpmdMil9XgjB8V3Ny64Ihu797+GKcuJqnsOKEmor7fA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.2.tgz", + "integrity": "sha512-XfvsgzR7DZqREdst7K1Mj3ilSUM5xLAHJcIMDFPKdxTs9q5VHOT8aMA+a683fqBu7DQl8+Sd9HCsQYL8EMY9qA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.2.tgz", + "integrity": "sha512-Pp7gVZggEFlbcuztay+/U0gVG9S1XAh8i7I1Re/htbAzo43P5wHZHw6pTyzotISqlKohoh9RpIfnOz3RbemK1w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.2.tgz", + "integrity": "sha512-zkgL2xff6i7u5hau/m6FGeS8gRkLEdgLw522WGmdWWlLd9btmNl3S80mcEjtGq+kvgUekQ3+BOYLLLcPlS2LIA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.2.tgz", + "integrity": "sha512-qOheJomrkVCbbHFJ7L3J97cnhfogKqguAQphv26+3ZsAQIF1L19b+dArl//s8rjJHJLz9byykyM8NBP4nmSa1g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.2.tgz", + "integrity": "sha512-XlxLD54wQhH3FciCgMofxBw27NzUe818gJH410qWvc41UT0ZFcgxVjyX5/EK8MPTupjeVWqN5oy+9pCA9mqfCA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.2.tgz", + "integrity": "sha512-vdryWeRb2bLJZf0Fv/W8se6nvsHe2PkTCxV0meheK3nQE+G90VCJcke51Miy1yQRsfm2uqIyjXOu4wmUzbTtkQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.2.tgz", + "integrity": "sha512-bcq2h2pkKmH2po4cZV8VWzO4lL40STyu/nLoFpYMQp9C2tCVNTdcVv86MwSsn3D5s1FBe2Ty1atqvVAUTMimNg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.2.tgz", + "integrity": "sha512-EGoo5DMVMRkTId8fuTDaoxVlR5ZTsKULUezRjd9gCw5eeY+DjCvDpZAOlNUvKPGX+7rS1RWx6j+yOpNPx0cUgQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.2.tgz", + "integrity": "sha512-MErl12k7BFHZG1TI9QF/3lSSZARzq9KgNy/FjnqFMCkv+N4RSSzoUCA5h2mqHX4Mox3WaTVKblyzhQ1zRb2ZuQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.2.tgz", + "integrity": "sha512-ILs8k07Wh4p0PsNY4wYLEaXZKMOpVhrG5QDB0yHhGhuzOfDlnyHN6sflL4El/MpUP1y8uY2lUZrv4oBS6pTT3g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.2.tgz", + "integrity": "sha512-hKgB3nz/TKD3Wv78XEsyXzQsNjvhOHmwKQTvXADGOyU/cIClZDO7DsoggbdmJDPGp5V80tA3Vfv61PaKTLH3LA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.2.tgz", + "integrity": "sha512-T4wf1mudIDxN8Q/CWIBJC1u5gQUc+r5mPvlwoSbIvNkyVTP2TAFeobEmst5AQ4gMyAz4sSByVdoTDfvTmGK/8g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.2.tgz", + "integrity": "sha512-tC3IY7qoaD9Ll3/8WJQn49j5V2f/NuI9S41NOE2iM5MPs3sPIvOkVToLcz/7Bz4pyF7PSvrtwu8I/pUrGOSecQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.2.tgz", + "integrity": "sha512-6NHnk/K3eq2ZFYcU1X8g67s9qIJRCOTT92gwLMVBp08dB2uuuwI1/Q/empzL2Bfr2f2WRLJVwpp90RmacQyFkw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", + "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.0.tgz", + "integrity": "sha512-/v8HZt6RlyIZxB3ntehELOcUcfxKPVGWXnQdJuHRmzrqgF8nQypcC/oxGW+Ot4VGKDq81XugPKxx0n5PBtf9PA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/type-utils": "8.70.0", + "@typescript-eslint/utils": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.70.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.10.tgz", + "integrity": "sha512-HpbUakT7xp5miBUywCHf36ZEuAJNklBJDDsGpUIjMzOSmM8ELSfA9Sa/QDPeNeqeoN31u+UTCkL4klCOVvRm4Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.0.tgz", + "integrity": "sha512-zYvrmj9Yxd63UGaXw+kdt6A0F0s0qveJyuatIM77bYC2DE4pgmg7a50u8LR7PRtXd0x+h+Tl3eXabGm06SWd3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.0.tgz", + "integrity": "sha512-hFHbTNqhU9G+2eKFXCBVb1tjFT/LceiJ4+HfLO4pTpDI0KHi6iajpcFFkaSQ9gXmCh7n82A0PthaayEdN6mspQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.70.0", + "@typescript-eslint/types": "^8.70.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.0.tgz", + "integrity": "sha512-8nP3Kwh5hlgZ4FicGvmznAmJe8UL4sdU8tLukrPaMuQmDuk4Y8xYfzu/aYZW4xT2JCgc7H/TpDI5cGlxcWJSqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.0.tgz", + "integrity": "sha512-adnkeeNq9Sq1sUf4+FRVc0KdgYghzsgFpZSQVZVvY0LCuUuN0FnQgyGzCJeC4fW1cdXseBAjU2EOqUIjbNcZUw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.0.tgz", + "integrity": "sha512-NUMKIhYVaVIVLnRL9CRt+VVcuLgSHUCpXn4/+K8wql+vdInUzvx8BjUO1oJ7cG9shjFJKtF8F8Hh2kCh3/KBVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/utils": "8.70.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.0.tgz", + "integrity": "sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.0.tgz", + "integrity": "sha512-d9NmHMPEKQ7QCLLm1jI3zmoQBwT5KwFYjXBJ9ymZfKCUU+5rmTRykKAFvH5Qn/ZCds3CEAFS9OC9M/jkl0X2bA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.70.0", + "@typescript-eslint/tsconfig-utils": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.0.tgz", + "integrity": "sha512-oZmtKJz/4fufZ2p3+Cn3ijEojcdfR+1zYDH2xKYrEly0dR/Q/1xUPRCOlKGxod78nWlU2UnDe09GZ3TaknBFGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.0.tgz", + "integrity": "sha512-BoC8PiO4Hkdo0TVJh9Ntxr5MxPDI7/oFsrygN5ADelFSeXG/qgNuucIGA+L5Z6JpPTE/uRfcTWtscjbUaufepQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacheable": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.5.0.tgz", + "integrity": "sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cacheable/memory": "^2.2.0", + "@cacheable/utils": "^2.5.0", + "hookified": "^1.15.0", + "keyv": "^5.6.0", + "qified": "^0.10.1" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.10.0.tgz", + "integrity": "sha512-NPXn6r5zl4uET1DAVPaOwzX3rut4c0wcmw3dWJAfOsTM5+TogXo0DDjz8pwm/hL8cyVNpHqeK4JpN0NjnyFFNw==", + "dev": true, + "license": "MIT", + "workspaces": [ + "packages/*" + ], + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.3", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "11.1.5 || >11.1.6 <12", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "11.1.5", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-11.1.5.tgz", + "integrity": "sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^6.1.23" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "6.1.23", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.23.tgz", + "integrity": "sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cacheable": "^2.5.0", + "flatted": "^3.4.2", + "hookified": "^1.15.0" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/hashery": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.1.tgz", + "integrity": "sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^1.15.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hookified": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz", + "integrity": "sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.6.0.tgz", + "integrity": "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@keyv/serialize": "^1.1.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "~1.33.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true, + "license": "(WTFPL OR MIT)" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-to-regexp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/playwright": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", + "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.56.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", + "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qified": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/qified/-/qified-0.10.1.tgz", + "integrity": "sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^2.1.1" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/qified/node_modules/hookified": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-2.2.0.tgz", + "integrity": "sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==", + "dev": true, + "license": "MIT" + }, + "node_modules/range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "4.63.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.2.tgz", + "integrity": "sha512-l5eyksV4tPBj6lJyEa37YzIOCSOV7lkZzEHUdpjWZbtD7wTcFYmEYXSgm5bT4vV+dZLb9rBG1W9GROOG4NS4Ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.63.2", + "@rollup/rollup-android-arm64": "4.63.2", + "@rollup/rollup-darwin-arm64": "4.63.2", + "@rollup/rollup-darwin-x64": "4.63.2", + "@rollup/rollup-freebsd-arm64": "4.63.2", + "@rollup/rollup-freebsd-x64": "4.63.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.63.2", + "@rollup/rollup-linux-arm-musleabihf": "4.63.2", + "@rollup/rollup-linux-arm64-gnu": "4.63.2", + "@rollup/rollup-linux-arm64-musl": "4.63.2", + "@rollup/rollup-linux-loong64-gnu": "4.63.2", + "@rollup/rollup-linux-loong64-musl": "4.63.2", + "@rollup/rollup-linux-ppc64-gnu": "4.63.2", + "@rollup/rollup-linux-ppc64-musl": "4.63.2", + "@rollup/rollup-linux-riscv64-gnu": "4.63.2", + "@rollup/rollup-linux-riscv64-musl": "4.63.2", + "@rollup/rollup-linux-s390x-gnu": "4.63.2", + "@rollup/rollup-linux-x64-gnu": "4.63.2", + "@rollup/rollup-linux-x64-musl": "4.63.2", + "@rollup/rollup-openbsd-x64": "4.63.2", + "@rollup/rollup-openharmony-arm64": "4.63.2", + "@rollup/rollup-win32-arm64-msvc": "4.63.2", + "@rollup/rollup-win32-ia32-msvc": "4.63.2", + "@rollup/rollup-win32-x64-gnu": "4.63.2", + "@rollup/rollup-win32-x64-msvc": "4.63.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serve-handler": { + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz", + "integrity": "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "mime-types": "2.1.18", + "minimatch": "3.1.5", + "path-is-inside": "1.0.2", + "path-to-regexp": "3.3.0", + "range-parser": "1.2.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.0.tgz", + "integrity": "sha512-P/W5cz70/cQAuKfY3xwQMWWTV7BvJ0mAQmi+9mBcsVPaBUpd6Ohpa+fECv9rBFrQcig86jAiNBFNWUqnTjr4pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.70.0", + "@typescript-eslint/parser": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/utils": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } - } - }, - "node_modules/file-entry-cache": { - "version": "11.1.5", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-11.1.5.tgz", - "integrity": "sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^6.1.23" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "6.1.23", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.23.tgz", - "integrity": "sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "cacheable": "^2.5.0", - "flatted": "^3.4.2", - "hookified": "^1.15.0" - } - }, - "node_modules/flatted": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", - "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/hashery": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.1.tgz", - "integrity": "sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "hookified": "^1.15.0" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/hasown": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", - "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hookified": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz", - "integrity": "sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/is-core-module": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", - "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "license": "MIT", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/keyv": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.6.0.tgz", - "integrity": "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@keyv/serialize": "^1.1.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "~1.33.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true, - "license": "(WTFPL OR MIT)" - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-to-regexp": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", - "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", - "dev": true, - "license": "MIT" - }, - "node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/playwright": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", - "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.56.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/playwright-core": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", - "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", - "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/qified": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/qified/-/qified-0.10.1.tgz", - "integrity": "sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hookified": "^2.1.1" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/qified/node_modules/hookified": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/hookified/-/hookified-2.2.0.tgz", - "integrity": "sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==", - "dev": true, - "license": "MIT" - }, - "node_modules/range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/resolve": { - "version": "1.22.12", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", - "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/rollup": { - "version": "4.63.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.2.tgz", - "integrity": "sha512-l5eyksV4tPBj6lJyEa37YzIOCSOV7lkZzEHUdpjWZbtD7wTcFYmEYXSgm5bT4vV+dZLb9rBG1W9GROOG4NS4Ew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.9" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@napi-rs/lzma-linux-x64-gnu": "1.5.1", - "@rollup/rollup-android-arm-eabi": "4.63.2", - "@rollup/rollup-android-arm64": "4.63.2", - "@rollup/rollup-darwin-arm64": "4.63.2", - "@rollup/rollup-darwin-x64": "4.63.2", - "@rollup/rollup-freebsd-arm64": "4.63.2", - "@rollup/rollup-freebsd-x64": "4.63.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.63.2", - "@rollup/rollup-linux-arm-musleabihf": "4.63.2", - "@rollup/rollup-linux-arm64-gnu": "4.63.2", - "@rollup/rollup-linux-arm64-musl": "4.63.2", - "@rollup/rollup-linux-loong64-gnu": "4.63.2", - "@rollup/rollup-linux-loong64-musl": "4.63.2", - "@rollup/rollup-linux-ppc64-gnu": "4.63.2", - "@rollup/rollup-linux-ppc64-musl": "4.63.2", - "@rollup/rollup-linux-riscv64-gnu": "4.63.2", - "@rollup/rollup-linux-riscv64-musl": "4.63.2", - "@rollup/rollup-linux-s390x-gnu": "4.63.2", - "@rollup/rollup-linux-x64-gnu": "4.63.2", - "@rollup/rollup-linux-x64-musl": "4.63.2", - "@rollup/rollup-openbsd-x64": "4.63.2", - "@rollup/rollup-openharmony-arm64": "4.63.2", - "@rollup/rollup-win32-arm64-msvc": "4.63.2", - "@rollup/rollup-win32-ia32-msvc": "4.63.2", - "@rollup/rollup-win32-x64-gnu": "4.63.2", - "@rollup/rollup-win32-x64-msvc": "4.63.2", - "fsevents": "~2.3.2" - } - }, - "node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serve-handler": { - "version": "6.1.7", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz", - "integrity": "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.0.0", - "content-disposition": "0.5.2", - "mime-types": "2.1.18", - "minimatch": "3.1.5", - "path-is-inside": "1.0.2", - "path-to-regexp": "3.3.0", - "range-parser": "1.2.0" - } - }, - "node_modules/serve-handler/node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/ts-api-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", - "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.0.tgz", - "integrity": "sha512-P/W5cz70/cQAuKfY3xwQMWWTV7BvJ0mAQmi+9mBcsVPaBUpd6Ohpa+fECv9rBFrQcig86jAiNBFNWUqnTjr4pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.70.0", - "@typescript-eslint/parser": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0", - "@typescript-eslint/utils": "8.70.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } - } }