From 8afd7b12a0bc4d1e686bdad668adbb7497fbed85 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 8 Jun 2026 17:16:26 +0530 Subject: [PATCH 1/4] chore: update Node.js SDK to 26.2.0 --- CHANGELOG.md | 11 + .../update-membership-privacy-policy.md | 3 +- .../project/update-o-auth-2-server.md | 7 +- package-lock.json | 574 +++++++++--------- package.json | 4 +- src/client.ts | 25 +- src/enums/project-key-scopes.ts | 1 + src/inputFile.ts | 2 +- src/models.ts | 48 ++ src/services/account.ts | 49 ++ src/services/activities.ts | 2 + src/services/advisor.ts | 4 + src/services/avatars.ts | 8 + src/services/backups.ts | 12 + src/services/databases.ts | 65 ++ src/services/functions.ts | 22 + src/services/graphql.ts | 2 + src/services/health.ts | 25 + src/services/locale.ts | 8 + src/services/messaging.ts | 54 ++ src/services/organization.ts | 7 + src/services/presences.ts | 4 + src/services/project.ts | 171 +++++- src/services/proxy.ts | 7 + src/services/sites.ts | 22 + src/services/storage.ts | 11 + src/services/tables-db.ts | 65 ++ src/services/teams.ts | 11 + src/services/tokens.ts | 4 + src/services/usage.ts | 2 + src/services/users.ts | 42 ++ src/services/webhooks.ts | 5 + test/client.test.js | 34 ++ test/services/account.test.js | 4 +- test/services/activities.test.js | 4 +- test/services/advisor.test.js | 4 +- test/services/avatars.test.js | 4 +- test/services/backups.test.js | 4 +- test/services/databases.test.js | 4 +- test/services/functions.test.js | 4 +- test/services/graphql.test.js | 4 +- test/services/health.test.js | 4 +- test/services/locale.test.js | 4 +- test/services/messaging.test.js | 4 +- test/services/organization.test.js | 19 +- test/services/presences.test.js | 4 +- test/services/project.test.js | 99 ++- test/services/proxy.test.js | 4 +- test/services/sites.test.js | 4 +- test/services/storage.test.js | 4 +- test/services/tables-d-b.test.js | 4 +- test/services/teams.test.js | 8 +- test/services/tokens.test.js | 4 +- test/services/usage.test.js | 4 +- test/services/users.test.js | 4 +- test/services/webhooks.test.js | 4 +- 56 files changed, 1145 insertions(+), 372 deletions(-) create mode 100644 test/client.test.js diff --git a/CHANGELOG.md b/CHANGELOG.md index effca6f..f7617e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## 26.2.0 + +* Added: Device Authorization Grant params (`verificationUrl`, `userCodeLength`, `userCodeFormat`, `deviceCodeDuration`) to `updateOAuth2Server` +* Added: `authorizationDetailsTypes` (RFC 9396) param to `updateOAuth2Server` in `project` +* Added: `userAccessedAt` param to `updateMembershipPrivacyPolicy` in `project` +* Added: email classification attributes (`emailCanonical`, `emailIsFree`, `emailIsDisposable`, `emailIsCorporate`, `emailIsCanonical`) to `User` +* Added: `userAccessedAt` attribute to `Membership` +* Added: `dedicatedDatabases.execute` to `ProjectKeyScopes` +* Updated: Replaced HTTP transport with `undici` for requests and self-signed certs + + ## 26.1.0 * Added: `createSesProvider` and `updateSesProvider` to `messaging` diff --git a/docs/examples/project/update-membership-privacy-policy.md b/docs/examples/project/update-membership-privacy-policy.md index 66eff9f..6fda090 100644 --- a/docs/examples/project/update-membership-privacy-policy.md +++ b/docs/examples/project/update-membership-privacy-policy.md @@ -13,6 +13,7 @@ const result = await project.updateMembershipPrivacyPolicy({ userEmail: false, // optional userPhone: false, // optional userName: false, // optional - userMFA: false // optional + userMFA: false, // optional + userAccessedAt: false // optional }); ``` diff --git a/docs/examples/project/update-o-auth-2-server.md b/docs/examples/project/update-o-auth-2-server.md index d852677..5feef6a 100644 --- a/docs/examples/project/update-o-auth-2-server.md +++ b/docs/examples/project/update-o-auth-2-server.md @@ -12,10 +12,15 @@ const result = await project.updateOAuth2Server({ enabled: false, authorizationUrl: 'https://example.com', scopes: [], // optional + authorizationDetailsTypes: [], // optional accessTokenDuration: 60, // optional refreshTokenDuration: 60, // optional publicAccessTokenDuration: 60, // optional publicRefreshTokenDuration: 60, // optional - confidentialPkce: false // optional + confidentialPkce: false, // optional + verificationUrl: 'https://example.com', // optional + userCodeLength: 6, // optional + userCodeFormat: 'numeric', // optional + deviceCodeDuration: 60 // optional }); ``` diff --git a/package-lock.json b/package-lock.json index a4840dc..2ac1a1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,16 @@ { "name": "node-appwrite", - "version": "26.1.0", + "version": "26.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "node-appwrite", - "version": "26.1.0", + "version": "26.2.0", + "license": "BSD-3-Clause", "dependencies": { "json-bigint": "1.0.0", - "node-fetch-native-with-agent": "1.7.2" + "undici": "^6.26.0" }, "devDependencies": { "@types/json-bigint": "1.0.4", @@ -19,17 +20,16 @@ "tslib": "2.6.2", "tsup": "^8.5.1", "typescript": "5.4.2" - }, - "license": "BSD-3-Clause" + } }, "node_modules/@babel/code-frame": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", - "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.28.5", + "@babel/helper-validator-identifier": "^7.29.7", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -38,9 +38,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", - "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", "dev": true, "license": "MIT", "engines": { @@ -48,21 +48,21 @@ } }, "node_modules/@babel/core": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", - "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.29.0", - "@babel/generator": "^7.29.0", - "@babel/helper-compilation-targets": "^7.28.6", - "@babel/helper-module-transforms": "^7.28.6", - "@babel/helpers": "^7.28.6", - "@babel/parser": "^7.29.0", - "@babel/template": "^7.28.6", - "@babel/traverse": "^7.29.0", - "@babel/types": "^7.29.0", + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -79,14 +79,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.29.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", - "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz", + "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.29.0", - "@babel/types": "^7.29.0", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -96,14 +96,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", - "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.28.6", - "@babel/helper-validator-option": "^7.27.1", + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -113,9 +113,9 @@ } }, "node_modules/@babel/helper-globals": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", - "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", "dev": true, "license": "MIT", "engines": { @@ -123,29 +123,29 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", - "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.28.6", - "@babel/types": "^7.28.6" + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", - "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.28.6", - "@babel/helper-validator-identifier": "^7.28.5", - "@babel/traverse": "^7.28.6" + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" }, "engines": { "node": ">=6.9.0" @@ -155,9 +155,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", - "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", "dev": true, "license": "MIT", "engines": { @@ -165,9 +165,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", "dev": true, "license": "MIT", "engines": { @@ -175,9 +175,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", "dev": true, "license": "MIT", "engines": { @@ -185,9 +185,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", - "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", "dev": true, "license": "MIT", "engines": { @@ -195,27 +195,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.29.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", - "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", + "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.28.6", - "@babel/types": "^7.29.0" + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.29.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", - "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.29.0" + "@babel/types": "^7.29.7" }, "bin": { "parser": "bin/babel-parser.js" @@ -280,13 +280,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz", - "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz", + "integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.28.6" + "@babel/helper-plugin-utils": "^7.29.7" }, "engines": { "node": ">=6.9.0" @@ -322,13 +322,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz", - "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz", + "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.28.6" + "@babel/helper-plugin-utils": "^7.29.7" }, "engines": { "node": ">=6.9.0" @@ -448,13 +448,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz", - "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz", + "integrity": "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.28.6" + "@babel/helper-plugin-utils": "^7.29.7" }, "engines": { "node": ">=6.9.0" @@ -464,33 +464,33 @@ } }, "node_modules/@babel/template": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", - "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.28.6", - "@babel/parser": "^7.28.6", - "@babel/types": "^7.28.6" + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", - "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz", + "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.29.0", - "@babel/generator": "^7.29.0", - "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.29.0", - "@babel/template": "^7.28.6", - "@babel/types": "^7.29.0", + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7", "debug": "^4.3.1" }, "engines": { @@ -498,14 +498,14 @@ } }, "node_modules/@babel/types": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", - "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.28.5" + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" }, "engines": { "node": ">=6.9.0" @@ -978,9 +978,9 @@ } }, "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", + "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", "dev": true, "license": "MIT", "engines": { @@ -1330,9 +1330,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.61.1.tgz", + "integrity": "sha512-JnBB8MdXj45cajvTuO5FmPlvFVJRQgvrz1uSEl3NwqFnReAPGwb8EanbGi4z2nRaqLzjJSv5/JmycoTKlRZxHA==", "cpu": [ "arm" ], @@ -1344,9 +1344,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.61.1.tgz", + "integrity": "sha512-Jx2g7iSjw4AOT0HDPHM9RV3GNjRXwybWtSFZiZAYUTjUwjVrYIwq3kBf+LnhqJlzXFAqTAh2F7IGI+O568exPw==", "cpu": [ "arm64" ], @@ -1358,9 +1358,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.61.1.tgz", + "integrity": "sha512-0F1L/Z3Eqv8mT2n3dCpeO8GcTvHvVqkP5/t6DMsn0KzhYVcg+s7Ncl5DS8qjKYEeio6Az0Gt6nyBORay5qIlCA==", "cpu": [ "arm64" ], @@ -1372,9 +1372,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.61.1.tgz", + "integrity": "sha512-qLttcH871ujY4YcVfUSShhOw+CsoTatYz8gRbHO7Bb92QH059/P0y5do1KMs41fY0BpD2x4AJH/gID0zFiqVKQ==", "cpu": [ "x64" ], @@ -1386,9 +1386,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.61.1.tgz", + "integrity": "sha512-fUI4RapGE0Oh3mb8mgfvC1O2nU1RpDZUKnDQm3xB1Ipg7C2wTs5Kstz7G2uWK99a8S2yTMq8/P4uycwNa0nJyw==", "cpu": [ "arm64" ], @@ -1400,9 +1400,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.61.1.tgz", + "integrity": "sha512-H5YrdvJaDtI/U9/emrD4b++xkvp3y/JvOe4rizHbxvkyMfRS/CiRYdji+Pl8D0brEaNFWUh1drQxgAGIl6Xudw==", "cpu": [ "x64" ], @@ -1414,16 +1414,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.61.1.tgz", + "integrity": "sha512-Q8CBCCQtDFrYtXoeUXSrnFXKOnyUhx6bz+SkL6A0E7V8kAiCJ5pamq1WtbfpVGhR5TSpXY6ak3avmDc5fHTyJA==", "cpu": [ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1431,16 +1428,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.61.1.tgz", + "integrity": "sha512-nwnhk1581l0FBVellGcVCAT0Oi06onEA3WB53sf01VO3I0UPBkMH9sXONYME2K0ovXcNayJfNtHfm6mpJElatQ==", "cpu": [ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1448,16 +1442,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.61.1.tgz", + "integrity": "sha512-x5Xr49hwt3hdW75UOZm3395YwwzPyauktslv29KpWL/T+vVAzoT3azLcTWv0eMciBNrx+DYjH4paehHoLpPvpg==", "cpu": [ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1465,16 +1456,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.61.1.tgz", + "integrity": "sha512-unMS3H73DpaoPyyEVPjGKleM/s0mkmsauTENpw4INQY8y4+IuLNjkueQ5QCtC0D3N38Y38yhAU8OoZ20S2Tm6w==", "cpu": [ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1482,16 +1470,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.61.1.tgz", + "integrity": "sha512-zNZzGRnAhwjFEYmvphJRV5XaQGjs62cCmeYYHUT//NbvEnHauw+I85nGG+SiVg5ld4GX8D1IbKIX+ozITQnhMQ==", "cpu": [ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1499,16 +1484,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.61.1.tgz", + "integrity": "sha512-LdpWGL8X209B2SIvWjqlc8VZgM6PKfontSerGepuldQmHYrAOtnMCXeJkxXGbC+PPZVOuu5czJo7fNV6aeW8rQ==", "cpu": [ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1516,16 +1498,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.61.1.tgz", + "integrity": "sha512-EC5kTtNaNGOmbMGqar8dvJy6y/hg99GAwjfBz++pxZhQATXGcRjd6c5en5wcbru0vkRmiMGsQKdMJOOf6sza4g==", "cpu": [ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1533,16 +1512,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.61.1.tgz", + "integrity": "sha512-8hiwp6D4acEcNK78I4rP0/XtS1sknWIAMJBPdR4l6zUtyTm5KiTDr5bXmWt4foY7nAN7AThDHgkLIEZOWKbzWw==", "cpu": [ "ppc64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1550,16 +1526,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.61.1.tgz", + "integrity": "sha512-10dh/h/BqA7DuMPWSxkR8uks18FRwnwOEqr5zOTEl+NOwP/OMzKX8OFR/Of9xxDA7D5qef1Nzar5WDD2kCCr1g==", "cpu": [ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1567,16 +1540,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.61.1.tgz", + "integrity": "sha512-YKJ5lg35DP17gcAOggnihe+APw9HLyj1Xn7gsmGumBJAUDa6NGXNixJzmkWLhcK9TOuuyQjdamzvJefkO7qHZQ==", "cpu": [ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1584,16 +1554,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.61.1.tgz", + "integrity": "sha512-Mlil5G2Jj6a7B3LWGctg+XPL9vdXYuzCtNXfxOQ0nPjc2m6ueUktocPGH9bnAM0bNRKb/bAWTujUU7IJQdQA+g==", "cpu": [ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1601,16 +1568,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.61.1.tgz", + "integrity": "sha512-bVWIOIk6pV01p4CdUbPP7CJ/434z+OooYjDuFcR+44N35YvKUC66G8MGnvcWx5mWKW3g61J+t74l3Kj15Kwn2Q==", "cpu": [ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1618,16 +1582,13 @@ ] }, "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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.61.1.tgz", + "integrity": "sha512-qy5pBvZbqNFheBz61R1rzsezjm0J7O2oNGoWtGoY89SZYLUfxAJTBAqDChqAIdB4rCiIbi9nF7yZ83GnNiLwSw==", "cpu": [ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1635,9 +1596,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.61.1.tgz", + "integrity": "sha512-E83TXjI4zm0+5f2qO+UOudaCYIhYwpJ5jq6YCZNIZ+6CbfhKrkAGezeiASBL9ElxAxFsRS9ZhESv8mfnj6TKeg==", "cpu": [ "x64" ], @@ -1649,9 +1610,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.61.1.tgz", + "integrity": "sha512-fbWnKqVkjrJN38vNe3ahkbk6iejS/3b0Nt7EEtPpE6RBacZcGXNKbzfHN3GUUlXOPghUg0j6XUGrtjX9z1sIvA==", "cpu": [ "arm64" ], @@ -1663,9 +1624,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.61.1.tgz", + "integrity": "sha512-ArMl38iVAbk0New1ogihQNY6iphLi4ZaRsa037gUzv5yeKPY8TD3Dmy4x2RNC1VztU/uqm+G+/RwFrSka3Oy2g==", "cpu": [ "arm64" ], @@ -1677,9 +1638,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.61.1.tgz", + "integrity": "sha512-0mYtjHS9ucAbcATycCNK9IGBk/cCe/ma7EmSLGZdsxnOA8cjRIyU04wDpVAD9NiOfLUR9KTxdiO53uOkherqjQ==", "cpu": [ "ia32" ], @@ -1691,9 +1652,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.61.1.tgz", + "integrity": "sha512-gK1iCEPfpoSG9wfBihXxvBMi8ZfcWffYkEsC/Eih+iFENTaewvNcrEQ69lIOWYO5pePHKLHHO7nq5AILGO/HQQ==", "cpu": [ "x64" ], @@ -1705,9 +1666,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.61.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.61.1.tgz", + "integrity": "sha512-X+zaP2x+j4RXGfbp/seSoRHWnPxzApilDszisZxbYH5C/jTxFhCtDNdPGZb9lJyYPs24wGxruPF7Y+sIXt9Gzw==", "cpu": [ "x64" ], @@ -1791,9 +1752,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" }, @@ -2085,9 +2046,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.10.12", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.12.tgz", - "integrity": "sha512-qyq26DxfY4awP2gIRXhhLWfwzwI+N5Nxk6iQi8EFizIaWIjqicQTE4sLnZZVdeKPRcVNoJOkkpfzoIYuvCKaIQ==", + "version": "2.10.34", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.34.tgz", + "integrity": "sha512-IMDedajPifLnHNY0X9n8hKxRTQ6/eTHwr5bDo04WnuqxyKw6LYtQywCuuqPZwhl3aBXMvQpJov42GLCwRRdQzw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2107,9 +2068,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.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", "dev": true, "license": "MIT", "dependencies": { @@ -2228,9 +2189,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001782", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001782.tgz", - "integrity": "sha512-dZcaJLJeDMh4rELYFw1tvSn1bhZWYFOt468FcbHHxx/Z/dFidd1I6ciyFdi3iwfQCyOjqo9upF6lGQYtMiJWxw==", + "version": "1.0.30001797", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001797.tgz", + "integrity": "sha512-l8xKG+gwAIExZGl9FrF7KUwuOmk6wbEPC9Xoy/RtnWv1XG0Q4LFlagaLpUv3Kiza3W/wm27zy0yWJEieYKAP6w==", "dev": true, "funding": [ { @@ -2509,9 +2470,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.329", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.329.tgz", - "integrity": "sha512-/4t+AS1l4S3ZC0Ja7PHFIWeBIxGA3QGqV8/yKsP36v7NcyUCl+bIcmw6s5zVuMIECWwBrAK/6QLzTmbJChBboQ==", + "version": "1.5.368", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.368.tgz", + "integrity": "sha512-7RckJJK4uESJF9PxvfMWd3TGqIiieUTG4HxnKaKuIpGbcr+r2ZEB3g2gAhCP3Fqm42vJSzLfgab9eva/C4/XVw==", "dev": true, "license": "ISC" }, @@ -2545,6 +2506,16 @@ "is-arrayish": "^0.2.1" } }, + "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/esbuild": { "version": "0.27.7", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", @@ -2853,9 +2824,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": { @@ -2939,13 +2910,13 @@ "license": "MIT" }, "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" @@ -3032,9 +3003,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", + "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", "dev": true, "license": "ISC", "bin": { @@ -3571,9 +3542,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", + "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", "dev": true, "license": "ISC", "bin": { @@ -3857,9 +3828,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", + "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", "dev": true, "license": "ISC", "bin": { @@ -3962,12 +3933,6 @@ "dev": true, "license": "MIT" }, - "node_modules/node-fetch-native-with-agent": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/node-fetch-native-with-agent/-/node-fetch-native-with-agent-1.7.2.tgz", - "integrity": "sha512-5MaOOCuJEvcckoz7/tjdx1M6OusOY6Xc5f459IaruGStWnKzlI1qpNgaAwmn4LmFYcsSlj+jBMk84wmmRxfk5g==", - "license": "MIT" - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -3976,11 +3941,14 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.36", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", - "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", + "version": "2.0.47", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.47.tgz", + "integrity": "sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/normalize-path": { "version": "3.0.0", @@ -4348,12 +4316,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" @@ -4402,13 +4371,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.61.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.61.1.tgz", + "integrity": "sha512-I4KW6iuRpuu2uHBLraZ1wNZe0DP7lnRha+VJ9tNaYVaVgKhW0aI3h4RYnoRPeql0flHm/Co55b7snEDcOfOJrA==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.8" + "@types/estree": "1.0.9" }, "bin": { "rollup": "dist/bin/rollup" @@ -4418,31 +4387,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.61.1", + "@rollup/rollup-android-arm64": "4.61.1", + "@rollup/rollup-darwin-arm64": "4.61.1", + "@rollup/rollup-darwin-x64": "4.61.1", + "@rollup/rollup-freebsd-arm64": "4.61.1", + "@rollup/rollup-freebsd-x64": "4.61.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.61.1", + "@rollup/rollup-linux-arm-musleabihf": "4.61.1", + "@rollup/rollup-linux-arm64-gnu": "4.61.1", + "@rollup/rollup-linux-arm64-musl": "4.61.1", + "@rollup/rollup-linux-loong64-gnu": "4.61.1", + "@rollup/rollup-linux-loong64-musl": "4.61.1", + "@rollup/rollup-linux-ppc64-gnu": "4.61.1", + "@rollup/rollup-linux-ppc64-musl": "4.61.1", + "@rollup/rollup-linux-riscv64-gnu": "4.61.1", + "@rollup/rollup-linux-riscv64-musl": "4.61.1", + "@rollup/rollup-linux-s390x-gnu": "4.61.1", + "@rollup/rollup-linux-x64-gnu": "4.61.1", + "@rollup/rollup-linux-x64-musl": "4.61.1", + "@rollup/rollup-openbsd-x64": "4.61.1", + "@rollup/rollup-openharmony-arm64": "4.61.1", + "@rollup/rollup-win32-arm64-msvc": "4.61.1", + "@rollup/rollup-win32-ia32-msvc": "4.61.1", + "@rollup/rollup-win32-x64-gnu": "4.61.1", + "@rollup/rollup-win32-x64-msvc": "4.61.1", "fsevents": "~2.3.2" } }, @@ -4714,14 +4683,14 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "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.3" + "picomatch": "^4.0.4" }, "engines": { "node": ">=12.0.0" @@ -4906,12 +4875,21 @@ } }, "node_modules/ufo": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.3.tgz", - "integrity": "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.4.tgz", + "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==", "dev": true, "license": "MIT" }, + "node_modules/undici": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.26.0.tgz", + "integrity": "sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==", + "license": "MIT", + "engines": { + "node": ">=18.17" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", diff --git a/package.json b/package.json index c72d435..581a191 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "node-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/index.js", "type": "commonjs", @@ -52,6 +52,6 @@ }, "dependencies": { "json-bigint": "1.0.0", - "node-fetch-native-with-agent": "1.7.2" + "undici": "^6.26.0" } } diff --git a/src/client.ts b/src/client.ts index f5e360e..5bc4e36 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,5 +1,4 @@ -import { fetch, FormData, File } from 'node-fetch-native-with-agent'; -import { createAgent } from 'node-fetch-native-with-agent/agent'; +import { fetch, FormData, File, Agent, type RequestInit } from 'undici'; import { Models } from './models'; import { InputFile } from './inputFile'; import JSONbigModule from 'json-bigint'; @@ -74,7 +73,7 @@ class AppwriteException extends Error { } function getUserAgent() { - let ua = 'AppwriteNodeJSSDK/26.1.0'; + let ua = 'AppwriteNodeJSSDK/26.2.0'; // `process` is a global in Node.js, but not fully available in all runtimes. const platform: string[] = []; @@ -108,6 +107,7 @@ function getUserAgent() { class Client { static CHUNK_SIZE = 1024 * 1024 * 5; + private selfSignedAgent?: Agent; config = { endpoint: 'https://cloud.appwrite.io/v1', @@ -128,7 +128,7 @@ class Client { 'x-sdk-name': 'Node.js', 'x-sdk-platform': 'server', 'x-sdk-language': 'nodejs', - 'x-sdk-version': '26.1.0', + 'x-sdk-version': '26.2.0', 'user-agent' : getUserAgent(), 'X-Appwrite-Response-Format': '1.9.5', }; @@ -170,6 +170,11 @@ class Client { this.config.selfSigned = selfSigned; + if (!selfSigned && this.selfSignedAgent) { + this.selfSignedAgent.destroy(); + this.selfSignedAgent = undefined; + } + return this; } @@ -359,9 +364,19 @@ class Client { let options: RequestInit = { method, headers, - ...createAgent(this.config.endpoint, { rejectUnauthorized: !this.config.selfSigned }), }; + if (this.config.selfSigned) { + if (!this.selfSignedAgent) { + this.selfSignedAgent = new Agent({ + connect: { + rejectUnauthorized: false, + }, + }); + } + options.dispatcher = this.selfSignedAgent; + } + if (method === 'GET') { for (const [key, value] of Object.entries(Client.flatten(params))) { url.searchParams.append(key, value); diff --git a/src/enums/project-key-scopes.ts b/src/enums/project-key-scopes.ts index 47125dd..927acf8 100644 --- a/src/enums/project-key-scopes.ts +++ b/src/enums/project-key-scopes.ts @@ -89,6 +89,7 @@ export enum ProjectKeyScopes { ArchivesWrite = 'archives.write', RestorationsRead = 'restorations.read', RestorationsWrite = 'restorations.write', + DedicatedDatabasesExecute = 'dedicatedDatabases.execute', DomainsRead = 'domains.read', DomainsWrite = 'domains.write', EventsRead = 'events.read', diff --git a/src/inputFile.ts b/src/inputFile.ts index 94afbe2..0545928 100644 --- a/src/inputFile.ts +++ b/src/inputFile.ts @@ -1,4 +1,4 @@ -import { File } from "node-fetch-native-with-agent"; +import { File } from "undici"; type FsPromises = { stat: (path: string) => Promise<{ size: number }>; diff --git a/src/models.ts b/src/models.ts index e081344..2c72952 100644 --- a/src/models.ts +++ b/src/models.ts @@ -2925,6 +2925,26 @@ export namespace Models { * Email verification status. */ emailVerification: boolean; + /** + * Canonical form of the user email address. + */ + emailCanonical?: string; + /** + * Whether the user email is from a free email provider. + */ + emailIsFree?: boolean; + /** + * Whether the user email is from a disposable email provider. + */ + emailIsDisposable?: boolean; + /** + * Whether the user email is from a corporate domain. + */ + emailIsCorporate?: boolean; + /** + * Whether the user email is in its canonical form. + */ + emailIsCanonical?: boolean; /** * Phone verification status. */ @@ -3576,6 +3596,10 @@ export namespace Models { * Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console. */ mfa: boolean; + /** + * Most recent access date in ISO 8601 format. Show this attribute by toggling membership privacy in the Console. + */ + userAccessedAt: string; /** * User list of roles */ @@ -4264,6 +4288,10 @@ export namespace Models { * OAuth2 server allowed scopes */ oAuth2ServerScopes: string[]; + /** + * OAuth2 server accepted RFC 9396 authorization_details types + */ + oAuth2ServerAuthorizationDetailsTypes: string[]; /** * OAuth2 server access token duration in seconds for confidential clients */ @@ -4284,6 +4312,22 @@ export namespace Models { * When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting. */ oAuth2ServerConfidentialPkce: boolean; + /** + * URL to your application page where users enter the device flow user code. Empty when the Device Authorization Grant is not configured. + */ + oAuth2ServerVerificationUrl: string; + /** + * Number of characters in the device flow user code, excluding the formatting separator. + */ + oAuth2ServerUserCodeLength: number; + /** + * Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`. + */ + oAuth2ServerUserCodeFormat: string; + /** + * Lifetime in seconds of device flow device codes and user codes. + */ + oAuth2ServerDeviceCodeDuration: number; /** * OAuth2 server discovery URL */ @@ -5662,6 +5706,10 @@ export namespace Models { * Whether user MFA status is visible in memberships. */ userMFA: boolean; + /** + * Whether user last access time is visible in memberships. + */ + userAccessedAt: boolean; } /** diff --git a/src/services/account.ts b/src/services/account.ts index 4519e3f..474bfba 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -27,6 +27,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -111,6 +112,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( @@ -182,6 +184,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( @@ -242,6 +245,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -348,6 +352,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( @@ -408,6 +413,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -464,6 +470,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( @@ -518,6 +525,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( @@ -571,6 +579,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( @@ -636,6 +645,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( @@ -700,6 +710,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( @@ -864,6 +875,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( @@ -920,6 +932,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( @@ -988,6 +1001,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( @@ -1055,6 +1069,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( @@ -1080,6 +1095,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1104,6 +1120,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1129,6 +1146,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1153,6 +1171,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1179,6 +1198,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( @@ -1204,6 +1224,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( @@ -1230,6 +1251,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( @@ -1255,6 +1277,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( @@ -1311,6 +1334,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( @@ -1375,6 +1399,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( @@ -1442,6 +1467,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( @@ -1466,6 +1492,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1522,6 +1549,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( @@ -1589,6 +1617,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( @@ -1670,6 +1699,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( @@ -1694,6 +1724,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1744,6 +1775,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( @@ -1815,6 +1847,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( @@ -1883,6 +1916,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( @@ -1951,6 +1985,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( @@ -2018,6 +2053,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( @@ -2070,6 +2106,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -2123,6 +2160,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( @@ -2201,6 +2239,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( @@ -2281,6 +2320,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( @@ -2368,6 +2408,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( @@ -2450,6 +2491,7 @@ export class Account { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'text/html', } return this.client.redirect( @@ -2521,6 +2563,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( @@ -2583,6 +2626,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( @@ -2646,6 +2690,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( @@ -2713,6 +2758,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( @@ -2781,6 +2827,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( @@ -2806,6 +2853,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( @@ -2873,6 +2921,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( diff --git a/src/services/activities.ts b/src/services/activities.ts index 0e86ab7..10b8062 100644 --- a/src/services/activities.ts +++ b/src/services/activities.ts @@ -52,6 +52,7 @@ export class Activities { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -106,6 +107,7 @@ export class Activities { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/advisor.ts b/src/services/advisor.ts index 2264c57..c735c29 100644 --- a/src/services/advisor.ts +++ b/src/services/advisor.ts @@ -62,6 +62,7 @@ export class Advisor { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -116,6 +117,7 @@ export class Advisor { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -240,6 +242,7 @@ export class Advisor { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -302,6 +305,7 @@ export class Advisor { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/avatars.ts b/src/services/avatars.ts index 2297c78..0e71d1a 100644 --- a/src/services/avatars.ts +++ b/src/services/avatars.ts @@ -85,6 +85,7 @@ export class Avatars { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'image/png', } return this.client.call( @@ -166,6 +167,7 @@ export class Avatars { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'image/png', } return this.client.call( @@ -226,6 +228,7 @@ export class Avatars { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'image/*', } return this.client.call( @@ -307,6 +310,7 @@ export class Avatars { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'image/png', } return this.client.call( @@ -386,6 +390,7 @@ export class Avatars { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'image/*', } return this.client.call( @@ -471,6 +476,7 @@ export class Avatars { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'image/png', } return this.client.call( @@ -551,6 +557,7 @@ export class Avatars { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'image/png', } return this.client.call( @@ -749,6 +756,7 @@ export class Avatars { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'image/png', } return this.client.call( diff --git a/src/services/backups.ts b/src/services/backups.ts index ea371f1..098db6d 100644 --- a/src/services/backups.ts +++ b/src/services/backups.ts @@ -53,6 +53,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -117,6 +118,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -169,6 +171,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -222,6 +225,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -274,6 +278,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -382,6 +387,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -434,6 +440,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -516,6 +523,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -569,6 +577,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -650,6 +659,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -702,6 +712,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -754,6 +765,7 @@ export class Backups { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/databases.ts b/src/services/databases.ts index 8f3b589..8107a94 100644 --- a/src/services/databases.ts +++ b/src/services/databases.ts @@ -72,6 +72,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -149,6 +150,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( @@ -201,6 +203,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -254,6 +257,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( @@ -306,6 +310,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -374,6 +379,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( @@ -488,6 +494,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( @@ -541,6 +548,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -610,6 +618,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( @@ -739,6 +748,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -849,6 +859,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( @@ -910,6 +921,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1007,6 +1019,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( @@ -1144,6 +1157,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1256,6 +1270,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( @@ -1368,6 +1383,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( @@ -1466,6 +1482,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( @@ -1562,6 +1579,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( @@ -1658,6 +1676,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( @@ -1754,6 +1773,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( @@ -1852,6 +1872,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( @@ -1950,6 +1971,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( @@ -2058,6 +2080,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( @@ -2166,6 +2189,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( @@ -2278,6 +2302,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( @@ -2390,6 +2415,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( @@ -2502,6 +2528,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( @@ -2614,6 +2641,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( @@ -2712,6 +2740,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( @@ -2810,6 +2839,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( @@ -2899,6 +2929,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( @@ -2992,6 +3023,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( @@ -3096,6 +3128,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( @@ -3193,6 +3226,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( @@ -3297,6 +3331,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( @@ -3394,6 +3429,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( @@ -3483,6 +3519,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( @@ -3576,6 +3613,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( @@ -3665,6 +3703,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( @@ -3758,6 +3797,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( @@ -3870,6 +3910,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( @@ -3955,6 +3996,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( @@ -4070,6 +4112,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( @@ -4175,6 +4218,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( @@ -4279,6 +4323,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( @@ -4376,6 +4421,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( @@ -4474,6 +4520,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( @@ -4572,6 +4619,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( @@ -4686,6 +4734,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( @@ -4790,6 +4839,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( @@ -4858,6 +4908,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5016,6 +5067,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5112,6 +5164,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( @@ -5191,6 +5244,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( @@ -5272,6 +5326,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( @@ -5355,6 +5410,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( @@ -5431,6 +5487,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( @@ -5513,6 +5570,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5603,6 +5661,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( @@ -5693,6 +5752,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( @@ -5866,6 +5926,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( @@ -5963,6 +6024,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( @@ -6038,6 +6100,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -6146,6 +6209,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( @@ -6214,6 +6278,7 @@ export class Databases { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/functions.ts b/src/services/functions.ts index 9941b3c..1a0fb93 100644 --- a/src/services/functions.ts +++ b/src/services/functions.ts @@ -74,6 +74,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -284,6 +285,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -308,6 +310,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -332,6 +335,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -384,6 +388,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -588,6 +593,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -705,6 +711,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -779,6 +786,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -878,6 +886,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'multipart/form-data', + 'accept': 'application/json', } return this.client.chunkedUpload( @@ -950,6 +959,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1065,6 +1075,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1150,6 +1161,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1210,6 +1222,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1338,6 +1351,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': '*/*', } return this.client.call( @@ -1400,6 +1414,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1467,6 +1482,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1563,6 +1579,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1623,6 +1640,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1751,6 +1769,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1842,6 +1861,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1902,6 +1922,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1984,6 +2005,7 @@ export class Functions { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/graphql.ts b/src/services/graphql.ts index 1dd39ff..741f45f 100644 --- a/src/services/graphql.ts +++ b/src/services/graphql.ts @@ -57,6 +57,7 @@ export class Graphql { 'X-Appwrite-Project': this.client.config.project, 'x-sdk-graphql': 'true', 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -114,6 +115,7 @@ export class Graphql { 'X-Appwrite-Project': this.client.config.project, 'x-sdk-graphql': 'true', 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/health.ts b/src/services/health.ts index 2100916..6b8ceda 100644 --- a/src/services/health.ts +++ b/src/services/health.ts @@ -25,6 +25,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -49,6 +50,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -74,6 +76,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -98,6 +101,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -150,6 +154,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -212,6 +217,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -236,6 +242,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -260,6 +267,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -314,6 +322,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -366,6 +375,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -418,6 +428,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -478,6 +489,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -530,6 +542,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -592,6 +605,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -644,6 +658,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -696,6 +711,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -748,6 +764,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -800,6 +817,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -852,6 +870,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -904,6 +923,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -956,6 +976,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1008,6 +1029,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1032,6 +1054,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1056,6 +1079,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1080,6 +1104,7 @@ export class Health { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/locale.ts b/src/services/locale.ts index c5abcf9..56b45d2 100644 --- a/src/services/locale.ts +++ b/src/services/locale.ts @@ -26,6 +26,7 @@ export class Locale { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -50,6 +51,7 @@ export class Locale { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -74,6 +76,7 @@ export class Locale { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -98,6 +101,7 @@ export class Locale { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -122,6 +126,7 @@ export class Locale { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -146,6 +151,7 @@ export class Locale { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -170,6 +176,7 @@ export class Locale { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -194,6 +201,7 @@ export class Locale { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/messaging.ts b/src/services/messaging.ts index cddcf90..a1c719a 100644 --- a/src/services/messaging.ts +++ b/src/services/messaging.ts @@ -69,6 +69,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -209,6 +210,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( @@ -342,6 +344,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( @@ -525,6 +528,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( @@ -707,6 +711,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( @@ -810,6 +815,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( @@ -912,6 +918,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( @@ -1011,6 +1018,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( @@ -1109,6 +1117,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( @@ -1163,6 +1172,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1283,6 +1293,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1350,6 +1361,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1417,6 +1429,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1527,6 +1540,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( @@ -1636,6 +1650,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( @@ -1740,6 +1755,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( @@ -1843,6 +1859,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( @@ -1925,6 +1942,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( @@ -2006,6 +2024,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( @@ -2082,6 +2101,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( @@ -2157,6 +2177,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( @@ -2280,6 +2301,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( @@ -2397,6 +2419,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( @@ -2492,6 +2515,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( @@ -2581,6 +2605,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( @@ -2690,6 +2715,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( @@ -2793,6 +2819,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( @@ -2902,6 +2929,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( @@ -3005,6 +3033,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( @@ -3128,6 +3157,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( @@ -3245,6 +3275,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( @@ -3400,6 +3431,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( @@ -3554,6 +3586,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( @@ -3700,6 +3733,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( @@ -3845,6 +3879,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( @@ -3940,6 +3975,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( @@ -4029,6 +4065,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( @@ -4124,6 +4161,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( @@ -4213,6 +4251,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( @@ -4308,6 +4347,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( @@ -4397,6 +4437,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( @@ -4492,6 +4533,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( @@ -4581,6 +4623,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( @@ -4635,6 +4678,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -4755,6 +4799,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -4822,6 +4867,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -4889,6 +4935,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -4963,6 +5010,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( @@ -5017,6 +5065,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5087,6 +5136,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( @@ -5207,6 +5257,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5281,6 +5332,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5355,6 +5407,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( @@ -5417,6 +5470,7 @@ export class Messaging { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/organization.ts b/src/services/organization.ts index a3b4545..c28cc7b 100644 --- a/src/services/organization.ts +++ b/src/services/organization.ts @@ -62,6 +62,7 @@ export class Organization { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -146,6 +147,7 @@ export class Organization { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -198,6 +200,7 @@ export class Organization { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -279,6 +282,7 @@ export class Organization { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -399,6 +403,7 @@ export class Organization { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -473,6 +478,7 @@ export class Organization { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -589,6 +595,7 @@ export class Organization { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/presences.ts b/src/services/presences.ts index 939aa92..51fb984 100644 --- a/src/services/presences.ts +++ b/src/services/presences.ts @@ -69,6 +69,7 @@ export class Presences { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -123,6 +124,7 @@ export class Presences { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -220,6 +222,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( @@ -321,6 +324,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( diff --git a/src/services/project.ts b/src/services/project.ts index decbca9..45207af 100644 --- a/src/services/project.ts +++ b/src/services/project.ts @@ -123,6 +123,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -183,6 +184,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -271,6 +273,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -342,6 +345,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -394,6 +398,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -475,6 +480,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -584,6 +590,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -644,6 +651,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -711,6 +719,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -763,6 +772,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -827,6 +837,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -940,6 +951,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -956,60 +968,80 @@ export class Project { * @param {boolean} params.enabled - Enable or disable the OAuth2 server. * @param {string} params.authorizationUrl - URL to your application with consent screen. * @param {string[]} params.scopes - List of allowed OAuth2 scopes. Maximum of 100 scopes are allowed, each up to 128 characters long. + * @param {string[]} params.authorizationDetailsTypes - List of accepted `authorization_details` types. Maximum of 100 types are allowed, each up to 128 characters long. * @param {number} params.accessTokenDuration - Access token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 8 hours. * @param {number} params.refreshTokenDuration - Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year. * @param {number} params.publicAccessTokenDuration - Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour. * @param {number} params.publicRefreshTokenDuration - Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days. * @param {boolean} params.confidentialPkce - When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting. + * @param {string} params.verificationUrl - URL to your application page where users enter the device flow user code. Required to enable the Device Authorization Grant. + * @param {number} params.userCodeLength - Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8. + * @param {string} params.userCodeFormat - Character set for device flow user codes: `numeric` (digits only — best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits — highest entropy per character). Defaults to `alphanumeric`. + * @param {number} params.deviceCodeDuration - Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600. * @throws {AppwriteException} * @returns {Promise} */ - updateOAuth2Server(params: { enabled: boolean, authorizationUrl: string, scopes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean }): Promise; + updateOAuth2Server(params: { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number }): Promise; /** * Update the OAuth2 server (OIDC provider) configuration. * * @param {boolean} enabled - Enable or disable the OAuth2 server. * @param {string} authorizationUrl - URL to your application with consent screen. * @param {string[]} scopes - List of allowed OAuth2 scopes. Maximum of 100 scopes are allowed, each up to 128 characters long. + * @param {string[]} authorizationDetailsTypes - List of accepted `authorization_details` types. Maximum of 100 types are allowed, each up to 128 characters long. * @param {number} accessTokenDuration - Access token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 8 hours. * @param {number} refreshTokenDuration - Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year. * @param {number} publicAccessTokenDuration - Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour. * @param {number} publicRefreshTokenDuration - Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days. * @param {boolean} confidentialPkce - When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting. + * @param {string} verificationUrl - URL to your application page where users enter the device flow user code. Required to enable the Device Authorization Grant. + * @param {number} userCodeLength - Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8. + * @param {string} userCodeFormat - Character set for device flow user codes: `numeric` (digits only — best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits — highest entropy per character). Defaults to `alphanumeric`. + * @param {number} deviceCodeDuration - Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateOAuth2Server(enabled: boolean, authorizationUrl: string, scopes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean): Promise; + updateOAuth2Server(enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number): Promise; updateOAuth2Server( - paramsOrFirst: { enabled: boolean, authorizationUrl: string, scopes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean } | boolean, - ...rest: [(string)?, (string[])?, (number)?, (number)?, (number)?, (number)?, (boolean)?] + paramsOrFirst: { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number } | boolean, + ...rest: [(string)?, (string[])?, (string[])?, (number)?, (number)?, (number)?, (number)?, (boolean)?, (string)?, (number)?, (string)?, (number)?] ): Promise { - let params: { enabled: boolean, authorizationUrl: string, scopes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean }; + let params: { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { enabled: boolean, authorizationUrl: string, scopes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean }; + params = (paramsOrFirst || {}) as { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number }; } else { params = { enabled: paramsOrFirst as boolean, authorizationUrl: rest[0] as string, scopes: rest[1] as string[], - accessTokenDuration: rest[2] as number, - refreshTokenDuration: rest[3] as number, - publicAccessTokenDuration: rest[4] as number, - publicRefreshTokenDuration: rest[5] as number, - confidentialPkce: rest[6] as boolean + authorizationDetailsTypes: rest[2] as string[], + accessTokenDuration: rest[3] as number, + refreshTokenDuration: rest[4] as number, + publicAccessTokenDuration: rest[5] as number, + publicRefreshTokenDuration: rest[6] as number, + confidentialPkce: rest[7] as boolean, + verificationUrl: rest[8] as string, + userCodeLength: rest[9] as number, + userCodeFormat: rest[10] as string, + deviceCodeDuration: rest[11] as number }; } const enabled = params.enabled; const authorizationUrl = params.authorizationUrl; const scopes = params.scopes; + const authorizationDetailsTypes = params.authorizationDetailsTypes; const accessTokenDuration = params.accessTokenDuration; const refreshTokenDuration = params.refreshTokenDuration; const publicAccessTokenDuration = params.publicAccessTokenDuration; const publicRefreshTokenDuration = params.publicRefreshTokenDuration; const confidentialPkce = params.confidentialPkce; + const verificationUrl = params.verificationUrl; + const userCodeLength = params.userCodeLength; + const userCodeFormat = params.userCodeFormat; + const deviceCodeDuration = params.deviceCodeDuration; if (typeof enabled === 'undefined') { throw new AppwriteException('Missing required parameter: "enabled"'); @@ -1029,6 +1061,9 @@ export class Project { if (typeof scopes !== 'undefined') { payload['scopes'] = scopes; } + if (typeof authorizationDetailsTypes !== 'undefined') { + payload['authorizationDetailsTypes'] = authorizationDetailsTypes; + } if (typeof accessTokenDuration !== 'undefined') { payload['accessTokenDuration'] = accessTokenDuration; } @@ -1044,11 +1079,24 @@ export class Project { if (typeof confidentialPkce !== 'undefined') { payload['confidentialPkce'] = confidentialPkce; } + if (typeof verificationUrl !== 'undefined') { + payload['verificationUrl'] = verificationUrl; + } + if (typeof userCodeLength !== 'undefined') { + payload['userCodeLength'] = userCodeLength; + } + if (typeof userCodeFormat !== 'undefined') { + payload['userCodeFormat'] = userCodeFormat; + } + if (typeof deviceCodeDuration !== 'undefined') { + payload['deviceCodeDuration'] = deviceCodeDuration; + } 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( @@ -1117,6 +1165,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1199,6 +1248,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1274,6 +1324,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1349,6 +1400,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1417,6 +1469,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1485,6 +1538,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1553,6 +1607,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1621,6 +1676,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1689,6 +1745,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1757,6 +1814,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1825,6 +1883,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1893,6 +1952,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1961,6 +2021,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2029,6 +2090,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2097,6 +2159,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2172,6 +2235,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2240,6 +2304,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2315,6 +2380,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2390,6 +2456,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2472,6 +2539,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2540,6 +2608,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2608,6 +2677,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2683,6 +2753,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2751,6 +2822,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2847,6 +2919,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2929,6 +3002,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2997,6 +3071,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3065,6 +3140,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3133,6 +3209,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3201,6 +3278,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3269,6 +3347,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3337,6 +3416,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3405,6 +3485,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3473,6 +3554,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3541,6 +3623,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3609,6 +3692,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3677,6 +3761,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3745,6 +3830,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3813,6 +3899,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3881,6 +3968,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3949,6 +4037,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4017,6 +4106,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4069,6 +4159,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -4129,6 +4220,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -4206,6 +4298,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4280,6 +4373,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4357,6 +4451,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4431,6 +4526,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4508,6 +4604,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4582,6 +4679,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4659,6 +4757,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4733,6 +4832,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4810,6 +4910,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4884,6 +4985,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -4936,6 +5038,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5049,6 +5152,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5105,6 +5209,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5161,6 +5266,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5217,6 +5323,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5235,10 +5342,11 @@ export class Project { * @param {boolean} params.userPhone - Set to true if you want make user phone number visible to all team members, or false to hide it. * @param {boolean} params.userName - Set to true if you want make user name visible to all team members, or false to hide it. * @param {boolean} params.userMFA - Set to true if you want make user MFA status visible to all team members, or false to hide it. + * @param {boolean} params.userAccessedAt - Set to true if you want make user last access time visible to all team members, or false to hide it. * @throws {AppwriteException} * @returns {Promise} */ - updateMembershipPrivacyPolicy(params?: { userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean }): Promise; + updateMembershipPrivacyPolicy(params?: { userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean, userAccessedAt?: boolean }): Promise; /** * Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members.. * @@ -5247,26 +5355,28 @@ export class Project { * @param {boolean} userPhone - Set to true if you want make user phone number visible to all team members, or false to hide it. * @param {boolean} userName - Set to true if you want make user name visible to all team members, or false to hide it. * @param {boolean} userMFA - Set to true if you want make user MFA status visible to all team members, or false to hide it. + * @param {boolean} userAccessedAt - Set to true if you want make user last access time visible to all team members, or false to hide it. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateMembershipPrivacyPolicy(userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean): Promise; + updateMembershipPrivacyPolicy(userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean, userAccessedAt?: boolean): Promise; updateMembershipPrivacyPolicy( - paramsOrFirst?: { userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean } | boolean, - ...rest: [(boolean)?, (boolean)?, (boolean)?, (boolean)?] + paramsOrFirst?: { userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean, userAccessedAt?: boolean } | boolean, + ...rest: [(boolean)?, (boolean)?, (boolean)?, (boolean)?, (boolean)?] ): Promise { - let params: { userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean }; + let params: { userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean, userAccessedAt?: boolean }; if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean }; + params = (paramsOrFirst || {}) as { userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean, userAccessedAt?: boolean }; } else { params = { userId: paramsOrFirst as boolean, userEmail: rest[0] as boolean, userPhone: rest[1] as boolean, userName: rest[2] as boolean, - userMFA: rest[3] as boolean + userMFA: rest[3] as boolean, + userAccessedAt: rest[4] as boolean }; } @@ -5275,6 +5385,7 @@ export class Project { const userPhone = params.userPhone; const userName = params.userName; const userMFA = params.userMFA; + const userAccessedAt = params.userAccessedAt; const apiPath = '/project/policies/membership-privacy'; @@ -5294,11 +5405,15 @@ export class Project { if (typeof userMFA !== 'undefined') { payload['userMFA'] = userMFA; } + if (typeof userAccessedAt !== 'undefined') { + payload['userAccessedAt'] = userAccessedAt; + } 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( @@ -5355,6 +5470,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5415,6 +5531,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5471,6 +5588,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5553,6 +5671,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5609,6 +5728,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5665,6 +5785,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5721,6 +5842,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5777,6 +5899,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5833,6 +5956,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -5885,6 +6009,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5949,6 +6074,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -6013,6 +6139,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -6130,6 +6257,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -6246,6 +6374,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -6352,6 +6481,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -6412,6 +6542,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -6472,6 +6603,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -6556,6 +6688,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -6608,6 +6741,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -6683,6 +6817,7 @@ export class Project { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/proxy.ts b/src/services/proxy.ts index b5a90b5..b2c53fa 100644 --- a/src/services/proxy.ts +++ b/src/services/proxy.ts @@ -62,6 +62,7 @@ export class Proxy { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -122,6 +123,7 @@ export class Proxy { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -200,6 +202,7 @@ export class Proxy { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -301,6 +304,7 @@ export class Proxy { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -379,6 +383,7 @@ export class Proxy { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -431,6 +436,7 @@ export class Proxy { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -537,6 +543,7 @@ export class Proxy { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/sites.ts b/src/services/sites.ts index 6d6cdce..0de414a 100644 --- a/src/services/sites.ts +++ b/src/services/sites.ts @@ -74,6 +74,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -294,6 +295,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -318,6 +320,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -342,6 +345,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -394,6 +398,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -608,6 +613,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -725,6 +731,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -799,6 +806,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -894,6 +902,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'multipart/form-data', + 'accept': 'application/json', } return this.client.chunkedUpload( @@ -959,6 +968,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1074,6 +1084,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1159,6 +1170,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1219,6 +1231,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1347,6 +1360,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': '*/*', } return this.client.call( @@ -1409,6 +1423,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1476,6 +1491,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1536,6 +1552,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1597,6 +1614,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1664,6 +1682,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1755,6 +1774,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1815,6 +1835,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1897,6 +1918,7 @@ export class Sites { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/storage.ts b/src/services/storage.ts index e9b4d62..f4ae7a0 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -71,6 +71,7 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -201,6 +202,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( @@ -253,6 +255,7 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -380,6 +383,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( @@ -507,6 +511,7 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -605,6 +610,7 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'multipart/form-data', + 'accept': 'application/json', } return this.client.chunkedUpload( @@ -666,6 +672,7 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -741,6 +748,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( @@ -869,6 +877,7 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': '*/*', } return this.client.call( @@ -1014,6 +1023,7 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'image/*', } return this.client.call( @@ -1082,6 +1092,7 @@ export class Storage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': '*/*', } return this.client.call( diff --git a/src/services/tables-db.ts b/src/services/tables-db.ts index 811cd77..aa4248f 100644 --- a/src/services/tables-db.ts +++ b/src/services/tables-db.ts @@ -71,6 +71,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -147,6 +148,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( @@ -199,6 +201,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -252,6 +255,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( @@ -304,6 +308,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -372,6 +377,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( @@ -486,6 +492,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( @@ -538,6 +545,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -606,6 +614,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( @@ -733,6 +742,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -842,6 +852,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( @@ -902,6 +913,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -998,6 +1010,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( @@ -1133,6 +1146,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1244,6 +1258,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( @@ -1355,6 +1370,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( @@ -1452,6 +1468,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( @@ -1547,6 +1564,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( @@ -1642,6 +1660,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( @@ -1737,6 +1756,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( @@ -1834,6 +1854,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( @@ -1931,6 +1952,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( @@ -2036,6 +2058,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( @@ -2143,6 +2166,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( @@ -2254,6 +2278,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( @@ -2365,6 +2390,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( @@ -2476,6 +2502,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( @@ -2587,6 +2614,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( @@ -2684,6 +2712,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( @@ -2781,6 +2810,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( @@ -2869,6 +2899,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( @@ -2961,6 +2992,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( @@ -3065,6 +3097,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( @@ -3162,6 +3195,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( @@ -3266,6 +3300,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( @@ -3363,6 +3398,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( @@ -3451,6 +3487,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( @@ -3543,6 +3580,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( @@ -3631,6 +3669,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( @@ -3723,6 +3762,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( @@ -3834,6 +3874,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( @@ -3949,6 +3990,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( @@ -4054,6 +4096,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( @@ -4158,6 +4201,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( @@ -4255,6 +4299,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( @@ -4352,6 +4397,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( @@ -4449,6 +4495,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( @@ -4563,6 +4610,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( @@ -4667,6 +4715,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( @@ -4734,6 +4783,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -4886,6 +4936,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( @@ -4960,6 +5011,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5067,6 +5119,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( @@ -5134,6 +5187,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5290,6 +5344,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5385,6 +5440,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( @@ -5463,6 +5519,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( @@ -5543,6 +5600,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( @@ -5625,6 +5683,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( @@ -5700,6 +5759,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( @@ -5781,6 +5841,7 @@ export class TablesDB { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -5870,6 +5931,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( @@ -5959,6 +6021,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( @@ -6130,6 +6193,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( @@ -6226,6 +6290,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( diff --git a/src/services/teams.ts b/src/services/teams.ts index 9c298cb..3a77c58 100644 --- a/src/services/teams.ts +++ b/src/services/teams.ts @@ -67,6 +67,7 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -141,6 +142,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( @@ -193,6 +195,7 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -257,6 +260,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( @@ -384,6 +388,7 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -497,6 +502,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( @@ -557,6 +563,7 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -630,6 +637,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( @@ -778,6 +786,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( @@ -830,6 +839,7 @@ export class Teams { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -894,6 +904,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( diff --git a/src/services/tokens.ts b/src/services/tokens.ts index 368d4a1..18b0fed 100644 --- a/src/services/tokens.ts +++ b/src/services/tokens.ts @@ -74,6 +74,7 @@ export class Tokens { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -142,6 +143,7 @@ export class Tokens { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -194,6 +196,7 @@ export class Tokens { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -255,6 +258,7 @@ export class Tokens { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/usage.ts b/src/services/usage.ts index 43499c7..f7d485e 100644 --- a/src/services/usage.ts +++ b/src/services/usage.ts @@ -60,6 +60,7 @@ export class Usage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -120,6 +121,7 @@ export class Usage { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/users.ts b/src/services/users.ts index 61f85f9..44a107a 100644 --- a/src/services/users.ts +++ b/src/services/users.ts @@ -70,6 +70,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -155,6 +156,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -239,6 +241,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -323,6 +326,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -390,6 +394,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -527,6 +532,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -611,6 +617,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -745,6 +752,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -859,6 +867,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -950,6 +959,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1002,6 +1012,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1119,6 +1130,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1185,6 +1197,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1253,6 +1266,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1321,6 +1335,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1388,6 +1403,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1462,6 +1478,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1527,6 +1544,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1591,6 +1609,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -1767,6 +1786,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1819,6 +1839,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1872,6 +1893,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1924,6 +1946,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -1978,6 +2001,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2031,6 +2055,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2085,6 +2110,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2138,6 +2164,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2202,6 +2229,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2266,6 +2294,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2330,6 +2359,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2382,6 +2412,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -2446,6 +2477,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2506,6 +2538,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -2563,6 +2596,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2741,6 +2775,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2808,6 +2843,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -2906,6 +2942,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -2966,6 +3003,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -3048,6 +3086,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3179,6 +3218,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3243,6 +3283,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -3307,6 +3348,7 @@ export class Users { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( diff --git a/src/services/webhooks.ts b/src/services/webhooks.ts index f73792e..cf096f8 100644 --- a/src/services/webhooks.ts +++ b/src/services/webhooks.ts @@ -60,6 +60,7 @@ export class Webhooks { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -182,6 +183,7 @@ export class Webhooks { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -234,6 +236,7 @@ export class Webhooks { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, + 'accept': 'application/json', } return this.client.call( @@ -346,6 +349,7 @@ export class Webhooks { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( @@ -460,6 +464,7 @@ export class Webhooks { const apiHeaders: { [header: string]: string } = { 'X-Appwrite-Project': this.client.config.project, 'content-type': 'application/json', + 'accept': 'application/json', } return this.client.call( diff --git a/test/client.test.js b/test/client.test.js new file mode 100644 index 0000000..0e10914 --- /dev/null +++ b/test/client.test.js @@ -0,0 +1,34 @@ +const { Client } = require("../dist/client"); +const { fetch: mockedFetch, Response, Dispatcher } = require("undici"); + +jest.mock("undici", () => ({ ...jest.requireActual("undici"), fetch: jest.fn() })); + +describe("Client", () => { + beforeEach(() => { + mockedFetch.mockReset(); + mockedFetch.mockImplementation(() => Response.json({ ok: true })); + }); + + test("does not include a dispatcher by default", async () => { + const client = new Client(); + + await client.call("GET", new URL("https://cloud.appwrite.io/v1/health")); + + expect(mockedFetch).toHaveBeenCalledTimes(1); + expect(mockedFetch.mock.calls[0][1]).not.toHaveProperty("dispatcher"); + }); + + test("includes a dispatcher for self-signed requests", async () => { + const client = new Client(); + client.setSelfSigned(true); + + try { + await client.call("GET", new URL("https://self-hosted.example/v1/health")); + + expect(mockedFetch).toHaveBeenCalledTimes(1); + expect(mockedFetch.mock.calls[0][1].dispatcher).toBeInstanceOf(Dispatcher); + } finally { + client.setSelfSigned(false); + } + }); +}); diff --git a/test/services/account.test.js b/test/services/account.test.js index a9bbd59..f13cbde 100644 --- a/test/services/account.test.js +++ b/test/services/account.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Account } = require("../../dist/services/account"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Account', () => { const client = new Client(); diff --git a/test/services/activities.test.js b/test/services/activities.test.js index 08d0d90..e7c258a 100644 --- a/test/services/activities.test.js +++ b/test/services/activities.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Activities } = require("../../dist/services/activities"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Activities', () => { const client = new Client(); diff --git a/test/services/advisor.test.js b/test/services/advisor.test.js index 5160f13..401e34a 100644 --- a/test/services/advisor.test.js +++ b/test/services/advisor.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Advisor } = require("../../dist/services/advisor"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Advisor', () => { const client = new Client(); diff --git a/test/services/avatars.test.js b/test/services/avatars.test.js index ea4f379..56da275 100644 --- a/test/services/avatars.test.js +++ b/test/services/avatars.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Avatars } = require("../../dist/services/avatars"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Avatars', () => { const client = new Client(); diff --git a/test/services/backups.test.js b/test/services/backups.test.js index c888402..a5e5599 100644 --- a/test/services/backups.test.js +++ b/test/services/backups.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Backups } = require("../../dist/services/backups"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Backups', () => { const client = new Client(); diff --git a/test/services/databases.test.js b/test/services/databases.test.js index 241f44f..2b20a4f 100644 --- a/test/services/databases.test.js +++ b/test/services/databases.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Databases } = require("../../dist/services/databases"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Databases', () => { const client = new Client(); diff --git a/test/services/functions.test.js b/test/services/functions.test.js index 02dd3d2..e805931 100644 --- a/test/services/functions.test.js +++ b/test/services/functions.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Functions } = require("../../dist/services/functions"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Functions', () => { const client = new Client(); diff --git a/test/services/graphql.test.js b/test/services/graphql.test.js index da7e49b..6f2577d 100644 --- a/test/services/graphql.test.js +++ b/test/services/graphql.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Graphql } = require("../../dist/services/graphql"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Graphql', () => { const client = new Client(); diff --git a/test/services/health.test.js b/test/services/health.test.js index afbf5fa..3e306fe 100644 --- a/test/services/health.test.js +++ b/test/services/health.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Health } = require("../../dist/services/health"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Health', () => { const client = new Client(); diff --git a/test/services/locale.test.js b/test/services/locale.test.js index 51ef111..675b715 100644 --- a/test/services/locale.test.js +++ b/test/services/locale.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Locale } = require("../../dist/services/locale"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Locale', () => { const client = new Client(); diff --git a/test/services/messaging.test.js b/test/services/messaging.test.js index 3951633..1a08800 100644 --- a/test/services/messaging.test.js +++ b/test/services/messaging.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Messaging } = require("../../dist/services/messaging"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Messaging', () => { const client = new Client(); diff --git a/test/services/organization.test.js b/test/services/organization.test.js index f5bf2d2..a2a6a29 100644 --- a/test/services/organization.test.js +++ b/test/services/organization.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Organization } = require("../../dist/services/organization"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Organization', () => { const client = new Client(); @@ -158,11 +158,16 @@ describe('Organization', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -208,11 +213,16 @@ describe('Organization', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -257,11 +267,16 @@ describe('Organization', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); diff --git a/test/services/presences.test.js b/test/services/presences.test.js index e6e25bb..5f570cc 100644 --- a/test/services/presences.test.js +++ b/test/services/presences.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Presences } = require("../../dist/services/presences"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Presences', () => { const client = new Client(); diff --git a/test/services/project.test.js b/test/services/project.test.js index 6d825d4..d644e0d 100644 --- a/test/services/project.test.js +++ b/test/services/project.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Project } = require("../../dist/services/project"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Project', () => { const client = new Client(); @@ -41,11 +41,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -102,11 +107,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -278,11 +288,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -427,11 +442,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1510,11 +1530,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1559,11 +1584,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1608,11 +1638,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1657,11 +1692,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1705,11 +1745,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1754,11 +1799,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1803,11 +1853,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1871,11 +1926,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1920,11 +1980,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1969,11 +2034,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -2018,11 +2088,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -2067,11 +2142,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -2132,11 +2212,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -2182,11 +2267,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -2232,11 +2322,16 @@ describe('Project', () => { 'oAuth2ServerEnabled': true, 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', 'oAuth2ServerScopes': [], + 'oAuth2ServerAuthorizationDetailsTypes': [], 'oAuth2ServerAccessTokenDuration': 3600, 'oAuth2ServerRefreshTokenDuration': 86400, 'oAuth2ServerPublicAccessTokenDuration': 3600, 'oAuth2ServerPublicRefreshTokenDuration': 2592000, 'oAuth2ServerConfidentialPkce': true, + 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', + 'oAuth2ServerUserCodeLength': 8, + 'oAuth2ServerUserCodeFormat': 'alphanumeric', + 'oAuth2ServerDeviceCodeDuration': 600, 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; mockedFetch.mockImplementation(() => Response.json(data)); diff --git a/test/services/proxy.test.js b/test/services/proxy.test.js index 05a556f..57aa087 100644 --- a/test/services/proxy.test.js +++ b/test/services/proxy.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Proxy } = require("../../dist/services/proxy"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Proxy', () => { const client = new Client(); diff --git a/test/services/sites.test.js b/test/services/sites.test.js index 64525f1..402a5d5 100644 --- a/test/services/sites.test.js +++ b/test/services/sites.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Sites } = require("../../dist/services/sites"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Sites', () => { const client = new Client(); diff --git a/test/services/storage.test.js b/test/services/storage.test.js index 5b28529..ce79f08 100644 --- a/test/services/storage.test.js +++ b/test/services/storage.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Storage } = require("../../dist/services/storage"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Storage', () => { const client = new Client(); diff --git a/test/services/tables-d-b.test.js b/test/services/tables-d-b.test.js index 5c89adc..513c5b7 100644 --- a/test/services/tables-d-b.test.js +++ b/test/services/tables-d-b.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { TablesDB } = require("../../dist/services/tables-db"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('TablesDB', () => { const client = new Client(); diff --git a/test/services/teams.test.js b/test/services/teams.test.js index dcb4055..0054c3e 100644 --- a/test/services/teams.test.js +++ b/test/services/teams.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Teams } = require("../../dist/services/teams"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Teams', () => { const client = new Client(); @@ -132,6 +132,7 @@ describe('Teams', () => { 'joined': '2020-10-15T06:38:00.000+00:00', 'confirm': true, 'mfa': true, + 'userAccessedAt': '2020-10-15T06:38:00.000+00:00', 'roles': [],}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -161,6 +162,7 @@ describe('Teams', () => { 'joined': '2020-10-15T06:38:00.000+00:00', 'confirm': true, 'mfa': true, + 'userAccessedAt': '2020-10-15T06:38:00.000+00:00', 'roles': [],}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -190,6 +192,7 @@ describe('Teams', () => { 'joined': '2020-10-15T06:38:00.000+00:00', 'confirm': true, 'mfa': true, + 'userAccessedAt': '2020-10-15T06:38:00.000+00:00', 'roles': [],}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -235,6 +238,7 @@ describe('Teams', () => { 'joined': '2020-10-15T06:38:00.000+00:00', 'confirm': true, 'mfa': true, + 'userAccessedAt': '2020-10-15T06:38:00.000+00:00', 'roles': [],}; mockedFetch.mockImplementation(() => Response.json(data)); diff --git a/test/services/tokens.test.js b/test/services/tokens.test.js index 000f188..491ddbf 100644 --- a/test/services/tokens.test.js +++ b/test/services/tokens.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Tokens } = require("../../dist/services/tokens"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Tokens', () => { const client = new Client(); diff --git a/test/services/usage.test.js b/test/services/usage.test.js index 0d0428f..44efb8e 100644 --- a/test/services/usage.test.js +++ b/test/services/usage.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Usage } = require("../../dist/services/usage"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Usage', () => { const client = new Client(); diff --git a/test/services/users.test.js b/test/services/users.test.js index cb5441a..7513e57 100644 --- a/test/services/users.test.js +++ b/test/services/users.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Users } = require("../../dist/services/users"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Users', () => { const client = new Client(); diff --git a/test/services/webhooks.test.js b/test/services/webhooks.test.js index 01e7abd..7fb1338 100644 --- a/test/services/webhooks.test.js +++ b/test/services/webhooks.test.js @@ -2,8 +2,8 @@ const { Client } = require("../../dist/client"); const { InputFile } = require("../../dist/inputFile"); const { Webhooks } = require("../../dist/services/webhooks"); -const { fetch: mockedFetch, Response } = require("node-fetch-native-with-agent"); -jest.mock('node-fetch-native-with-agent', () => ({ ...jest.requireActual('node-fetch-native-with-agent'), fetch: jest.fn() })); +const { fetch: mockedFetch, Response } = require("undici"); +jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); describe('Webhooks', () => { const client = new Client(); From 8177977a50a0ca788190ccb89cf662c4dbc47ceb Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 13 Jul 2026 10:47:06 +0530 Subject: [PATCH 2/4] chore: update Node.js SDK to 27.0.0 --- .github/workflows/publish.yml | 3 +- CHANGELOG.md | 18 + docs/examples/account/create.md | 2 +- docs/examples/account/update-password.md | 4 +- docs/examples/account/update-recovery.md | 2 +- docs/examples/backups/create-restoration.md | 3 +- .../functions/get-deployment-download.md | 3 +- .../examples/functions/list-specifications.md | 4 +- docs/examples/health/get-audits-db.md | 12 - docs/examples/health/get-cache.md | 12 - docs/examples/health/get-db.md | 12 - docs/examples/health/get-failed-jobs.md | 15 - docs/examples/health/get-pub-sub.md | 12 - docs/examples/health/get-queue-databases.md | 15 - docs/examples/health/get-queue-deletes.md | 14 - docs/examples/health/get-queue-functions.md | 14 - docs/examples/health/get-queue-logs.md | 14 - docs/examples/health/get-queue-mails.md | 14 - docs/examples/health/get-queue-messaging.md | 14 - docs/examples/health/get-queue-migrations.md | 14 - .../health/get-queue-stats-resources.md | 14 - docs/examples/health/get-queue-usage.md | 14 - docs/examples/health/get-queue-webhooks.md | 14 - docs/examples/health/get-storage-local.md | 12 - docs/examples/health/get-storage.md | 12 - docs/examples/health/get-time.md | 12 - .../messaging/create-smtp-provider.md | 2 +- docs/examples/messaging/list-provider-logs.md | 16 - .../messaging/list-subscriber-logs.md | 16 - docs/examples/messaging/list-topic-logs.md | 16 - .../messaging/update-smtp-provider.md | 2 +- .../organization/create-membership.md | 19 + .../delete-membership.md} | 6 +- .../delete.md} | 4 +- .../get-membership.md} | 6 +- docs/examples/{health => organization}/get.md | 4 +- .../list-memberships.md} | 6 +- .../organization/update-membership.md | 15 + .../update.md} | 6 +- .../update-deny-corporate-email-policy.md} | 6 +- .../update-o-auth-2-appwrite.md} | 9 +- docs/examples/project/update-o-auth-2-oidc.md | 2 + .../project/update-o-auth-2-server.md | 3 +- docs/examples/project/update-smtp.md | 2 +- docs/examples/sites/list-specifications.md | 4 +- docs/examples/tablesdb/create.md | 3 +- docs/examples/usage/list-events.md | 15 - docs/examples/usage/list-gauges.md | 15 - docs/examples/users/create.md | 2 +- docs/examples/users/update-password.md | 2 +- docs/examples/webhooks/create.md | 2 +- docs/examples/webhooks/update.md | 2 +- package-lock.json | 3197 ++++++++++------- package.json | 16 +- src/client.ts | 26 +- src/enums/billing-plan-group.ts | 5 + src/enums/database-status.ts | 5 + src/enums/health-antivirus-status.ts | 5 - src/enums/health-check-status.ts | 4 - src/enums/health-queue-name.ts | 15 - src/enums/o-auth-2-oidc-prompt.ts | 6 + src/enums/o-auth-provider.ts | 1 + src/enums/organization-key-scopes.ts | 4 + src/enums/project-key-scopes.ts | 8 +- src/enums/project-o-auth-2-oidc-prompt.ts | 6 + src/enums/project-o-auth-provider-id.ts | 1 + src/enums/project-policy-id.ts | 1 + src/enums/project-service-id.ts | 1 + src/index.ts | 9 +- src/models.ts | 1233 +++++-- src/query.ts | 30 + src/services/account.ts | 26 +- src/services/activities.ts | 2 +- src/services/advisor.ts | 8 +- src/services/avatars.ts | 6 +- src/services/backups.ts | 39 +- src/services/databases.ts | 256 +- src/services/functions.ts | 103 +- src/services/health.ts | 1117 ------ src/services/messaging.ts | 334 +- src/services/organization.ts | 463 ++- src/services/presences.ts | 8 +- src/services/project.ts | 250 +- src/services/proxy.ts | 6 +- src/services/sites.ts | 72 +- src/services/storage.ts | 22 +- src/services/tables-db.ts | 263 +- src/services/teams.ts | 22 +- src/services/tokens.ts | 10 +- src/services/usage.ts | 134 - src/services/users.ts | 82 +- src/services/webhooks.ts | 8 +- test/services/account.test.js | 6 +- test/services/activities.test.js | 16 +- test/services/backups.test.js | 7 +- test/services/health.test.js | 383 -- test/services/messaging.test.js | 64 - test/services/organization.test.js | 282 +- test/services/project.test.js | 422 +-- test/services/usage.test.js | 42 - test/services/users.test.js | 2 +- test/services/webhooks.test.js | 8 +- 102 files changed, 4656 insertions(+), 4844 deletions(-) delete mode 100644 docs/examples/health/get-audits-db.md delete mode 100644 docs/examples/health/get-cache.md delete mode 100644 docs/examples/health/get-db.md delete mode 100644 docs/examples/health/get-failed-jobs.md delete mode 100644 docs/examples/health/get-pub-sub.md delete mode 100644 docs/examples/health/get-queue-databases.md delete mode 100644 docs/examples/health/get-queue-deletes.md delete mode 100644 docs/examples/health/get-queue-functions.md delete mode 100644 docs/examples/health/get-queue-logs.md delete mode 100644 docs/examples/health/get-queue-mails.md delete mode 100644 docs/examples/health/get-queue-messaging.md delete mode 100644 docs/examples/health/get-queue-migrations.md delete mode 100644 docs/examples/health/get-queue-stats-resources.md delete mode 100644 docs/examples/health/get-queue-usage.md delete mode 100644 docs/examples/health/get-queue-webhooks.md delete mode 100644 docs/examples/health/get-storage-local.md delete mode 100644 docs/examples/health/get-storage.md delete mode 100644 docs/examples/health/get-time.md delete mode 100644 docs/examples/messaging/list-provider-logs.md delete mode 100644 docs/examples/messaging/list-subscriber-logs.md delete mode 100644 docs/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/organization/create-membership.md rename docs/examples/{health/get-queue-certificates.md => organization/delete-membership.md} (66%) rename docs/examples/{health/get-antivirus.md => organization/delete.md} (74%) rename docs/examples/{health/get-queue-builds.md => organization/get-membership.md} (67%) rename docs/examples/{health => organization}/get.md (75%) rename docs/examples/{messaging/list-message-logs.md => organization/list-memberships.md} (71%) create mode 100644 docs/examples/organization/update-membership.md rename docs/examples/{health/get-certificate.md => organization/update.md} (71%) rename docs/examples/{health/get-queue-audits.md => project/update-deny-corporate-email-policy.md} (69%) rename docs/examples/{health/get-console-pausing.md => project/update-o-auth-2-appwrite.md} (57%) delete mode 100644 docs/examples/usage/list-events.md delete mode 100644 docs/examples/usage/list-gauges.md create mode 100644 src/enums/billing-plan-group.ts create mode 100644 src/enums/database-status.ts delete mode 100644 src/enums/health-antivirus-status.ts delete mode 100644 src/enums/health-check-status.ts delete mode 100644 src/enums/health-queue-name.ts create mode 100644 src/enums/o-auth-2-oidc-prompt.ts create mode 100644 src/enums/project-o-auth-2-oidc-prompt.ts delete mode 100644 src/services/health.ts delete mode 100644 src/services/usage.ts delete mode 100644 test/services/health.test.js delete mode 100644 test/services/usage.test.js diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ee63d52..48121d6 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 f7617e5..7b9de72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Change Log +## 27.0.0 + +* Breaking: removed `Health` service, health enums, and health response models +* Breaking: removed `Usage` service and `UsageEvent`/`UsageGauge` models +* Breaking: removed messaging `listMessageLogs`, `listProviderLogs`, `listSubscriberLogs`, `listTopicLogs` methods +* Added: `Organization` `get`, `update`, `delete`, and membership CRUD methods +* Added: `Query.vectorCosine`, `Query.vectorDot`, `Query.vectorEuclidean` vector filters +* Added: `Client.setBearer` for OAuth access token authentication +* Added: `updateOAuth2Appwrite` and `updateDenyCorporateEmailPolicy` project methods +* Added: `prompt` and `maxAge` params to `updateOAuth2Oidc`, `defaultScopes` to `updateOAuth2Server` +* Added: `token` param to `getDeploymentDownload`, `type` to `listSpecifications` +* Added: `newSpecification` param to `createRestoration`, `specification` to `tablesDB.create` +* Added: `BillingPlanGroup`, `DatabaseStatus`, `OAuth2OidcPrompt`, `ProjectOAuth2OidcPrompt` enums +* Added: `Appwrite` OAuth provider, `stages` and `project.oauth2` key scopes +* Added: `Organization`, `BillingPlan`, `OAuth2Appwrite`, `PolicyDenyCorporateEmail` models +* Fixed: URL-encoded path parameters in organization key/project endpoints +* Updated: spatial attribute/column `xdefault` types narrowed to `number[]`/`any[][]` + ## 26.2.0 * Added: Device Authorization Grant params (`verificationUrl`, `userCodeLength`, `userCodeFormat`, `deviceCodeDuration`) to `updateOAuth2Server` diff --git a/docs/examples/account/create.md b/docs/examples/account/create.md index db31f30..abc8c13 100644 --- a/docs/examples/account/create.md +++ b/docs/examples/account/create.md @@ -11,7 +11,7 @@ const account = new sdk.Account(client); const result = await account.create({ userId: '', email: 'email@example.com', - password: '', + password: 'password', name: '' // optional }); ``` diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index 0e6cd7b..d359b34 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -9,7 +9,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); const result = await account.updatePassword({ - password: '', - oldPassword: '' // optional + password: 'password', + oldPassword: 'password' // optional }); ``` diff --git a/docs/examples/account/update-recovery.md b/docs/examples/account/update-recovery.md index 268f3e9..9008f67 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/examples/account/update-recovery.md @@ -11,6 +11,6 @@ const account = new sdk.Account(client); const result = await account.updateRecovery({ userId: '', secret: '', - password: '' + password: 'password' }); ``` diff --git a/docs/examples/backups/create-restoration.md b/docs/examples/backups/create-restoration.md index f41a234..6a8096a 100644 --- a/docs/examples/backups/create-restoration.md +++ b/docs/examples/backups/create-restoration.md @@ -12,6 +12,7 @@ const result = await backups.createRestoration({ archiveId: '', services: [sdk.BackupServices.Databases], newResourceId: '', // optional - newResourceName: '' // optional + newResourceName: '', // optional + newSpecification: 'serverless' // optional }); ``` diff --git a/docs/examples/functions/get-deployment-download.md b/docs/examples/functions/get-deployment-download.md index 5e9a956..6a75bad 100644 --- a/docs/examples/functions/get-deployment-download.md +++ b/docs/examples/functions/get-deployment-download.md @@ -11,6 +11,7 @@ const functions = new sdk.Functions(client); const result = await functions.getDeploymentDownload({ functionId: '', deploymentId: '', - type: sdk.DeploymentDownloadType.Source // optional + type: sdk.DeploymentDownloadType.Source, // optional + token: '' // optional }); ``` diff --git a/docs/examples/functions/list-specifications.md b/docs/examples/functions/list-specifications.md index 0fc8b8d..f9bb52b 100644 --- a/docs/examples/functions/list-specifications.md +++ b/docs/examples/functions/list-specifications.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.listSpecifications(); +const result = await functions.listSpecifications({ + type: 'runtimes' // optional +}); ``` diff --git a/docs/examples/health/get-audits-db.md b/docs/examples/health/get-audits-db.md deleted file mode 100644 index 50d2eff..0000000 --- a/docs/examples/health/get-audits-db.md +++ /dev/null @@ -1,12 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getAuditsDB(); -``` diff --git a/docs/examples/health/get-cache.md b/docs/examples/health/get-cache.md deleted file mode 100644 index a952506..0000000 --- a/docs/examples/health/get-cache.md +++ /dev/null @@ -1,12 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getCache(); -``` diff --git a/docs/examples/health/get-db.md b/docs/examples/health/get-db.md deleted file mode 100644 index 45a840c..0000000 --- a/docs/examples/health/get-db.md +++ /dev/null @@ -1,12 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getDB(); -``` diff --git a/docs/examples/health/get-failed-jobs.md b/docs/examples/health/get-failed-jobs.md deleted file mode 100644 index 3f41e63..0000000 --- a/docs/examples/health/get-failed-jobs.md +++ /dev/null @@ -1,15 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getFailedJobs({ - name: sdk.HealthQueueName.V1Database, - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-pub-sub.md b/docs/examples/health/get-pub-sub.md deleted file mode 100644 index c03bb59..0000000 --- a/docs/examples/health/get-pub-sub.md +++ /dev/null @@ -1,12 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getPubSub(); -``` diff --git a/docs/examples/health/get-queue-databases.md b/docs/examples/health/get-queue-databases.md deleted file mode 100644 index 181621e..0000000 --- a/docs/examples/health/get-queue-databases.md +++ /dev/null @@ -1,15 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getQueueDatabases({ - name: '', // optional - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-queue-deletes.md b/docs/examples/health/get-queue-deletes.md deleted file mode 100644 index e1b5bc0..0000000 --- a/docs/examples/health/get-queue-deletes.md +++ /dev/null @@ -1,14 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getQueueDeletes({ - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-queue-functions.md b/docs/examples/health/get-queue-functions.md deleted file mode 100644 index f40904a..0000000 --- a/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,14 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getQueueFunctions({ - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-queue-logs.md b/docs/examples/health/get-queue-logs.md deleted file mode 100644 index 437a86b..0000000 --- a/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getQueueLogs({ - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-queue-mails.md b/docs/examples/health/get-queue-mails.md deleted file mode 100644 index 3da627b..0000000 --- a/docs/examples/health/get-queue-mails.md +++ /dev/null @@ -1,14 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getQueueMails({ - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-queue-messaging.md b/docs/examples/health/get-queue-messaging.md deleted file mode 100644 index 504ad1d..0000000 --- a/docs/examples/health/get-queue-messaging.md +++ /dev/null @@ -1,14 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getQueueMessaging({ - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-queue-migrations.md b/docs/examples/health/get-queue-migrations.md deleted file mode 100644 index 59e4550..0000000 --- a/docs/examples/health/get-queue-migrations.md +++ /dev/null @@ -1,14 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getQueueMigrations({ - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-queue-stats-resources.md b/docs/examples/health/get-queue-stats-resources.md deleted file mode 100644 index 542d11e..0000000 --- a/docs/examples/health/get-queue-stats-resources.md +++ /dev/null @@ -1,14 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getQueueStatsResources({ - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-queue-usage.md b/docs/examples/health/get-queue-usage.md deleted file mode 100644 index 86dbfb8..0000000 --- a/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,14 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getQueueUsage({ - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-queue-webhooks.md b/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 36c3037..0000000 --- a/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,14 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getQueueWebhooks({ - threshold: null // optional -}); -``` diff --git a/docs/examples/health/get-storage-local.md b/docs/examples/health/get-storage-local.md deleted file mode 100644 index 1593339..0000000 --- a/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,12 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getStorageLocal(); -``` diff --git a/docs/examples/health/get-storage.md b/docs/examples/health/get-storage.md deleted file mode 100644 index 75ec5cb..0000000 --- a/docs/examples/health/get-storage.md +++ /dev/null @@ -1,12 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getStorage(); -``` diff --git a/docs/examples/health/get-time.md b/docs/examples/health/get-time.md deleted file mode 100644 index 86d8617..0000000 --- a/docs/examples/health/get-time.md +++ /dev/null @@ -1,12 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const health = new sdk.Health(client); - -const result = await health.getTime(); -``` diff --git a/docs/examples/messaging/create-smtp-provider.md b/docs/examples/messaging/create-smtp-provider.md index e17fdc1..b980c3b 100644 --- a/docs/examples/messaging/create-smtp-provider.md +++ b/docs/examples/messaging/create-smtp-provider.md @@ -14,7 +14,7 @@ const result = await messaging.createSMTPProvider({ host: '', port: 1, // optional username: '', // optional - password: '', // optional + password: 'password', // optional encryption: sdk.SmtpEncryption.None, // optional autoTLS: false, // optional mailer: '', // optional diff --git a/docs/examples/messaging/list-provider-logs.md b/docs/examples/messaging/list-provider-logs.md deleted file mode 100644 index 92b4c2f..0000000 --- a/docs/examples/messaging/list-provider-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const messaging = new sdk.Messaging(client); - -const result = await messaging.listProviderLogs({ - providerId: '', - queries: [], // optional - total: false // optional -}); -``` diff --git a/docs/examples/messaging/list-subscriber-logs.md b/docs/examples/messaging/list-subscriber-logs.md deleted file mode 100644 index 2f89225..0000000 --- a/docs/examples/messaging/list-subscriber-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const messaging = new sdk.Messaging(client); - -const result = await messaging.listSubscriberLogs({ - subscriberId: '', - queries: [], // optional - total: false // optional -}); -``` diff --git a/docs/examples/messaging/list-topic-logs.md b/docs/examples/messaging/list-topic-logs.md deleted file mode 100644 index ee76366..0000000 --- a/docs/examples/messaging/list-topic-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const messaging = new sdk.Messaging(client); - -const result = await messaging.listTopicLogs({ - topicId: '', - queries: [], // optional - total: false // optional -}); -``` diff --git a/docs/examples/messaging/update-smtp-provider.md b/docs/examples/messaging/update-smtp-provider.md index d860736..1b0ec72 100644 --- a/docs/examples/messaging/update-smtp-provider.md +++ b/docs/examples/messaging/update-smtp-provider.md @@ -14,7 +14,7 @@ const result = await messaging.updateSMTPProvider({ host: '', // optional port: 1, // optional username: '', // optional - password: '', // optional + password: 'password', // optional encryption: sdk.SmtpEncryption.None, // optional autoTLS: false, // optional mailer: '', // optional diff --git a/docs/examples/organization/create-membership.md b/docs/examples/organization/create-membership.md new file mode 100644 index 0000000..02450ab --- /dev/null +++ b/docs/examples/organization/create-membership.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const organization = new sdk.Organization(client); + +const result = await organization.createMembership({ + roles: [], + email: 'email@example.com', // optional + userId: '', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '' // optional +}); +``` diff --git a/docs/examples/health/get-queue-certificates.md b/docs/examples/organization/delete-membership.md similarity index 66% rename from docs/examples/health/get-queue-certificates.md rename to docs/examples/organization/delete-membership.md index ef065d5..174ffc3 100644 --- a/docs/examples/health/get-queue-certificates.md +++ b/docs/examples/organization/delete-membership.md @@ -6,9 +6,9 @@ const client = new sdk.Client() .setProject('') // Your project ID .setKey(''); // Your secret API key -const health = new sdk.Health(client); +const organization = new sdk.Organization(client); -const result = await health.getQueueCertificates({ - threshold: null // optional +const result = await organization.deleteMembership({ + membershipId: '' }); ``` diff --git a/docs/examples/health/get-antivirus.md b/docs/examples/organization/delete.md similarity index 74% rename from docs/examples/health/get-antivirus.md rename to docs/examples/organization/delete.md index 3f0c834..79b8e08 100644 --- a/docs/examples/health/get-antivirus.md +++ b/docs/examples/organization/delete.md @@ -6,7 +6,7 @@ const client = new sdk.Client() .setProject('') // Your project ID .setKey(''); // Your secret API key -const health = new sdk.Health(client); +const organization = new sdk.Organization(client); -const result = await health.getAntivirus(); +const result = await organization.delete(); ``` diff --git a/docs/examples/health/get-queue-builds.md b/docs/examples/organization/get-membership.md similarity index 67% rename from docs/examples/health/get-queue-builds.md rename to docs/examples/organization/get-membership.md index da49e02..42f6070 100644 --- a/docs/examples/health/get-queue-builds.md +++ b/docs/examples/organization/get-membership.md @@ -6,9 +6,9 @@ const client = new sdk.Client() .setProject('') // Your project ID .setKey(''); // Your secret API key -const health = new sdk.Health(client); +const organization = new sdk.Organization(client); -const result = await health.getQueueBuilds({ - threshold: null // optional +const result = await organization.getMembership({ + membershipId: '' }); ``` diff --git a/docs/examples/health/get.md b/docs/examples/organization/get.md similarity index 75% rename from docs/examples/health/get.md rename to docs/examples/organization/get.md index bfb883b..3b156dd 100644 --- a/docs/examples/health/get.md +++ b/docs/examples/organization/get.md @@ -6,7 +6,7 @@ const client = new sdk.Client() .setProject('') // Your project ID .setKey(''); // Your secret API key -const health = new sdk.Health(client); +const organization = new sdk.Organization(client); -const result = await health.get(); +const result = await organization.get(); ``` diff --git a/docs/examples/messaging/list-message-logs.md b/docs/examples/organization/list-memberships.md similarity index 71% rename from docs/examples/messaging/list-message-logs.md rename to docs/examples/organization/list-memberships.md index c9c8a47..594cfd1 100644 --- a/docs/examples/messaging/list-message-logs.md +++ b/docs/examples/organization/list-memberships.md @@ -6,11 +6,11 @@ const client = new sdk.Client() .setProject('') // Your project ID .setKey(''); // Your secret API key -const messaging = new sdk.Messaging(client); +const organization = new sdk.Organization(client); -const result = await messaging.listMessageLogs({ - messageId: '', +const result = await organization.listMemberships({ queries: [], // optional + search: '', // optional total: false // optional }); ``` diff --git a/docs/examples/organization/update-membership.md b/docs/examples/organization/update-membership.md new file mode 100644 index 0000000..17d7e17 --- /dev/null +++ b/docs/examples/organization/update-membership.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const organization = new sdk.Organization(client); + +const result = await organization.updateMembership({ + membershipId: '', + roles: [] +}); +``` diff --git a/docs/examples/health/get-certificate.md b/docs/examples/organization/update.md similarity index 71% rename from docs/examples/health/get-certificate.md rename to docs/examples/organization/update.md index 571b3cd..21485ef 100644 --- a/docs/examples/health/get-certificate.md +++ b/docs/examples/organization/update.md @@ -6,9 +6,9 @@ const client = new sdk.Client() .setProject('') // Your project ID .setKey(''); // Your secret API key -const health = new sdk.Health(client); +const organization = new sdk.Organization(client); -const result = await health.getCertificate({ - domain: '' // optional +const result = await organization.update({ + name: '' }); ``` diff --git a/docs/examples/health/get-queue-audits.md b/docs/examples/project/update-deny-corporate-email-policy.md similarity index 69% rename from docs/examples/health/get-queue-audits.md rename to docs/examples/project/update-deny-corporate-email-policy.md index dcc7c6c..8335b8e 100644 --- a/docs/examples/health/get-queue-audits.md +++ b/docs/examples/project/update-deny-corporate-email-policy.md @@ -6,9 +6,9 @@ const client = new sdk.Client() .setProject('') // Your project ID .setKey(''); // Your secret API key -const health = new sdk.Health(client); +const project = new sdk.Project(client); -const result = await health.getQueueAudits({ - threshold: null // optional +const result = await project.updateDenyCorporateEmailPolicy({ + enabled: false }); ``` diff --git a/docs/examples/health/get-console-pausing.md b/docs/examples/project/update-o-auth-2-appwrite.md similarity index 57% rename from docs/examples/health/get-console-pausing.md rename to docs/examples/project/update-o-auth-2-appwrite.md index a3dfca6..6a7df87 100644 --- a/docs/examples/health/get-console-pausing.md +++ b/docs/examples/project/update-o-auth-2-appwrite.md @@ -6,10 +6,11 @@ const client = new sdk.Client() .setProject('') // Your project ID .setKey(''); // Your secret API key -const health = new sdk.Health(client); +const project = new sdk.Project(client); -const result = await health.getConsolePausing({ - threshold: null, // optional - inactivityDays: null // optional +const result = await project.updateOAuth2Appwrite({ + clientId: '', // optional + clientSecret: '', // optional + enabled: false // optional }); ``` diff --git a/docs/examples/project/update-o-auth-2-oidc.md b/docs/examples/project/update-o-auth-2-oidc.md index 7f1f6eb..271afcf 100644 --- a/docs/examples/project/update-o-auth-2-oidc.md +++ b/docs/examples/project/update-o-auth-2-oidc.md @@ -15,6 +15,8 @@ const result = await project.updateOAuth2Oidc({ authorizationURL: 'https://example.com', // optional tokenURL: 'https://example.com', // optional userInfoURL: 'https://example.com', // optional + prompt: [sdk.ProjectOAuth2OidcPrompt.None], // optional + maxAge: 0, // optional enabled: false // optional }); ``` diff --git a/docs/examples/project/update-o-auth-2-server.md b/docs/examples/project/update-o-auth-2-server.md index 5feef6a..0cd95ae 100644 --- a/docs/examples/project/update-o-auth-2-server.md +++ b/docs/examples/project/update-o-auth-2-server.md @@ -21,6 +21,7 @@ const result = await project.updateOAuth2Server({ verificationUrl: 'https://example.com', // optional userCodeLength: 6, // optional userCodeFormat: 'numeric', // optional - deviceCodeDuration: 60 // optional + deviceCodeDuration: 60, // optional + defaultScopes: [] // optional }); ``` diff --git a/docs/examples/project/update-smtp.md b/docs/examples/project/update-smtp.md index fe7258a..d7ace09 100644 --- a/docs/examples/project/update-smtp.md +++ b/docs/examples/project/update-smtp.md @@ -12,7 +12,7 @@ const result = await project.updateSMTP({ host: '', // optional port: null, // optional username: '', // optional - password: '', // optional + password: 'password', // optional senderEmail: 'email@example.com', // optional senderName: '', // optional replyToEmail: 'email@example.com', // optional diff --git a/docs/examples/sites/list-specifications.md b/docs/examples/sites/list-specifications.md index 6e88289..208c827 100644 --- a/docs/examples/sites/list-specifications.md +++ b/docs/examples/sites/list-specifications.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.listSpecifications(); +const result = await sites.listSpecifications({ + type: 'runtimes' // optional +}); ``` diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index 0571906..280db02 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -11,6 +11,7 @@ const tablesDB = new sdk.TablesDB(client); const result = await tablesDB.create({ databaseId: '', name: '', - enabled: false // optional + enabled: false, // optional + specification: 'serverless' // optional }); ``` diff --git a/docs/examples/usage/list-events.md b/docs/examples/usage/list-events.md deleted file mode 100644 index 887f98f..0000000 --- a/docs/examples/usage/list-events.md +++ /dev/null @@ -1,15 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const usage = new sdk.Usage(client); - -const result = await usage.listEvents({ - queries: [], // optional - total: false // optional -}); -``` diff --git a/docs/examples/usage/list-gauges.md b/docs/examples/usage/list-gauges.md deleted file mode 100644 index aa5ba1d..0000000 --- a/docs/examples/usage/list-gauges.md +++ /dev/null @@ -1,15 +0,0 @@ -```javascript -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -const usage = new sdk.Usage(client); - -const result = await usage.listGauges({ - queries: [], // optional - total: false // optional -}); -``` diff --git a/docs/examples/users/create.md b/docs/examples/users/create.md index 5610f06..c93772d 100644 --- a/docs/examples/users/create.md +++ b/docs/examples/users/create.md @@ -12,7 +12,7 @@ const result = await users.create({ userId: '', email: 'email@example.com', // optional phone: '+12065550100', // optional - password: '', // optional + password: 'password', // optional name: '' // optional }); ``` diff --git a/docs/examples/users/update-password.md b/docs/examples/users/update-password.md index ab572ca..5cadfdb 100644 --- a/docs/examples/users/update-password.md +++ b/docs/examples/users/update-password.md @@ -10,6 +10,6 @@ const users = new sdk.Users(client); const result = await users.updatePassword({ userId: '', - password: '' + password: 'password' }); ``` diff --git a/docs/examples/webhooks/create.md b/docs/examples/webhooks/create.md index c860387..75c778c 100644 --- a/docs/examples/webhooks/create.md +++ b/docs/examples/webhooks/create.md @@ -16,7 +16,7 @@ const result = await webhooks.create({ enabled: false, // optional tls: false, // optional authUsername: '', // optional - authPassword: '', // optional + authPassword: 'password', // optional secret: '' // optional }); ``` diff --git a/docs/examples/webhooks/update.md b/docs/examples/webhooks/update.md index 6596e90..f83021c 100644 --- a/docs/examples/webhooks/update.md +++ b/docs/examples/webhooks/update.md @@ -16,6 +16,6 @@ const result = await webhooks.update({ enabled: false, // optional tls: false, // optional authUsername: '', // optional - authPassword: '' // optional + authPassword: 'password' // optional }); ``` diff --git a/package-lock.json b/package-lock.json index 2ac1a1e..6a10292 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,25 +1,29 @@ { "name": "node-appwrite", - "version": "26.2.0", + "version": "27.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "node-appwrite", - "version": "26.2.0", + "version": "27.0.0", "license": "BSD-3-Clause", "dependencies": { "json-bigint": "1.0.0", - "undici": "^6.26.0" + "undici": "^6.27.0" }, "devDependencies": { "@types/json-bigint": "1.0.4", - "@types/node": "20.11.25", + "@types/node": "26.1.1", "esbuild-plugin-file-path-extensions": "^2.0.0", - "jest": "^29.7.0", - "tslib": "2.6.2", + "jest": "^30.4.2", + "tslib": "2.8.1", "tsup": "^8.5.1", - "typescript": "5.4.2" + "typescript": "5.9.3" + }, + "overrides": { + "esbuild": "^0.28.1", + "js-yaml": "^4.2.0" } }, "node_modules/@babel/code-frame": { @@ -518,10 +522,44 @@ "dev": true, "license": "MIT" }, + "node_modules/@emnapi/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", - "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz", + "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==", "cpu": [ "ppc64" ], @@ -536,9 +574,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", - "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz", + "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==", "cpu": [ "arm" ], @@ -553,9 +591,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", - "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz", + "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==", "cpu": [ "arm64" ], @@ -570,9 +608,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", - "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz", + "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==", "cpu": [ "x64" ], @@ -587,9 +625,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", - "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz", + "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==", "cpu": [ "arm64" ], @@ -604,9 +642,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", - "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz", + "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==", "cpu": [ "x64" ], @@ -621,9 +659,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", - "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz", + "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==", "cpu": [ "arm64" ], @@ -638,9 +676,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", - "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz", + "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==", "cpu": [ "x64" ], @@ -655,9 +693,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", - "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz", + "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==", "cpu": [ "arm" ], @@ -672,9 +710,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", - "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz", + "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==", "cpu": [ "arm64" ], @@ -689,9 +727,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", - "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz", + "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==", "cpu": [ "ia32" ], @@ -706,9 +744,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", - "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz", + "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==", "cpu": [ "loong64" ], @@ -723,9 +761,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", - "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz", + "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==", "cpu": [ "mips64el" ], @@ -740,9 +778,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", - "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz", + "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==", "cpu": [ "ppc64" ], @@ -757,9 +795,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", - "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz", + "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==", "cpu": [ "riscv64" ], @@ -774,9 +812,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", - "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz", + "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==", "cpu": [ "s390x" ], @@ -791,9 +829,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", - "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz", + "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==", "cpu": [ "x64" ], @@ -808,9 +846,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", - "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz", + "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==", "cpu": [ "arm64" ], @@ -825,9 +863,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", - "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz", + "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==", "cpu": [ "x64" ], @@ -842,9 +880,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", - "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz", + "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==", "cpu": [ "arm64" ], @@ -859,9 +897,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", - "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz", + "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==", "cpu": [ "x64" ], @@ -876,9 +914,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", - "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz", + "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==", "cpu": [ "arm64" ], @@ -893,9 +931,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", - "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz", + "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==", "cpu": [ "x64" ], @@ -910,9 +948,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", - "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz", + "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==", "cpu": [ "arm64" ], @@ -927,9 +965,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", - "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz", + "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==", "cpu": [ "ia32" ], @@ -944,9 +982,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", - "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz", + "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==", "cpu": [ "x64" ], @@ -960,6 +998,24 @@ "node": ">=18" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -988,61 +1044,61 @@ } }, "node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.4.1.tgz", + "integrity": "sha512-v3bhyxUh9Hgmo5p6hAOXe14/R3ZxZDOsvHleh4B07z3m/x4/ngPUXEm9XwK4sF4u+f+P2ORb0Ge+MgpaqRMVDA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", + "@jest/types": "30.4.1", "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", + "chalk": "^4.1.2", + "jest-message-util": "30.4.1", + "jest-util": "30.4.1", "slash": "^3.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/core": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", - "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.4.2.tgz", + "integrity": "sha512-TZJA6cPJUFxoWhxaLo8t0VX/MZX2wPWr0uIDvLSHIvN4gu9h02vSzqI2kBADG1ExqQlC+cY09xKMSreivvrChQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/console": "30.4.1", + "@jest/pattern": "30.4.0", + "@jest/reporters": "30.4.1", + "@jest/test-result": "30.4.1", + "@jest/transform": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "exit-x": "^0.2.2", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.11", + "jest-changed-files": "30.4.1", + "jest-config": "30.4.2", + "jest-haste-map": "30.4.1", + "jest-message-util": "30.4.1", + "jest-regex-util": "30.4.0", + "jest-resolve": "30.4.1", + "jest-resolve-dependencies": "30.4.2", + "jest-runner": "30.4.2", + "jest-runtime": "30.4.2", + "jest-snapshot": "30.4.1", + "jest-util": "30.4.1", + "jest-validate": "30.4.1", + "jest-watcher": "30.4.1", + "pretty-format": "30.4.1", + "slash": "^3.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -1053,117 +1109,150 @@ } } }, + "node_modules/@jest/diff-sequences": { + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.4.0.tgz", + "integrity": "sha512-zOpzlfUs45l6u7jm39qr87JCHUDsaeCtvL+kQe/Vn9jSnRB4/5IPXISm0h9I1vZW/o00Kn4UTJ2MOlhnUGwv3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.4.1.tgz", + "integrity": "sha512-AK9yNRqgKxiabqMoe4oW+3/TSSeV8vkdC7BGaxZdU0AFXfOpofTLqdru2GXKZghP3sdgwE9XXpnVwfZ8JnFV4w==", "dev": true, "license": "MIT", "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/fake-timers": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", - "jest-mock": "^29.7.0" + "jest-mock": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.4.1.tgz", + "integrity": "sha512-ginrj6TMgh2GshLUGCjO94Ptx9HhdZA/I6A9iUfyeLKFtdAjnKzHDgzgP9HYQgbxM1lbXScQ2eUBz2lGeVDPWA==", "dev": true, "license": "MIT", "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" + "expect": "30.4.1", + "jest-snapshot": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", - "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.4.1.tgz", + "integrity": "sha512-ZBn5CglH8fBsQsvs4VWNzD4aWfUYks+IdOOQU3MEK71ol/BcVm+P+rtb1KpiFBpSWSCE27uOahyyf1vfqOVbcQ==", "dev": true, "license": "MIT", "dependencies": { - "jest-get-type": "^29.6.3" + "@jest/get-type": "30.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.4.1.tgz", + "integrity": "sha512-iW5umdmfPeWzehrVhugFQZqCchSCud5S1l2YT0O9ZhjRR0ExclANDZkiSBwzqtnlOn0J1JXvO+HZ6rkuyOVOgQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", + "@jest/types": "30.4.1", + "@sinonjs/fake-timers": "^15.4.0", "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" + "jest-message-util": "30.4.1", + "jest-mock": "30.4.1", + "jest-util": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/get-type": { + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", + "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.4.1.tgz", + "integrity": "sha512-ZbuY4cmXC8DkxYjfvT2DbcHWL2T6vmsMhXCDcmTB2T0y0gaezBI77ufq5ZAIdcRkYZ7NEQEDg1xFeKbxUJ5v5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "30.4.1", + "@jest/expect": "30.4.1", + "@jest/types": "30.4.1", + "jest-mock": "30.4.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/pattern": { + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.4.0.tgz", + "integrity": "sha512-RAWn3+f9u8BsHijKJ71uHcFp6vmyEt6VvoWXkl6hKF3qVIuWNmudVjg12DlBPGup/frIl5UcUlH5HfEuvHpEXg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" + "@types/node": "*", + "jest-regex-util": "30.4.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", - "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.4.1.tgz", + "integrity": "sha512-/SnkPCzEQpUaBH81kjdEdDdo2WZl5hxw+BmLDGWjRkm8o7XlhjwsU36cqwe5PGBE5WYpBvDzRSdXx9rbGuJtNA==", "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", + "@jest/console": "30.4.1", + "@jest/test-result": "30.4.1", + "@jest/transform": "30.4.1", + "@jest/types": "30.4.1", + "@jridgewell/trace-mapping": "^0.3.25", "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", + "chalk": "^4.1.2", + "collect-v8-coverage": "^1.0.2", + "exit-x": "^0.2.2", + "glob": "^10.5.0", + "graceful-fs": "^4.2.11", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", + "istanbul-lib-source-maps": "^5.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", + "jest-message-util": "30.4.1", + "jest-util": "30.4.1", + "jest-worker": "30.4.1", "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", + "string-length": "^4.0.2", "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -1175,108 +1264,124 @@ } }, "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.4.1.tgz", + "integrity": "sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.34.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/snapshot-utils": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.4.1.tgz", + "integrity": "sha512-ObY4ljvQ95mt6iwKtVLetR/4yXiAgl3H4nJxhztr0MTjrN97TwDYrnCp/kF60Ec9HdhkWTHSu+Hg05aXfngpOA==", "dev": true, "license": "MIT", "dependencies": { - "@sinclair/typebox": "^0.27.8" + "@jest/types": "30.4.1", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "natural-compare": "^1.4.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.0.1.tgz", + "integrity": "sha512-MIRWMUUR3sdbP36oyNyhbThLHyJ2eEDClPCiHVbrYAe5g3CHRArIVpBw7cdSB5fr+ofSfIb2Tnsw8iEHL0PYQg==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" + "@jridgewell/trace-mapping": "^0.3.25", + "callsites": "^3.1.0", + "graceful-fs": "^4.2.11" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.4.1.tgz", + "integrity": "sha512-/ZG7pgEiOmmWkN9TplKbOu4id2N5lh7FHwRwlkgBVAzGdRH+OkkQ8wX/kIxg4zmd3ZQvAL1RwL2yWsvNYYECTw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "@jest/console": "30.4.1", + "@jest/types": "30.4.1", + "@types/istanbul-lib-coverage": "^2.0.6", + "collect-v8-coverage": "^1.0.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.4.1.tgz", + "integrity": "sha512-PeYE+4td5rKjoRPxztObrXU+H8hsjZfxKMXOcmrr34JerSyB/ROOxbbicz8B7A5j9R9VayDnVPvBmedqCsFCdw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", + "@jest/test-result": "30.4.1", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.4.1", "slash": "^3.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.4.1.tgz", + "integrity": "sha512-Wz0LyktlTvRefoymh+n64hQ84KNXsRGcwdoZ8CSa0Ea+fgYcHZlnk+hDP7v2MS7il2bQ5uTEIxf4/NNfhMN4KQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", + "@babel/core": "^7.27.4", + "@jest/types": "30.4.1", + "@jridgewell/trace-mapping": "^0.3.25", + "babel-plugin-istanbul": "^7.0.1", + "chalk": "^4.1.2", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.4.1", + "jest-regex-util": "30.4.0", + "jest-util": "30.4.1", + "pirates": "^4.0.7", "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" + "write-file-atomic": "^5.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.4.1.tgz", + "integrity": "sha512-f1x/vJXIfjOlEmejYpbkbgw1gOqpPECwMvMEtBqe47j7H2Hg8h8w3o3ikhSXq3MI15kg+oQ0exWO0uCtTNJLoQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", + "@jest/pattern": "30.4.0", + "@jest/schemas": "30.4.1", + "@types/istanbul-lib-coverage": "^2.0.6", + "@types/istanbul-reports": "^3.0.4", "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@types/yargs": "^17.0.33", + "chalk": "^4.1.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jridgewell/gen-mapping": { @@ -1329,10 +1434,53 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", + "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pkgr/core": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.3.6.tgz", + "integrity": "sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.61.1.tgz", - "integrity": "sha512-JnBB8MdXj45cajvTuO5FmPlvFVJRQgvrz1uSEl3NwqFnReAPGwb8EanbGi4z2nRaqLzjJSv5/JmycoTKlRZxHA==", + "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" ], @@ -1344,9 +1492,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.61.1.tgz", - "integrity": "sha512-Jx2g7iSjw4AOT0HDPHM9RV3GNjRXwybWtSFZiZAYUTjUwjVrYIwq3kBf+LnhqJlzXFAqTAh2F7IGI+O568exPw==", + "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" ], @@ -1358,9 +1506,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.61.1.tgz", - "integrity": "sha512-0F1L/Z3Eqv8mT2n3dCpeO8GcTvHvVqkP5/t6DMsn0KzhYVcg+s7Ncl5DS8qjKYEeio6Az0Gt6nyBORay5qIlCA==", + "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" ], @@ -1372,9 +1520,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.61.1.tgz", - "integrity": "sha512-qLttcH871ujY4YcVfUSShhOw+CsoTatYz8gRbHO7Bb92QH059/P0y5do1KMs41fY0BpD2x4AJH/gID0zFiqVKQ==", + "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" ], @@ -1386,9 +1534,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.61.1.tgz", - "integrity": "sha512-fUI4RapGE0Oh3mb8mgfvC1O2nU1RpDZUKnDQm3xB1Ipg7C2wTs5Kstz7G2uWK99a8S2yTMq8/P4uycwNa0nJyw==", + "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" ], @@ -1400,9 +1548,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.61.1.tgz", - "integrity": "sha512-H5YrdvJaDtI/U9/emrD4b++xkvp3y/JvOe4rizHbxvkyMfRS/CiRYdji+Pl8D0brEaNFWUh1drQxgAGIl6Xudw==", + "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" ], @@ -1414,13 +1562,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.61.1.tgz", - "integrity": "sha512-Q8CBCCQtDFrYtXoeUXSrnFXKOnyUhx6bz+SkL6A0E7V8kAiCJ5pamq1WtbfpVGhR5TSpXY6ak3avmDc5fHTyJA==", + "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": [ @@ -1428,13 +1579,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.61.1.tgz", - "integrity": "sha512-nwnhk1581l0FBVellGcVCAT0Oi06onEA3WB53sf01VO3I0UPBkMH9sXONYME2K0ovXcNayJfNtHfm6mpJElatQ==", + "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": [ @@ -1442,13 +1596,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.61.1.tgz", - "integrity": "sha512-x5Xr49hwt3hdW75UOZm3395YwwzPyauktslv29KpWL/T+vVAzoT3azLcTWv0eMciBNrx+DYjH4paehHoLpPvpg==", + "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": [ @@ -1456,13 +1613,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.61.1.tgz", - "integrity": "sha512-unMS3H73DpaoPyyEVPjGKleM/s0mkmsauTENpw4INQY8y4+IuLNjkueQ5QCtC0D3N38Y38yhAU8OoZ20S2Tm6w==", + "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": [ @@ -1470,13 +1630,16 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.61.1.tgz", - "integrity": "sha512-zNZzGRnAhwjFEYmvphJRV5XaQGjs62cCmeYYHUT//NbvEnHauw+I85nGG+SiVg5ld4GX8D1IbKIX+ozITQnhMQ==", + "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": [ @@ -1484,13 +1647,16 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.61.1.tgz", - "integrity": "sha512-LdpWGL8X209B2SIvWjqlc8VZgM6PKfontSerGepuldQmHYrAOtnMCXeJkxXGbC+PPZVOuu5czJo7fNV6aeW8rQ==", + "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": [ @@ -1498,13 +1664,16 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.61.1.tgz", - "integrity": "sha512-EC5kTtNaNGOmbMGqar8dvJy6y/hg99GAwjfBz++pxZhQATXGcRjd6c5en5wcbru0vkRmiMGsQKdMJOOf6sza4g==", + "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": [ @@ -1512,13 +1681,16 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.61.1.tgz", - "integrity": "sha512-8hiwp6D4acEcNK78I4rP0/XtS1sknWIAMJBPdR4l6zUtyTm5KiTDr5bXmWt4foY7nAN7AThDHgkLIEZOWKbzWw==", + "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": [ @@ -1526,13 +1698,16 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.61.1.tgz", - "integrity": "sha512-10dh/h/BqA7DuMPWSxkR8uks18FRwnwOEqr5zOTEl+NOwP/OMzKX8OFR/Of9xxDA7D5qef1Nzar5WDD2kCCr1g==", + "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": [ @@ -1540,13 +1715,16 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.61.1.tgz", - "integrity": "sha512-YKJ5lg35DP17gcAOggnihe+APw9HLyj1Xn7gsmGumBJAUDa6NGXNixJzmkWLhcK9TOuuyQjdamzvJefkO7qHZQ==", + "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": [ @@ -1554,13 +1732,16 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.61.1.tgz", - "integrity": "sha512-Mlil5G2Jj6a7B3LWGctg+XPL9vdXYuzCtNXfxOQ0nPjc2m6ueUktocPGH9bnAM0bNRKb/bAWTujUU7IJQdQA+g==", + "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": [ @@ -1568,13 +1749,16 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.61.1.tgz", - "integrity": "sha512-bVWIOIk6pV01p4CdUbPP7CJ/434z+OooYjDuFcR+44N35YvKUC66G8MGnvcWx5mWKW3g61J+t74l3Kj15Kwn2Q==", + "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": [ @@ -1582,13 +1766,16 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.61.1.tgz", - "integrity": "sha512-qy5pBvZbqNFheBz61R1rzsezjm0J7O2oNGoWtGoY89SZYLUfxAJTBAqDChqAIdB4rCiIbi9nF7yZ83GnNiLwSw==", + "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": [ @@ -1596,9 +1783,9 @@ ] }, "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.61.1.tgz", - "integrity": "sha512-E83TXjI4zm0+5f2qO+UOudaCYIhYwpJ5jq6YCZNIZ+6CbfhKrkAGezeiASBL9ElxAxFsRS9ZhESv8mfnj6TKeg==", + "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" ], @@ -1610,9 +1797,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.61.1.tgz", - "integrity": "sha512-fbWnKqVkjrJN38vNe3ahkbk6iejS/3b0Nt7EEtPpE6RBacZcGXNKbzfHN3GUUlXOPghUg0j6XUGrtjX9z1sIvA==", + "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" ], @@ -1624,9 +1811,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.61.1.tgz", - "integrity": "sha512-ArMl38iVAbk0New1ogihQNY6iphLi4ZaRsa037gUzv5yeKPY8TD3Dmy4x2RNC1VztU/uqm+G+/RwFrSka3Oy2g==", + "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" ], @@ -1638,9 +1825,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.61.1.tgz", - "integrity": "sha512-0mYtjHS9ucAbcATycCNK9IGBk/cCe/ma7EmSLGZdsxnOA8cjRIyU04wDpVAD9NiOfLUR9KTxdiO53uOkherqjQ==", + "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" ], @@ -1652,9 +1839,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.61.1.tgz", - "integrity": "sha512-gK1iCEPfpoSG9wfBihXxvBMi8ZfcWffYkEsC/Eih+iFENTaewvNcrEQ69lIOWYO5pePHKLHHO7nq5AILGO/HQQ==", + "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" ], @@ -1666,9 +1853,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.61.1.tgz", - "integrity": "sha512-X+zaP2x+j4RXGfbp/seSoRHWnPxzApilDszisZxbYH5C/jTxFhCtDNdPGZb9lJyYPs24wGxruPF7Y+sIXt9Gzw==", + "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" ], @@ -1680,9 +1867,9 @@ ] }, "node_modules/@sinclair/typebox": { - "version": "0.27.10", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", - "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", + "version": "0.34.51", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.51.tgz", + "integrity": "sha512-Nu4sNPT4G3QgAvxmdUCR/NBmsi23F2tEIcbMOZJVHS+qEgk+rmXxQikEeoKFyaX+UEggAoTvHUvIlj8MfYPzXQ==", "dev": true, "license": "MIT" }, @@ -1697,13 +1884,24 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "version": "15.4.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.4.0.tgz", + "integrity": "sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^3.0.0" + "@sinonjs/commons": "^3.0.1" + } + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" } }, "node_modules/@types/babel__core": { @@ -1758,16 +1956,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -1803,13 +1991,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", - "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", + "version": "26.1.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.1.tgz", + "integrity": "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~8.3.0" } }, "node_modules/@types/stack-utils": { @@ -1836,162 +2024,508 @@ "dev": true, "license": "MIT" }, - "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "node_modules/@ungap/structured-clone": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.3.tgz", + "integrity": "sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==", "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } + "license": "ISC" }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.12.2.tgz", + "integrity": "sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.12.2.tgz", + "integrity": "sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "engines": { - "node": ">=8" - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.12.2.tgz", + "integrity": "sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.12.2.tgz", + "integrity": "sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.12.2.tgz", + "integrity": "sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.12.2.tgz", + "integrity": "sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.12.2.tgz", + "integrity": "sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.12.2.tgz", + "integrity": "sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.12.2.tgz", + "integrity": "sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-loong64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.12.2.tgz", + "integrity": "sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-loong64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.12.2.tgz", + "integrity": "sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.12.2.tgz", + "integrity": "sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.12.2.tgz", + "integrity": "sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.12.2.tgz", + "integrity": "sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.12.2.tgz", + "integrity": "sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.12.2.tgz", + "integrity": "sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.12.2.tgz", + "integrity": "sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-openharmony-arm64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.12.2.tgz", + "integrity": "sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.12.2.tgz", + "integrity": "sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz", + "integrity": "sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.12.2.tgz", + "integrity": "sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.12.2.tgz", + "integrity": "sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/acorn": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.17.0.tgz", + "integrity": "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/babel-jest": { + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.4.1.tgz", + "integrity": "sha512-fATAbM8piYxkiXQp3RBXmZHxZVNJZAVXXfyeyCN2Tida3+qJ8ea9UxhiJ2y4fLO90ZImKt6k9FlcH2+rLkJGhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "30.4.1", + "@types/babel__core": "^7.20.5", + "babel-plugin-istanbul": "^7.0.1", + "babel-preset-jest": "30.4.0", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "slash": "^3.0.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.11.0 || ^8.0.0-0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz", + "integrity": "sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==", + "dev": true, + "license": "BSD-3-Clause", + "workspaces": [ + "test/babel-8" + ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-instrument": "^6.0.2", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=12" + } }, "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.4.0.tgz", + "integrity": "sha512-9EdtWM/sSfXLOGLwSn+GS6pIXyBnL07/8gyJlwFXjWy4DxMOyItqyUT29d4lQiS380EZwYlX7/At4PgBS+m2aA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" + "@types/babel__core": "^7.20.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/babel-preset-current-node-syntax": { @@ -2022,20 +2556,20 @@ } }, "node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.4.0.tgz", + "integrity": "sha512-lBY4jxsNmCnSiu7kquw8ZC9F4+XLMOKypT3RnNHPvU2Kpd4W0xaPuLr5ZkRyOsvLYAY4yaW1ZwTW4xB7NIiZzg==", "dev": true, "license": "MIT", "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" + "babel-plugin-jest-hoist": "30.4.0", + "babel-preset-current-node-syntax": "^1.2.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.11.0 || ^8.0.0-beta.1" } }, "node_modules/balanced-match": { @@ -2046,9 +2580,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.10.34", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.34.tgz", - "integrity": "sha512-IMDedajPifLnHNY0X9n8hKxRTQ6/eTHwr5bDo04WnuqxyKw6LYtQywCuuqPZwhl3aBXMvQpJov42GLCwRRdQzw==", + "version": "2.10.42", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.42.tgz", + "integrity": "sha512-c/jurFrDLyui7o1J86yLkRu4LMsTYcBohveus7/I2Hzdn9KIP2bdJPTue/lR1KH46enoPbD77GKeSYNdyPoD3Q==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2068,33 +2602,19 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.2.tgz", + "integrity": "sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==", "dev": true, "license": "MIT", "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" + "balanced-match": "^1.0.0" } }, "node_modules/browserslist": { - "version": "4.28.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", - "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.5.tgz", + "integrity": "sha512-Cu2E6QejHWzuDMTkuwgpABFgDfZrXLQq5V13YOACZx4mFAG4IwGTbTfHPMr4WtxlHoXSM8FIuRwYYCz5XiabaQ==", "dev": true, "funding": [ { @@ -2112,10 +2632,10 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.10.12", - "caniuse-lite": "^1.0.30001782", - "electron-to-chromium": "^1.5.328", - "node-releases": "^2.0.36", + "baseline-browser-mapping": "^2.10.42", + "caniuse-lite": "^1.0.30001800", + "electron-to-chromium": "^1.5.387", + "node-releases": "^2.0.50", "update-browserslist-db": "^1.2.3" }, "bin": { @@ -2189,9 +2709,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001797", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001797.tgz", - "integrity": "sha512-l8xKG+gwAIExZGl9FrF7KUwuOmk6wbEPC9Xoy/RtnWv1XG0Q4LFlagaLpUv3Kiza3W/wm27zy0yWJEieYKAP6w==", + "version": "1.0.30001803", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001803.tgz", + "integrity": "sha512-g/uHREV2ZpK9qMalCsWaxmA6ol+DX8GYhuf3T40RKoP+oL7vhRJh8LNt73PCjpnR6l14FzfPrB5Yux4PKm2meg==", "dev": true, "funding": [ { @@ -2253,9 +2773,9 @@ } }, "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.4.0.tgz", + "integrity": "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==", "dev": true, "funding": [ { @@ -2269,9 +2789,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", - "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz", + "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==", "dev": true, "license": "MIT" }, @@ -2290,6 +2810,69 @@ "node": ">=12" } }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2369,28 +2952,6 @@ "dev": true, "license": "MIT" }, - "node_modules/create-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", - "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -2459,20 +3020,17 @@ "node": ">=8" } }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } + "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.368", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.368.tgz", - "integrity": "sha512-7RckJJK4uESJF9PxvfMWd3TGqIiieUTG4HxnKaKuIpGbcr+r2ZEB3g2gAhCP3Fqm42vJSzLfgab9eva/C4/XVw==", + "version": "1.5.389", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.389.tgz", + "integrity": "sha512-cEto7aeOqBfU1D+c5py5pE+ooscKE75JifxLBdFUZsqAxRS6y7kebtxAZvICszSl05gPjYHDTjY+lXpyGvpJbg==", "dev": true, "license": "ISC" }, @@ -2490,9 +3048,9 @@ } }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "license": "MIT" }, @@ -2506,20 +3064,10 @@ "is-arrayish": "^0.2.1" } }, - "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/esbuild": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", - "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", + "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -2530,32 +3078,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.7", - "@esbuild/android-arm": "0.27.7", - "@esbuild/android-arm64": "0.27.7", - "@esbuild/android-x64": "0.27.7", - "@esbuild/darwin-arm64": "0.27.7", - "@esbuild/darwin-x64": "0.27.7", - "@esbuild/freebsd-arm64": "0.27.7", - "@esbuild/freebsd-x64": "0.27.7", - "@esbuild/linux-arm": "0.27.7", - "@esbuild/linux-arm64": "0.27.7", - "@esbuild/linux-ia32": "0.27.7", - "@esbuild/linux-loong64": "0.27.7", - "@esbuild/linux-mips64el": "0.27.7", - "@esbuild/linux-ppc64": "0.27.7", - "@esbuild/linux-riscv64": "0.27.7", - "@esbuild/linux-s390x": "0.27.7", - "@esbuild/linux-x64": "0.27.7", - "@esbuild/netbsd-arm64": "0.27.7", - "@esbuild/netbsd-x64": "0.27.7", - "@esbuild/openbsd-arm64": "0.27.7", - "@esbuild/openbsd-x64": "0.27.7", - "@esbuild/openharmony-arm64": "0.27.7", - "@esbuild/sunos-x64": "0.27.7", - "@esbuild/win32-arm64": "0.27.7", - "@esbuild/win32-ia32": "0.27.7", - "@esbuild/win32-x64": "0.27.7" + "@esbuild/aix-ppc64": "0.28.1", + "@esbuild/android-arm": "0.28.1", + "@esbuild/android-arm64": "0.28.1", + "@esbuild/android-x64": "0.28.1", + "@esbuild/darwin-arm64": "0.28.1", + "@esbuild/darwin-x64": "0.28.1", + "@esbuild/freebsd-arm64": "0.28.1", + "@esbuild/freebsd-x64": "0.28.1", + "@esbuild/linux-arm": "0.28.1", + "@esbuild/linux-arm64": "0.28.1", + "@esbuild/linux-ia32": "0.28.1", + "@esbuild/linux-loong64": "0.28.1", + "@esbuild/linux-mips64el": "0.28.1", + "@esbuild/linux-ppc64": "0.28.1", + "@esbuild/linux-riscv64": "0.28.1", + "@esbuild/linux-s390x": "0.28.1", + "@esbuild/linux-x64": "0.28.1", + "@esbuild/netbsd-arm64": "0.28.1", + "@esbuild/netbsd-x64": "0.28.1", + "@esbuild/openbsd-arm64": "0.28.1", + "@esbuild/openbsd-x64": "0.28.1", + "@esbuild/openharmony-arm64": "0.28.1", + "@esbuild/sunos-x64": "0.28.1", + "@esbuild/win32-arm64": "0.28.1", + "@esbuild/win32-ia32": "0.28.1", + "@esbuild/win32-x64": "0.28.1" } }, "node_modules/esbuild-plugin-file-path-extensions": { @@ -2581,26 +3129,12 @@ }, "node_modules/escape-string-regexp": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, + "license": "MIT", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/execa": { @@ -2627,30 +3161,39 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/exit-x": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/exit-x/-/exit-x-0.2.2.tgz", + "integrity": "sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.4.1.tgz", + "integrity": "sha512-PMARsyh/JtqC20HoGqlFcIlQAyqUtW4PlI1rup1uhYJtKuwAjbvWi3GQMAn+STdHum/dk8xrKfUM1+5SAwpolA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" + "@jest/expect-utils": "30.4.1", + "@jest/get-type": "30.1.0", + "jest-matcher-utils": "30.4.1", + "jest-message-util": "30.4.1", + "jest-mock": "30.4.1", + "jest-util": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/fast-json-stable-stringify": { @@ -2670,17 +3213,22 @@ "bser": "2.1.1" } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "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", - "dependencies": { - "to-regex-range": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, "node_modules/find-up": { @@ -2709,6 +3257,23 @@ "rollup": "^4.34.8" } }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2731,16 +3296,6 @@ "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/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -2785,22 +3340,22 @@ } }, "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": "*" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2823,19 +3378,6 @@ "node": ">=8" } }, - "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/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -2909,22 +3451,6 @@ "dev": true, "license": "MIT" }, - "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-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -2945,16 +3471,6 @@ "node": ">=6" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -3003,9 +3519,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "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": { @@ -3031,15 +3547,15 @@ } }, "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", "dev": true, "license": "BSD-3-Clause", "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "istanbul-lib-coverage": "^3.0.0" }, "engines": { "node": ">=10" @@ -3059,23 +3575,39 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-30.4.2.tgz", + "integrity": "sha512-Yi1jqNC/Oq0N4hBgNH/YvBpP1P57QqundgytzYqy3yqAa7NZPNjSoi4SGbRAXDMdBzNE6xBCi5U7RgfrvMEUVQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" + "@jest/core": "30.4.2", + "@jest/types": "30.4.1", + "import-local": "^3.2.0", + "jest-cli": "30.4.2" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -3087,76 +3619,75 @@ } }, "node_modules/jest-changed-files": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", - "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.4.1.tgz", + "integrity": "sha512-IuctmYrxi21iOSOaIXpJWalHyPAsVv0GeBHKDn8C1CA4W5htHn7INL+wdnL4Bo0+olEndvAFkmb++tIQJG+vvg==", "dev": true, "license": "MIT", "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", + "execa": "^5.1.1", + "jest-util": "30.4.1", "p-limit": "^3.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.4.2.tgz", + "integrity": "sha512-rvHH7VlY6LgbJXJTQ87GW62g1FntOtbhh0zT+v04kC+pgL6aBKyYINXxWukCpj3dcIBMw5/XUbtDS9dU9JTXeQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/environment": "30.4.1", + "@jest/expect": "30.4.1", + "@jest/test-result": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", - "chalk": "^4.0.0", + "chalk": "^4.1.2", "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", + "dedent": "^1.6.0", + "is-generator-fn": "^2.1.0", + "jest-each": "30.4.1", + "jest-matcher-utils": "30.4.1", + "jest-message-util": "30.4.1", + "jest-runtime": "30.4.2", + "jest-snapshot": "30.4.1", + "jest-util": "30.4.1", "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", + "pretty-format": "30.4.1", + "pure-rand": "^7.0.0", "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "stack-utils": "^2.0.6" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.4.2.tgz", + "integrity": "sha512-jfA2ocvVHMXS2QijrJ0d31ektP+d/W0T5RpcTX2Pq+3sVqHlsXVCM2+FmwpL+bdY8OfHpIg9xMxLF17Zg0U49Q==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" + "@jest/core": "30.4.2", + "@jest/test-result": "30.4.1", + "@jest/types": "30.4.1", + "chalk": "^4.1.2", + "exit-x": "^0.2.2", + "import-local": "^3.2.0", + "jest-config": "30.4.2", + "jest-util": "30.4.1", + "jest-validate": "30.4.1", + "yargs": "^17.7.2" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -3168,215 +3699,211 @@ } }, "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.4.2.tgz", + "integrity": "sha512-rNHAShJQqQwFNoL0hbf3BphSBOWnpOUAKvidLS/AjNVLPfoj5mSf4jQMfW3cYOs6hXeZC7nF7mDHaBnbxELOzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.27.4", + "@jest/get-type": "30.1.0", + "@jest/pattern": "30.4.0", + "@jest/test-sequencer": "30.4.1", + "@jest/types": "30.4.1", + "babel-jest": "30.4.1", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "deepmerge": "^4.3.1", + "glob": "^10.5.0", + "graceful-fs": "^4.2.11", + "jest-circus": "30.4.2", + "jest-docblock": "30.4.0", + "jest-environment-node": "30.4.1", + "jest-regex-util": "30.4.0", + "jest-resolve": "30.4.1", + "jest-runner": "30.4.2", + "jest-util": "30.4.1", + "jest-validate": "30.4.1", "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", + "pretty-format": "30.4.1", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { "@types/node": "*", + "esbuild-register": ">=3.4.0", "ts-node": ">=9.0.0" }, "peerDependenciesMeta": { "@types/node": { "optional": true }, + "esbuild-register": { + "optional": true + }, "ts-node": { "optional": true } } }, "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.4.1.tgz", + "integrity": "sha512-CRpFK0RtLriVDGcPPAnR6HMVI8bSR2jnUIgralhauzYQZIb4RH9AtEInTuQr65LmmGggGcRT6HIASxwqsVsmlA==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "@jest/diff-sequences": "30.4.0", + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "pretty-format": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.4.0.tgz", + "integrity": "sha512-ZPMabUZCx5MpbZ2eBYSvZ0J8fvo3dR9oM+eeUpb3aKNQFuS2tu3Duw1TNlMoP8k3WQgKGJuhcMFvwcVuq6T7oA==", "dev": true, "license": "MIT", "dependencies": { - "detect-newline": "^3.0.0" + "detect-newline": "^3.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.4.1.tgz", + "integrity": "sha512-/8MJbH6fuj48TstjrMf+u/pd06Qezz5xOXvZA6442heNOWr8bdeoGZX2d9fCn028CoMgYmroH9//zky5GfyYmA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" + "@jest/get-type": "30.1.0", + "@jest/types": "30.4.1", + "chalk": "^4.1.2", + "jest-util": "30.4.1", + "pretty-format": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.4.1.tgz", + "integrity": "sha512-4FZYVOk85hz2AyT6BbarKy9u37g6DbrDyCdFhsnDdXqyrueYQvB+0zO4f/kqLCRD0BsPRXPMNJeQwihKZV8naw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/environment": "30.4.1", + "@jest/fake-timers": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" + "jest-mock": "30.4.1", + "jest-util": "30.4.1", + "jest-validate": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.4.1.tgz", + "integrity": "sha512-rFrcONd8jeFsyw+Z9CrScJgglRf2+NFmNam8dKu7n+SoHqNYT47mn0DdEcVUZJpvh7Iz6/si7f7yUH7GJHVgnw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", + "@jest/types": "30.4.1", "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", + "anymatch": "^3.1.3", + "fb-watchman": "^2.0.2", + "graceful-fs": "^4.2.11", + "jest-regex-util": "30.4.0", + "jest-util": "30.4.1", + "jest-worker": "30.4.1", + "picomatch": "^4.0.3", "walker": "^1.0.8" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "optionalDependencies": { - "fsevents": "^2.3.2" + "fsevents": "^2.3.3" } }, "node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.4.1.tgz", + "integrity": "sha512-IpmyiioeHxiWDhesHnUFmOxcTzwCwKpgACgWajtAP+nYQXiY7DakTxB6Bx9JFiRMljr0AX1PvnQdaU1KFoz6NQ==", "dev": true, "license": "MIT", "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "@jest/get-type": "30.1.0", + "pretty-format": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.4.1.tgz", + "integrity": "sha512-zvYfX5CaeEkFrrLS9suWe9rvJrm9J1Iv3ua8kIBv9GEPzcnsfBf0bob37la7s67fs0nlBC3EuvkOLnXQKxtx4A==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "jest-diff": "30.4.1", + "pretty-format": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.4.1.tgz", + "integrity": "sha512-kwCKIvq0MCW1HzLoGola9Te6JUdzgV0loyKJ3Qghrkz9i5/RRIHsL95BMQc2HBBhlBKC4j22K9p11TGHH8RBpQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", + "@babel/code-frame": "^7.27.1", + "@jest/types": "30.4.1", + "@types/stack-utils": "^2.0.3", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "jest-util": "30.4.1", + "picomatch": "^4.0.3", + "pretty-format": "30.4.1", "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "stack-utils": "^2.0.6" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.4.1.tgz", + "integrity": "sha512-/i8SVb8/NSB7RfNi8gfqu8gxLV23KaL5EpAttyb9iz8qWRIqXRLflycz/32wXsYkOnaUlx8NAKnJYtpsmXUmfw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", + "@jest/types": "30.4.1", "@types/node": "*", - "jest-util": "^29.7.0" + "jest-util": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-pnp-resolver": { @@ -3398,153 +3925,154 @@ } }, "node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.4.0.tgz", + "integrity": "sha512-mWlvLviKIgIQ8VCuM1xRdD0TWp3zlzionlmDBjuXVBs+VkmXq6FgW9T4Emr7oGz/Rk6feDCGyiugolcQEyp3mg==", "dev": true, "license": "MIT", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.4.1.tgz", + "integrity": "sha512-Zry8Yq/yJcNAZ7dJ5F2heic8AheXvbFZ7XI5V+h28nrYZ7Qoyy4dItq8OodjnYD270mvX+ZudmrNV9cysqhW5Q==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.4.1", + "jest-pnp-resolver": "^1.2.3", + "jest-util": "30.4.1", + "jest-validate": "30.4.1", + "slash": "^3.0.0", + "unrs-resolver": "^1.7.11" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", - "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.4.2.tgz", + "integrity": "sha512-gDiVh1I+GxYzz9oXlyw+1wv6VOYX1WYxMOfjsA3iGKePV2oxmbHhwxfkALxNxYy1ciw6APWwkW2zZONwP97aEQ==", "dev": true, "license": "MIT", "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" + "jest-regex-util": "30.4.0", + "jest-snapshot": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.4.2.tgz", + "integrity": "sha512-2dw0PslVYXxffXGpLo+Ejad+KcI1Qkjn7f4X4619gf21oCUmL+SPfjqIa/losUem3yEOvfNZe/F1HWUcNpODcg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/console": "30.4.1", + "@jest/environment": "30.4.1", + "@jest/test-result": "30.4.1", + "@jest/transform": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", - "chalk": "^4.0.0", + "chalk": "^4.1.2", "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", + "exit-x": "^0.2.2", + "graceful-fs": "^4.2.11", + "jest-docblock": "30.4.0", + "jest-environment-node": "30.4.1", + "jest-haste-map": "30.4.1", + "jest-leak-detector": "30.4.1", + "jest-message-util": "30.4.1", + "jest-resolve": "30.4.1", + "jest-runtime": "30.4.2", + "jest-util": "30.4.1", + "jest-watcher": "30.4.1", + "jest-worker": "30.4.1", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.4.2.tgz", + "integrity": "sha512-3/5e8iPz2k/VLqlr8DgTftYyLUv8Su3FkCAO2/Od81UsUTpSxOrS6O5x5KkoQwyUjmpYyDJKeyAvg2T2nvpNkQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/environment": "30.4.1", + "@jest/fake-timers": "30.4.1", + "@jest/globals": "30.4.1", + "@jest/source-map": "30.0.1", + "@jest/test-result": "30.4.1", + "@jest/transform": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", + "chalk": "^4.1.2", + "cjs-module-lexer": "^2.1.0", + "collect-v8-coverage": "^1.0.2", + "glob": "^10.5.0", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.4.1", + "jest-message-util": "30.4.1", + "jest-mock": "30.4.1", + "jest-regex-util": "30.4.0", + "jest-resolve": "30.4.1", + "jest-snapshot": "30.4.1", + "jest-util": "30.4.1", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.4.1.tgz", + "integrity": "sha512-tEOkkfOMppUyeiHwjZswOQ3lcnoTnws/q5FnGIaeIh/jmoU0ZlgMYRR8sTlTj+nNGCoJ0RDq6SfxGxCsyMTPmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.27.4", + "@babel/generator": "^7.27.5", + "@babel/plugin-syntax-jsx": "^7.27.1", + "@babel/plugin-syntax-typescript": "^7.27.1", + "@babel/types": "^7.27.3", + "@jest/expect-utils": "30.4.1", + "@jest/get-type": "30.1.0", + "@jest/snapshot-utils": "30.4.1", + "@jest/transform": "30.4.1", + "@jest/types": "30.4.1", + "babel-preset-current-node-syntax": "^1.2.0", + "chalk": "^4.1.2", + "expect": "30.4.1", + "graceful-fs": "^4.2.11", + "jest-diff": "30.4.1", + "jest-matcher-utils": "30.4.1", + "jest-message-util": "30.4.1", + "jest-util": "30.4.1", + "pretty-format": "30.4.1", + "semver": "^7.7.2", + "synckit": "^0.11.8" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "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": { @@ -3555,39 +4083,39 @@ } }, "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.4.1.tgz", + "integrity": "sha512-vjQb1sACEiv13DKJMDToJpzVW0joCsIQrmbg0fi7CyOOt+g9jTuQl2A216pWRBYhOVt53XbL/2LbMKg1BECWOw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", + "@jest/types": "30.4.1", "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "graceful-fs": "^4.2.11", + "picomatch": "^4.0.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.4.1.tgz", + "integrity": "sha512-PDWi4SOwLnwqNDfHZjOcsEFyZ4fc/2W2gVL3DEoyqnB6jCQMLRtfBong8s6omIw3lI0HWOus12xfnFmQtjW3fw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", + "@jest/get-type": "30.1.0", + "@jest/types": "30.4.1", + "camelcase": "^6.3.0", + "chalk": "^4.1.2", "leven": "^3.1.0", - "pretty-format": "^29.7.0" + "pretty-format": "30.4.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-validate/node_modules/camelcase": { @@ -3604,39 +4132,40 @@ } }, "node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.4.1.tgz", + "integrity": "sha512-/l9UonmvCwjHH7d2h3iAwIloLc1H0S8mJZ/LNK3i86hqwPAz8otUJjP9MfYtz9Tt77Su5FD2xGjZn8d31IZHlw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/test-result": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" + "jest-util": "30.4.1", + "string-length": "^4.0.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.4.1.tgz", + "integrity": "sha512-SHynN/q/QD++iNyvMdy+WMmbCGk8jIsNcRxycXbWubSOhvo6T+j2afcfUSl+3hYsiBebOTo0cT7c2H7CXugu1g==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", - "jest-util": "^29.7.0", + "@ungap/structured-clone": "^1.3.0", + "jest-util": "30.4.1", "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "supports-color": "^8.1.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-worker/node_modules/supports-color": { @@ -3673,14 +4202,23 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz", + "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -3728,16 +4266,6 @@ "node": ">=6" } }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -3828,9 +4356,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "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": { @@ -3857,20 +4385,6 @@ "dev": true, "license": "MIT" }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -3882,16 +4396,29 @@ } }, "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.2" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" } }, "node_modules/mlly": { @@ -3926,6 +4453,22 @@ "thenify-all": "^1.0.0" } }, + "node_modules/napi-postinstall": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", + "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", + "dev": true, + "license": "MIT", + "bin": { + "napi-postinstall": "lib/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/napi-postinstall" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -3941,9 +4484,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.47", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.47.tgz", - "integrity": "sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og==", + "version": "2.0.51", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.51.tgz", + "integrity": "sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==", "dev": true, "license": "MIT", "engines": { @@ -4064,6 +4607,13 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -4113,12 +4663,29 @@ "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==", + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, - "license": "MIT" + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" }, "node_modules/pathe": { "version": "2.0.3", @@ -4135,13 +4702,13 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "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": ">=8.6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" @@ -4226,18 +4793,19 @@ } }, "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.4.1.tgz", + "integrity": "sha512-K6KiKMHTL4jjX4u3Kir2EW07nRfcqVTXIImx50wbjHQTcZPgg+gjVeNTIT3l3L1Rd4UefxfogquC9J37SoFyyw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "@jest/schemas": "30.4.1", + "ansi-styles": "^5.2.0", + "react-is-18": "npm:react-is@^18.3.1", + "react-is-19": "npm:react-is@^19.2.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/pretty-format/node_modules/ansi-styles": { @@ -4253,24 +4821,10 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-7.0.1.tgz", + "integrity": "sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==", "dev": true, "funding": [ { @@ -4284,13 +4838,22 @@ ], "license": "MIT" }, - "node_modules/react-is": { + "node_modules/react-is-18": { + "name": "react-is", "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true, "license": "MIT" }, + "node_modules/react-is-19": { + "name": "react-is", + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.7.tgz", + "integrity": "sha512-kZFnouyVv7eP/Phmrlo9FK+zcAdriZJvzxXHF1Sl1P377WSGe2G/JxVolhTrB/jeV47lKImhNUsijjHAAbcl/A==", + "dev": true, + "license": "MIT" + }, "node_modules/readdirp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", @@ -4315,28 +4878,6 @@ "node": ">=0.10.0" } }, - "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/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -4360,20 +4901,10 @@ "node": ">=8" } }, - "node_modules/resolve.exports": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", - "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/rollup": { - "version": "4.61.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.61.1.tgz", - "integrity": "sha512-I4KW6iuRpuu2uHBLraZ1wNZe0DP7lnRha+VJ9tNaYVaVgKhW0aI3h4RYnoRPeql0flHm/Co55b7snEDcOfOJrA==", + "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": { @@ -4387,31 +4918,31 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.61.1", - "@rollup/rollup-android-arm64": "4.61.1", - "@rollup/rollup-darwin-arm64": "4.61.1", - "@rollup/rollup-darwin-x64": "4.61.1", - "@rollup/rollup-freebsd-arm64": "4.61.1", - "@rollup/rollup-freebsd-x64": "4.61.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.61.1", - "@rollup/rollup-linux-arm-musleabihf": "4.61.1", - "@rollup/rollup-linux-arm64-gnu": "4.61.1", - "@rollup/rollup-linux-arm64-musl": "4.61.1", - "@rollup/rollup-linux-loong64-gnu": "4.61.1", - "@rollup/rollup-linux-loong64-musl": "4.61.1", - "@rollup/rollup-linux-ppc64-gnu": "4.61.1", - "@rollup/rollup-linux-ppc64-musl": "4.61.1", - "@rollup/rollup-linux-riscv64-gnu": "4.61.1", - "@rollup/rollup-linux-riscv64-musl": "4.61.1", - "@rollup/rollup-linux-s390x-gnu": "4.61.1", - "@rollup/rollup-linux-x64-gnu": "4.61.1", - "@rollup/rollup-linux-x64-musl": "4.61.1", - "@rollup/rollup-openbsd-x64": "4.61.1", - "@rollup/rollup-openharmony-arm64": "4.61.1", - "@rollup/rollup-win32-arm64-msvc": "4.61.1", - "@rollup/rollup-win32-ia32-msvc": "4.61.1", - "@rollup/rollup-win32-x64-gnu": "4.61.1", - "@rollup/rollup-win32-x64-msvc": "4.61.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" } }, @@ -4449,18 +4980,17 @@ } }, "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "license": "MIT" + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/slash": { "version": "3.0.0", @@ -4493,13 +5023,6 @@ "source-map": "^0.6.0" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -4507,27 +5030,69 @@ "dev": true, "license": "MIT", "dependencies": { - "escape-string-regexp": "^2.0.0" + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-length/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-length/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "license": "MIT", "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/string-width": { + "node_modules/string-width-cjs": { + "name": "string-width", "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", @@ -4542,7 +5107,54 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -4555,6 +5167,16 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -4624,17 +5246,20 @@ "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==", + "node_modules/synckit": { + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.13.tgz", + "integrity": "sha512-eNRKgb3z66Yp3D2CixVujOUvXLFUTij/zVnV8KRyvFdQwpz7I5DS8UfRkTeLzb64u+dkzDSdelE24izu+zSSUg==", "dev": true, "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.3.6" + }, "engines": { - "node": ">= 0.4" + "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/synckit" } }, "node_modules/test-exclude": { @@ -4652,6 +5277,52 @@ "node": ">=8" } }, + "node_modules/test-exclude/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/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/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -4699,37 +5370,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tinyglobby/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/tinyglobby/node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -4737,19 +5377,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -4768,9 +5395,9 @@ "license": "Apache-2.0" }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "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" }, @@ -4861,9 +5488,9 @@ } }, "node_modules/typescript": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", - "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", + "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": { @@ -4882,21 +5509,59 @@ "license": "MIT" }, "node_modules/undici": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.26.0.tgz", - "integrity": "sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==", + "version": "6.27.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.27.0.tgz", + "integrity": "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==", "license": "MIT", "engines": { "node": ">=18.17" } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", + "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", "dev": true, "license": "MIT" }, + "node_modules/unrs-resolver": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz", + "integrity": "sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "napi-postinstall": "^0.3.4" + }, + "funding": { + "url": "https://opencollective.com/unrs-resolver" + }, + "optionalDependencies": { + "@unrs/resolver-binding-android-arm-eabi": "1.12.2", + "@unrs/resolver-binding-android-arm64": "1.12.2", + "@unrs/resolver-binding-darwin-arm64": "1.12.2", + "@unrs/resolver-binding-darwin-x64": "1.12.2", + "@unrs/resolver-binding-freebsd-x64": "1.12.2", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.12.2", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.12.2", + "@unrs/resolver-binding-linux-arm64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-arm64-musl": "1.12.2", + "@unrs/resolver-binding-linux-loong64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-loong64-musl": "1.12.2", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-riscv64-musl": "1.12.2", + "@unrs/resolver-binding-linux-s390x-gnu": "1.12.2", + "@unrs/resolver-binding-linux-x64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-x64-musl": "1.12.2", + "@unrs/resolver-binding-openharmony-arm64": "1.12.2", + "@unrs/resolver-binding-wasm32-wasi": "1.12.2", + "@unrs/resolver-binding-win32-arm64-msvc": "1.12.2", + "@unrs/resolver-binding-win32-ia32-msvc": "1.12.2", + "@unrs/resolver-binding-win32-x64-msvc": "1.12.2" + } + }, "node_modules/update-browserslist-db": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", @@ -4970,6 +5635,25 @@ } }, "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", @@ -4987,6 +5671,64 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -4995,17 +5737,17 @@ "license": "ISC" }, "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" + "signal-exit": "^4.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/y18n": { @@ -5026,9 +5768,9 @@ "license": "ISC" }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", "dev": true, "license": "MIT", "dependencies": { @@ -5054,6 +5796,51 @@ "node": ">=12" } }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 581a191..a791cae 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "node-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", + "version": "27.0.0", "license": "BSD-3-Clause", "main": "dist/index.js", "type": "commonjs", @@ -43,15 +43,19 @@ }, "devDependencies": { "@types/json-bigint": "1.0.4", - "@types/node": "20.11.25", + "@types/node": "26.1.1", "tsup": "^8.5.1", "esbuild-plugin-file-path-extensions": "^2.0.0", - "tslib": "2.6.2", - "typescript": "5.4.2", - "jest": "^29.7.0" + "tslib": "2.8.1", + "typescript": "5.9.3", + "jest": "^30.4.2" }, "dependencies": { "json-bigint": "1.0.0", - "undici": "^6.26.0" + "undici": "^6.27.0" + }, + "overrides": { + "esbuild": "^0.28.1", + "js-yaml": "^4.2.0" } } diff --git a/src/client.ts b/src/client.ts index 5bc4e36..4fb7ac6 100644 --- a/src/client.ts +++ b/src/client.ts @@ -73,7 +73,7 @@ class AppwriteException extends Error { } function getUserAgent() { - let ua = 'AppwriteNodeJSSDK/26.2.0'; + let ua = 'AppwriteNodeJSSDK/27.0.0'; // `process` is a global in Node.js, but not fully available in all runtimes. const platform: string[] = []; @@ -115,6 +115,7 @@ class Client { project: '', key: '', jwt: '', + bearer: '', locale: '', session: '', forwardeduseragent: '', @@ -128,7 +129,7 @@ class Client { 'x-sdk-name': 'Node.js', 'x-sdk-platform': 'server', 'x-sdk-language': 'nodejs', - 'x-sdk-version': '26.2.0', + 'x-sdk-version': '27.0.0', 'user-agent' : getUserAgent(), 'X-Appwrite-Response-Format': '1.9.5', }; @@ -245,6 +246,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 * @@ -316,7 +331,7 @@ class Client { /** * Set ImpersonateUserId * - * Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data. + * Impersonate a user by ID * * @param value string * @@ -330,7 +345,7 @@ class Client { /** * Set ImpersonateUserEmail * - * Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data. + * Impersonate a user by email * * @param value string * @@ -344,7 +359,7 @@ class Client { /** * Set ImpersonateUserPhone * - * Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data. + * Impersonate a user by phone * * @param value string * @@ -660,6 +675,7 @@ class Client { async ping(): Promise { return this.call('GET', new URL(this.config.endpoint + '/ping'), { 'X-Appwrite-Project': this.config.project, + 'accept': 'application/json', }); } diff --git a/src/enums/billing-plan-group.ts b/src/enums/billing-plan-group.ts new file mode 100644 index 0000000..8aa025b --- /dev/null +++ b/src/enums/billing-plan-group.ts @@ -0,0 +1,5 @@ +export enum BillingPlanGroup { + Starter = 'starter', + Pro = 'pro', + Scale = 'scale', +} \ No newline at end of file diff --git a/src/enums/database-status.ts b/src/enums/database-status.ts new file mode 100644 index 0000000..9e9cb51 --- /dev/null +++ b/src/enums/database-status.ts @@ -0,0 +1,5 @@ +export enum DatabaseStatus { + Provisioning = 'provisioning', + Ready = 'ready', + Failed = 'failed', +} \ No newline at end of file diff --git a/src/enums/health-antivirus-status.ts b/src/enums/health-antivirus-status.ts deleted file mode 100644 index d4da4c4..0000000 --- a/src/enums/health-antivirus-status.ts +++ /dev/null @@ -1,5 +0,0 @@ -export enum HealthAntivirusStatus { - Disabled = 'disabled', - Offline = 'offline', - Online = 'online', -} \ No newline at end of file diff --git a/src/enums/health-check-status.ts b/src/enums/health-check-status.ts deleted file mode 100644 index 9dbc681..0000000 --- a/src/enums/health-check-status.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum HealthCheckStatus { - Pass = 'pass', - Fail = 'fail', -} \ No newline at end of file diff --git a/src/enums/health-queue-name.ts b/src/enums/health-queue-name.ts deleted file mode 100644 index 81320f8..0000000 --- a/src/enums/health-queue-name.ts +++ /dev/null @@ -1,15 +0,0 @@ -export enum HealthQueueName { - V1database = 'v1-database', - V1deletes = 'v1-deletes', - V1audits = 'v1-audits', - V1mails = 'v1-mails', - V1functions = 'v1-functions', - V1statsresources = 'v1-stats-resources', - V1statsusage = 'v1-stats-usage', - V1webhooks = 'v1-webhooks', - V1certificates = 'v1-certificates', - V1builds = 'v1-builds', - V1screenshots = 'v1-screenshots', - V1messaging = 'v1-messaging', - V1migrations = 'v1-migrations', -} \ No newline at end of file diff --git a/src/enums/o-auth-2-oidc-prompt.ts b/src/enums/o-auth-2-oidc-prompt.ts new file mode 100644 index 0000000..daa1ef0 --- /dev/null +++ b/src/enums/o-auth-2-oidc-prompt.ts @@ -0,0 +1,6 @@ +export enum OAuth2OidcPrompt { + None = 'none', + Login = 'login', + Consent = 'consent', + SelectAccount = 'select_account', +} \ No newline at end of file diff --git a/src/enums/o-auth-provider.ts b/src/enums/o-auth-provider.ts index cc9e340..e7136d6 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/enums/organization-key-scopes.ts b/src/enums/organization-key-scopes.ts index 05c96d2..a4ff3fb 100644 --- a/src/enums/organization-key-scopes.ts +++ b/src/enums/organization-key-scopes.ts @@ -5,6 +5,10 @@ export enum OrganizationKeyScopes { DevKeysWrite = 'devKeys.write', OrganizationKeysRead = 'organization.keys.read', OrganizationKeysWrite = 'organization.keys.write', + OrganizationMembershipsRead = 'organization.memberships.read', + OrganizationMembershipsWrite = 'organization.memberships.write', + OrganizationRead = 'organization.read', + OrganizationWrite = 'organization.write', DomainsRead = 'domains.read', DomainsWrite = 'domains.write', KeysRead = 'keys.read', diff --git a/src/enums/project-key-scopes.ts b/src/enums/project-key-scopes.ts index 927acf8..7f97ba9 100644 --- a/src/enums/project-key-scopes.ts +++ b/src/enums/project-key-scopes.ts @@ -11,10 +11,12 @@ export enum ProjectKeyScopes { PoliciesWrite = 'policies.write', ProjectPoliciesRead = 'project.policies.read', ProjectPoliciesWrite = 'project.policies.write', + ProjectOauth2Read = 'project.oauth2.read', + ProjectOauth2Write = 'project.oauth2.write', TemplatesRead = 'templates.read', TemplatesWrite = 'templates.write', - Oauth2Read = 'oauth2.read', - Oauth2Write = 'oauth2.write', + StagesRead = 'stages.read', + StagesWrite = 'stages.write', UsersRead = 'users.read', UsersWrite = 'users.write', SessionsRead = 'sessions.read', @@ -95,5 +97,7 @@ export enum ProjectKeyScopes { EventsRead = 'events.read', AppsRead = 'apps.read', AppsWrite = 'apps.write', + Oauth2Read = 'oauth2.read', + Oauth2Write = 'oauth2.write', UsageRead = 'usage.read', } \ No newline at end of file diff --git a/src/enums/project-o-auth-2-oidc-prompt.ts b/src/enums/project-o-auth-2-oidc-prompt.ts new file mode 100644 index 0000000..6d346b1 --- /dev/null +++ b/src/enums/project-o-auth-2-oidc-prompt.ts @@ -0,0 +1,6 @@ +export enum ProjectOAuth2OidcPrompt { + None = 'none', + Login = 'login', + Consent = 'consent', + SelectAccount = 'select_account', +} \ No newline at end of file diff --git a/src/enums/project-o-auth-provider-id.ts b/src/enums/project-o-auth-provider-id.ts index e1ed1b8..125ee88 100644 --- a/src/enums/project-o-auth-provider-id.ts +++ b/src/enums/project-o-auth-provider-id.ts @@ -1,6 +1,7 @@ export enum ProjectOAuthProviderId { Amazon = 'amazon', Apple = 'apple', + Appwrite = 'appwrite', Auth0 = 'auth0', Authentik = 'authentik', Autodesk = 'autodesk', diff --git a/src/enums/project-policy-id.ts b/src/enums/project-policy-id.ts index be2ea72..823727a 100644 --- a/src/enums/project-policy-id.ts +++ b/src/enums/project-policy-id.ts @@ -12,4 +12,5 @@ export enum ProjectPolicyId { Denyaliasedemail = 'deny-aliased-email', Denydisposableemail = 'deny-disposable-email', Denyfreeemail = 'deny-free-email', + Denycorporateemail = 'deny-corporate-email', } \ No newline at end of file diff --git a/src/enums/project-service-id.ts b/src/enums/project-service-id.ts index 01f844a..0da78c5 100644 --- a/src/enums/project-service-id.ts +++ b/src/enums/project-service-id.ts @@ -17,4 +17,5 @@ export enum ProjectServiceId { Migrations = 'migrations', Messaging = 'messaging', Advisor = 'advisor', + Oauth2 = 'oauth2', } \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 6e11f54..efa797e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,7 +6,6 @@ export { Backups } from './services/backups'; export { Databases } from './services/databases'; export { Functions } from './services/functions'; export { Graphql } from './services/graphql'; -export { Health } from './services/health'; export { Locale } from './services/locale'; export { Messaging } from './services/messaging'; export { Organization } from './services/organization'; @@ -19,7 +18,6 @@ export { Storage } from './services/storage'; export { TablesDB } from './services/tables-db'; export { Teams } from './services/teams'; export { Tokens } from './services/tokens'; -export { Usage } from './services/usage'; export { Users } from './services/users'; export { Webhooks } from './services/webhooks'; export type { Models, Payload, UploadProgress } from './client'; @@ -49,13 +47,13 @@ export { TemplateReferenceType } from './enums/template-reference-type'; export { VCSReferenceType } from './enums/vcs-reference-type'; export { DeploymentDownloadType } from './enums/deployment-download-type'; export { ExecutionMethod } from './enums/execution-method'; -export { HealthQueueName } from './enums/health-queue-name'; export { MessagePriority } from './enums/message-priority'; export { SmtpEncryption } from './enums/smtp-encryption'; export { OrganizationKeyScopes } from './enums/organization-key-scopes'; export { Region } from './enums/region'; export { ProjectAuthMethodId } from './enums/project-auth-method-id'; export { ProjectOAuth2GooglePrompt } from './enums/project-o-auth-2-google-prompt'; +export { ProjectOAuth2OidcPrompt } from './enums/project-o-auth-2-oidc-prompt'; export { ProjectOAuthProviderId } from './enums/project-o-auth-provider-id'; export { ProjectPolicyId } from './enums/project-policy-id'; export { ProjectProtocolId } from './enums/project-protocol-id'; @@ -74,6 +72,7 @@ export { TablesDBIndexType } from './enums/tables-db-index-type'; export { PasswordHash } from './enums/password-hash'; export { MessagingProviderType } from './enums/messaging-provider-type'; export { DatabaseType } from './enums/database-type'; +export { DatabaseStatus } from './enums/database-status'; export { AttributeStatus } from './enums/attribute-status'; export { ColumnStatus } from './enums/column-status'; export { IndexStatus } from './enums/index-status'; @@ -81,9 +80,9 @@ export { DeploymentStatus } from './enums/deployment-status'; export { ExecutionTrigger } from './enums/execution-trigger'; export { ExecutionStatus } from './enums/execution-status'; export { OAuth2GooglePrompt } from './enums/o-auth-2-google-prompt'; +export { OAuth2OidcPrompt } from './enums/o-auth-2-oidc-prompt'; export { PlatformType } from './enums/platform-type'; -export { HealthAntivirusStatus } from './enums/health-antivirus-status'; -export { HealthCheckStatus } from './enums/health-check-status'; export { ProxyRuleDeploymentResourceType } from './enums/proxy-rule-deployment-resource-type'; export { ProxyRuleStatus } from './enums/proxy-rule-status'; export { MessageStatus } from './enums/message-status'; +export { BillingPlanGroup } from './enums/billing-plan-group'; diff --git a/src/models.ts b/src/models.ts index 2c72952..5e56cfa 100644 --- a/src/models.ts +++ b/src/models.ts @@ -1,4 +1,5 @@ import { DatabaseType } from "./enums/database-type" +import { DatabaseStatus } from "./enums/database-status" import { AttributeStatus } from "./enums/attribute-status" import { ColumnStatus } from "./enums/column-status" import { IndexStatus } from "./enums/index-status" @@ -9,12 +10,12 @@ import { ProjectAuthMethodId } from "./enums/project-auth-method-id" import { ProjectServiceId } from "./enums/project-service-id" import { ProjectProtocolId } from "./enums/project-protocol-id" import { OAuth2GooglePrompt } from "./enums/o-auth-2-google-prompt" +import { OAuth2OidcPrompt } from "./enums/o-auth-2-oidc-prompt" import { PlatformType } from "./enums/platform-type" -import { HealthAntivirusStatus } from "./enums/health-antivirus-status" -import { HealthCheckStatus } from "./enums/health-check-status" import { ProxyRuleDeploymentResourceType } from "./enums/proxy-rule-deployment-resource-type" import { ProxyRuleStatus } from "./enums/proxy-rule-status" import { MessageStatus } from "./enums/message-status" +import { BillingPlanGroup } from "./enums/billing-plan-group" /** * Appwrite Models @@ -496,7 +497,7 @@ export namespace Models { /** * List of policies. */ - policies: (Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail)[]; + policies: (Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail)[]; } /** @@ -513,20 +514,6 @@ export namespace Models { templates: EmailTemplate[]; } - /** - * Status List - */ - export type HealthStatusList = { - /** - * Total number of statuses that matched your query. - */ - total: number; - /** - * List of statuses. - */ - statuses: HealthStatus[]; - } - /** * Rule List */ @@ -709,6 +696,10 @@ export namespace Models { * Database type. */ type: DatabaseType; + /** + * Database status. Possible values: `provisioning`, `ready` or `failed` + */ + status?: DatabaseStatus; /** * Database backup policies. */ @@ -1364,7 +1355,7 @@ export namespace Models { /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ - default?: any[]; + default?: number[]; } /** @@ -1406,7 +1397,7 @@ export namespace Models { /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ - default?: any[]; + default?: number[][]; } /** @@ -1448,7 +1439,7 @@ export namespace Models { /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ - default?: any[]; + default?: number[][][]; } /** @@ -2284,7 +2275,7 @@ export namespace Models { /** * Default value for column when not provided. Cannot be set when column is required. */ - default?: any[]; + default?: number[]; } /** @@ -2326,7 +2317,7 @@ export namespace Models { /** * Default value for column when not provided. Cannot be set when column is required. */ - default?: any[]; + default?: number[][]; } /** @@ -2368,7 +2359,7 @@ export namespace Models { /** * Default value for column when not provided. Cannot be set when column is required. */ - default?: any[]; + default?: number[][][]; } /** @@ -2796,7 +2787,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; /** @@ -3336,6 +3327,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; } /** @@ -4252,6 +4287,10 @@ export namespace Models { * Project status */ status: string; + /** + * Stage progress (completed or skipped) with timestamps and actor types, keyed by stage id. + */ + onboarding: object; /** * List of auth methods. */ @@ -4279,59 +4318,63 @@ export namespace Models { /** * OAuth2 server status */ - oAuth2ServerEnabled: boolean; + oAuth2ServerEnabled?: boolean; /** * OAuth2 server authorization URL */ - oAuth2ServerAuthorizationUrl: string; + oAuth2ServerAuthorizationUrl?: string; /** * OAuth2 server allowed scopes */ - oAuth2ServerScopes: string[]; + oAuth2ServerScopes?: string[]; + /** + * OAuth2 server scopes used when an authorization request omits the scope parameter + */ + oAuth2ServerDefaultScopes?: string[]; /** * OAuth2 server accepted RFC 9396 authorization_details types */ - oAuth2ServerAuthorizationDetailsTypes: string[]; + oAuth2ServerAuthorizationDetailsTypes?: string[]; /** * OAuth2 server access token duration in seconds for confidential clients */ - oAuth2ServerAccessTokenDuration: number; + oAuth2ServerAccessTokenDuration?: number; /** * OAuth2 server refresh token duration in seconds for confidential clients */ - oAuth2ServerRefreshTokenDuration: number; + oAuth2ServerRefreshTokenDuration?: number; /** * OAuth2 server access token duration in seconds for public clients (SPAs, mobile, native) */ - oAuth2ServerPublicAccessTokenDuration: number; + oAuth2ServerPublicAccessTokenDuration?: number; /** * OAuth2 server refresh token duration in seconds for public clients (SPAs, mobile, native) */ - oAuth2ServerPublicRefreshTokenDuration: number; + oAuth2ServerPublicRefreshTokenDuration?: number; /** * When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting. */ - oAuth2ServerConfidentialPkce: boolean; + oAuth2ServerConfidentialPkce?: boolean; /** * URL to your application page where users enter the device flow user code. Empty when the Device Authorization Grant is not configured. */ - oAuth2ServerVerificationUrl: string; + oAuth2ServerVerificationUrl?: string; /** * Number of characters in the device flow user code, excluding the formatting separator. */ - oAuth2ServerUserCodeLength: number; + oAuth2ServerUserCodeLength?: number; /** * Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`. */ - oAuth2ServerUserCodeFormat: string; + oAuth2ServerUserCodeFormat?: string; /** * Lifetime in seconds of device flow device codes and user codes. */ - oAuth2ServerDeviceCodeDuration: number; + oAuth2ServerDeviceCodeDuration?: number; /** * OAuth2 server discovery URL */ - oAuth2ServerDiscoveryUrl: string; + oAuth2ServerDiscoveryUrl?: string; } /** @@ -5268,6 +5311,28 @@ export namespace Models { endpoint: string; } + /** + * OAuth2Appwrite + */ + export type OAuth2Appwrite = { + /** + * OAuth2 provider ID. + */ + $id: string; + /** + * OAuth2 provider is active and can be used to create sessions. + */ + enabled: boolean; + /** + * Appwrite OAuth2 client ID. + */ + clientId: string; + /** + * Appwrite OAuth2 client secret. + */ + clientSecret: string; + } + /** * OAuth2Authentik */ @@ -5412,6 +5477,14 @@ export namespace Models { * OpenID Connect user info endpoint URL. */ userInfoURL: string; + /** + * OpenID Connect prompt values controlling the authentication and consent screens. + */ + prompt: OAuth2OidcPrompt[]; + /** + * Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds. + */ + maxAge?: number; } /** @@ -5533,7 +5606,7 @@ export namespace Models { /** * List of OAuth2 providers. */ - providers: (Models.OAuth2Github | Models.OAuth2Discord | Models.OAuth2Figma | Models.OAuth2Dropbox | Models.OAuth2Dailymotion | Models.OAuth2Bitbucket | Models.OAuth2Bitly | Models.OAuth2Box | Models.OAuth2Autodesk | Models.OAuth2Google | Models.OAuth2Zoom | Models.OAuth2Zoho | Models.OAuth2Yandex | Models.OAuth2X | Models.OAuth2WordPress | Models.OAuth2Twitch | Models.OAuth2Stripe | Models.OAuth2Spotify | Models.OAuth2Slack | Models.OAuth2Podio | Models.OAuth2Notion | Models.OAuth2Salesforce | Models.OAuth2Yahoo | Models.OAuth2Linkedin | Models.OAuth2Disqus | Models.OAuth2Amazon | Models.OAuth2Etsy | Models.OAuth2Facebook | Models.OAuth2Tradeshift | Models.OAuth2Paypal | Models.OAuth2Gitlab | Models.OAuth2Authentik | Models.OAuth2Auth0 | Models.OAuth2FusionAuth | Models.OAuth2Keycloak | Models.OAuth2Oidc | Models.OAuth2Apple | Models.OAuth2Okta | Models.OAuth2Kick | Models.OAuth2Microsoft)[]; + providers: (Models.OAuth2Github | Models.OAuth2Discord | Models.OAuth2Figma | Models.OAuth2Dropbox | Models.OAuth2Dailymotion | Models.OAuth2Bitbucket | Models.OAuth2Bitly | Models.OAuth2Box | Models.OAuth2Autodesk | Models.OAuth2Google | Models.OAuth2Zoom | Models.OAuth2Zoho | Models.OAuth2Yandex | Models.OAuth2X | Models.OAuth2WordPress | Models.OAuth2Twitch | Models.OAuth2Stripe | Models.OAuth2Spotify | Models.OAuth2Slack | Models.OAuth2Podio | Models.OAuth2Notion | Models.OAuth2Salesforce | Models.OAuth2Yahoo | Models.OAuth2Linkedin | Models.OAuth2Disqus | Models.OAuth2Amazon | Models.OAuth2Etsy | Models.OAuth2Facebook | Models.OAuth2Tradeshift | Models.OAuth2Paypal | Models.OAuth2Gitlab | Models.OAuth2Appwrite | Models.OAuth2Authentik | Models.OAuth2Auth0 | Models.OAuth2FusionAuth | Models.OAuth2Keycloak | Models.OAuth2Oidc | Models.OAuth2Apple | Models.OAuth2Okta | Models.OAuth2Kick | Models.OAuth2Microsoft)[]; } /** @@ -6012,96 +6085,6 @@ export namespace Models { countryName: string; } - /** - * Health Antivirus - */ - export type HealthAntivirus = { - /** - * Antivirus version. - */ - version: string; - /** - * Antivirus status. Possible values are: `disabled`, `offline`, `online` - */ - status: HealthAntivirusStatus; - } - - /** - * Health Queue - */ - export type HealthQueue = { - /** - * Amount of actions in the queue. - */ - size: number; - } - - /** - * Health Status - */ - export type HealthStatus = { - /** - * Name of the service. - */ - name: string; - /** - * Duration in milliseconds how long the health check took. - */ - ping: number; - /** - * Service status. Possible values are: `pass`, `fail` - */ - status: HealthCheckStatus; - } - - /** - * Health Certificate - */ - export type HealthCertificate = { - /** - * Certificate name - */ - name: string; - /** - * Subject SN - */ - subjectSN: string; - /** - * Issuer organisation - */ - issuerOrganisation: string; - /** - * Valid from - */ - validFrom: string; - /** - * Valid to - */ - validTo: string; - /** - * Signature type SN - */ - signatureTypeSN: string; - } - - /** - * Health Time - */ - export type HealthTime = { - /** - * Current unix timestamp on trustful remote server. - */ - remoteTime: number; - /** - * Current unix timestamp of local server where Appwrite runs. - */ - localTime: number; - /** - * Difference of unix remote and local timestamps in milliseconds. - */ - diff: number; - } - /** * Headers */ @@ -6788,62 +6771,36 @@ export namespace Models { * Hostname. */ hostname: string; + } + + /** + * AdditionalResource + */ + export type AdditionalResource = { /** - * 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. + * Resource name */ - clientEngineVersion: string; + name: string; /** - * Device name. + * Resource unit */ - deviceName: string; + unit: string; /** - * Device brand name. + * Price currency */ - deviceBrand: string; + currency: string; /** - * Device model name. + * Price */ - deviceModel: string; + price: number; /** - * Country two-character ISO 3166-1 alpha code. + * Resource value */ - countryCode: string; + value: number; /** - * Country name. + * Description on invoice */ - countryName: string; + invoiceDesc: string; } /** @@ -6939,179 +6896,665 @@ export namespace Models { } /** - * Block + * billingPlan */ - export type Block = { + export type BillingPlan = { /** - * Block creation date in ISO 8601 format. + * Plan ID. */ - $createdAt: string; + $id: string; /** - * Resource type that is blocked + * Plan name */ - resourceType: string; + name: string; /** - * Resource identifier that is blocked + * Plan description */ - resourceId: string; + desc: string; /** - * Reason for the block. Can be null if no reason was provided. + * Plan order */ - reason?: string; + order: number; /** - * Block expiration date in ISO 8601 format. Can be null if the block does not expire. + * Price */ - expiredAt?: string; + price: number; /** - * Name of the project this block applies to. + * Trial days */ - projectName: string; + trial: number; /** - * Region of the project this block applies to. + * Bandwidth */ - region: string; + bandwidth: number; /** - * Name of the organization that owns the project. + * Storage */ - organizationName: string; + storage: number; /** - * ID of the organization that owns the project. + * Image Transformations */ - organizationId: string; + imageTransformations: number; /** - * Billing plan of the organization that owns the project. + * Screenshots generated */ - billingPlan: string; - } - - /** - * backup - */ - export type BackupPolicy = { + screenshotsGenerated: number; /** - * Backup policy ID. + * Members */ - $id: string; + members: number; /** - * Backup policy name. + * Webhooks */ - name: string; + webhooks: number; /** - * Policy creation date in ISO 8601 format. + * Projects */ - $createdAt: string; + projects: number; /** - * Policy update date in ISO 8601 format. + * Platforms */ - $updatedAt: string; + platforms: number; /** - * The services that are backed up by this policy. + * Users */ - services: string[]; + users: number; /** - * The resources that are backed up by this policy. + * Teams */ - resources: string[]; + teams: number; /** - * The resource ID to backup. Set only if this policy should backup a single resource. + * Databases */ - resourceId?: string; + databases: number; /** - * The resource type to backup. Set only if this policy should backup a single resource. + * Database reads per month */ - resourceType?: string; + databasesReads: number; /** - * How many days to keep the backup before it will be automatically deleted. + * Database writes per month */ - retention: number; + databasesWrites: number; /** - * Policy backup schedule in CRON format. + * Database batch size limit */ - schedule: string; + databasesBatchSize: number; /** - * Is this policy enabled. + * Buckets */ - enabled: boolean; - } - - /** - * Policy Deny Aliased Email - */ - export type PolicyDenyAliasedEmail = { + buckets: number; /** - * Policy ID. + * File size */ - $id: string; + fileSize: number; /** - * Whether the deny aliased email policy is enabled. + * Functions */ - enabled: boolean; - } - - /** - * Policy Deny Disposable Email - */ - export type PolicyDenyDisposableEmail = { + functions: number; /** - * Policy ID. + * Sites */ - $id: string; + sites: number; /** - * Whether the deny disposable email policy is enabled. + * Function executions */ - enabled: boolean; - } - - /** - * Policy Deny Free Email - */ - export type PolicyDenyFreeEmail = { + executions: number; /** - * Policy ID. + * Rolling max executions retained per function/site */ - $id: string; + executionsRetentionCount: number; /** - * Whether the deny free email policy is enabled. + * GB hours for functions */ - enabled: boolean; - } - - /** - * Restoration - */ - export type BackupRestoration = { + GBHours: number; /** - * Restoration ID. + * Realtime connections */ - $id: string; + realtime: number; /** - * Restoration creation time in ISO 8601 format. + * Realtime messages */ - $createdAt: string; + realtimeMessages: number; /** - * Restoration update date in ISO 8601 format. + * Messages per month + */ + messages: number; + /** + * Topics for messaging + */ + topics: number; + /** + * SMS authentications per month + */ + authPhone: number; + /** + * Custom domains + */ + domains: number; + /** + * Activity log days + */ + activityLogs: number; + /** + * Usage history days + */ + usageLogs: number; + /** + * Usage log time intervals allowed for this plan (e.g. 15m, 1h, 1d). + */ + usageLogsIntervals?: string[]; + /** + * Number of days of console inactivity before a project is paused. 0 means pausing is disabled. + */ + projectInactivityDays: number; + /** + * Alert threshold percentage + */ + alertLimit: number; + /** + * Additional resources + */ + usage: UsageBillingPlan; + /** + * Addons + */ + addons: BillingPlanAddon; + /** + * Budget cap enabled or disabled. + */ + budgetCapEnabled: boolean; + /** + * Custom SMTP + */ + customSmtp: boolean; + /** + * Appwrite branding in email + */ + emailBranding: boolean; + /** + * Does plan require payment method + */ + requiresPaymentMethod: boolean; + /** + * Does plan require billing address + */ + requiresBillingAddress: boolean; + /** + * Is the billing plan available + */ + isAvailable: boolean; + /** + * Can user change the plan themselves + */ + selfService: boolean; + /** + * Does plan enable premium support + */ + premiumSupport: boolean; + /** + * Does plan support budget cap + */ + budgeting: boolean; + /** + * Does plan support mock numbers + */ + supportsMockNumbers: boolean; + /** + * Does plan support organization roles + */ + supportsOrganizationRoles: boolean; + /** + * Does plan support credit + */ + supportsCredits: boolean; + /** + * Does plan support blocking disposable email addresses. + */ + supportsDisposableEmailValidation: boolean; + /** + * Does plan support requiring canonical email addresses. + */ + supportsCanonicalEmailValidation: boolean; + /** + * Does plan support blocking free email addresses. + */ + supportsFreeEmailValidation: boolean; + /** + * Does plan support restricting sign-ups to corporate email addresses only. + */ + supportsCorporateEmailValidation: boolean; + /** + * Does plan support project-specific member roles. + */ + supportsProjectSpecificRoles: boolean; + /** + * Does plan support backup policies. + */ + backupsEnabled: boolean; + /** + * Whether usage addons are calculated per project. + */ + usagePerProject: boolean; + /** + * Supported addons for this plan + */ + supportedAddons: BillingPlanSupportedAddons; + /** + * How many policies does plan support + */ + backupPolicies: number; + /** + * Maximum function and site deployment size in MB + */ + deploymentSize: number; + /** + * Maximum function and site deployment size in MB + */ + buildSize: number; + /** + * Does the plan support encrypted string attributes or not. + */ + databasesAllowEncrypt: boolean; + /** + * Plan specific limits + */ + limits?: BillingPlanLimits; + /** + * Group of this billing plan for variants + */ + group: BillingPlanGroup; + /** + * Details of the program this plan is a part of. + */ + program?: Program; + /** + * Dedicated database limits available to this plan. + */ + dedicatedDatabases?: BillingPlanDedicatedDatabaseLimits; + } + + /** + * Addon + */ + export type BillingPlanAddon = { + /** + * Addon seats + */ + seats: BillingPlanAddonDetails; + /** + * Addon projects + */ + projects: BillingPlanAddonDetails; + } + + /** + * Details + */ + export type BillingPlanAddonDetails = { + /** + * Is the addon supported in the plan? + */ + supported: boolean; + /** + * Addon plan included value + */ + planIncluded: number; + /** + * Addon limit + */ + limit: number; + /** + * Addon type + */ + type: string; + /** + * Price currency + */ + currency: string; + /** + * Price + */ + price: number; + /** + * Resource value + */ + value: number; + /** + * Description on invoice + */ + invoiceDesc: string; + } + + /** + * PlanLimits + */ + export type BillingPlanLimits = { + /** + * Credits limit per billing cycle + */ + credits?: number; + /** + * Daily credits limit (if applicable) + */ + dailyCredits?: number; + } + + /** + * dedicatedDatabaseLimits + */ + export type BillingPlanDedicatedDatabaseLimits = { + /** + * Minimum CPU allocation in millicores. + */ + minCpu?: number; + /** + * Maximum CPU allocation in millicores. + */ + maxCpu?: number; + /** + * Minimum memory allocation in megabytes. + */ + minMemoryMb?: number; + /** + * Maximum memory allocation in megabytes. + */ + maxMemoryMb?: number; + /** + * Minimum storage allocation in gigabytes. + */ + minStorageGb?: number; + /** + * Maximum storage allocation in gigabytes. + */ + maxStorageGb?: number; + /** + * Maximum number of high-availability replicas per dedicated database. + */ + maxReplicas?: number; + /** + * Maximum number of client connections. + */ + maxConnections?: number; + /** + * Maximum number of entries allowed in the IP allowlist. + */ + maxIpAllowlistSize?: number; + /** + * Maximum number of database extensions that can be enabled. + */ + maxExtensions?: number; + /** + * Maximum number of days a backup can be retained. + */ + maxBackupRetentionDays?: number; + /** + * Maximum number of days of point-in-time recovery data that can be retained. + */ + maxPitrRetentionDays?: number; + /** + * Maximum number of rows a single SQL API query can return. + */ + maxSqlApiMaxRows?: number; + /** + * Maximum response size in bytes for a single SQL API query. + */ + maxSqlApiMaxBytes?: number; + /** + * Maximum execution time in seconds for a single SQL API query. + */ + maxSqlApiTimeoutSeconds?: number; + /** + * Maximum number of SQL statement types that can be permitted through the SQL API. + */ + maxSqlApiAllowedStatements?: number; + /** + * SQL statement types permitted through the SQL API. + */ + allowedSqlStatements?: string[]; + /** + * Storage classes available for dedicated databases. + */ + allowedStorageClasses?: string[]; + /** + * Replica synchronization modes available for dedicated databases. + */ + allowedSyncModes?: string[]; + } + + /** + * BillingPlanSupportedAddons + */ + export type BillingPlanSupportedAddons = { + /** + * Whether the plan supports BAA (Business Associate Agreement) addon + */ + baa: boolean; + /** + * Whether the plan supports Premium Geo DB addon (project-level) + */ + premiumGeoDB: boolean; + /** + * Whether the plan supports Premium Geo DB addon (organization-level) + */ + premiumGeoDBOrg: boolean; + } + + /** + * Block + */ + export type Block = { + /** + * Block creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Resource type that is blocked + */ + resourceType: string; + /** + * Resource identifier that is blocked + */ + resourceId: string; + /** + * Block mode. full blocks reads and writes; readOnly blocks writes only. + */ + mode: string; + /** + * Reason for the block. Can be null if no reason was provided. + */ + reason?: string; + /** + * Block expiration date in ISO 8601 format. Can be null if the block does not expire. + */ + expiredAt?: string; + /** + * Name of the project this block applies to. + */ + projectName: string; + /** + * Region of the project this block applies to. + */ + region: string; + /** + * Name of the organization that owns the project. + */ + organizationName: string; + /** + * ID of the organization that owns the project. + */ + organizationId: string; + /** + * Billing plan of the organization that owns the project. + */ + billingPlan: string; + } + + /** + * Organization + */ + export type Organization = { + /** + * Team ID. + */ + $id: string; + /** + * Team creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Team update date in ISO 8601 format. */ $updatedAt: string; /** - * Backup archive ID. + * Team name. */ - archiveId: string; + name: string; /** - * Backup policy ID. + * Total number of team members. */ - policyId: string; + total: number; /** - * The status of the restoration. Possible values: pending, downloading, processing, completed, failed. + * Team preferences as a key-value object + */ + prefs: Preferences; + /** + * Project budget limit + */ + billingBudget: number; + /** + * Project budget limit + */ + budgetAlerts: number[]; + /** + * Organization's billing plan ID. + */ + billingPlan: string; + /** + * Organization's billing plan ID. + */ + billingPlanId: string; + /** + * Organization's billing plan. + */ + billingPlanDetails: BillingPlan; + /** + * Billing email set for the organization. + */ + billingEmail: string; + /** + * Billing cycle start date. + */ + billingStartDate: string; + /** + * Current invoice cycle start date. + */ + billingCurrentInvoiceDate: string; + /** + * Next invoice cycle start date. + */ + billingNextInvoiceDate: string; + /** + * Start date of trial. + */ + billingTrialStartDate: string; + /** + * Number of trial days. + */ + billingTrialDays: number; + /** + * Current active aggregation id. + */ + billingAggregationId: string; + /** + * Current active aggregation id. + */ + billingInvoiceId: string; + /** + * Default payment method. + */ + paymentMethodId: string; + /** + * Default payment method. + */ + billingAddressId: string; + /** + * Backup payment method. + */ + backupPaymentMethodId: string; + /** + * Team status. */ status: string; /** - * The backup start time. + * Remarks on team status. */ - startedAt: string; + remarks: string; /** - * Migration ID. + * Organization agreements */ - migrationId: string; + agreementBAA: string; + /** + * Program manager's name. + */ + programManagerName: string; + /** + * Program manager's calendar link. + */ + programManagerCalendar: string; + /** + * Program's discord channel name. + */ + programDiscordChannelName: string; + /** + * Program's discord channel URL. + */ + programDiscordChannelUrl: string; + /** + * Billing limits reached + */ + billingLimits?: BillingLimits; + /** + * Billing plan selected for downgrade. + */ + billingPlanDowngrade: string; + /** + * Tax Id + */ + billingTaxId: string; + /** + * Marked for deletion + */ + markedForDeletion: boolean; + /** + * Product with which the organization is associated (appwrite or imagine) + */ + platform: string; + /** + * Selected projects + */ + projects: string[]; + } + + /** + * backup + */ + export type BackupPolicy = { + /** + * Backup policy ID. + */ + $id: string; + /** + * Backup policy name. + */ + name: string; + /** + * Policy creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Policy update date in ISO 8601 format. + */ + $updatedAt: string; /** * The services that are backed up by this policy. */ @@ -7121,81 +7564,227 @@ export namespace Models { */ resources: string[]; /** - * Optional data in key-value object. + * The resource ID to backup. Set only if this policy should backup a single resource. */ - options: string; + resourceId?: string; + /** + * The resource type to backup. Set only if this policy should backup a single resource. + */ + resourceType?: string; + /** + * How many days to keep the backup before it will be automatically deleted. + */ + retention: number; + /** + * Policy backup schedule in CRON format. + */ + schedule: string; + /** + * Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup). + */ + type: string; + /** + * Is this policy enabled. + */ + enabled: boolean; } /** - * usageEvent + * Policy Deny Aliased Email */ - export type UsageEvent = { + export type PolicyDenyAliasedEmail = { /** - * The metric key. + * Policy ID. */ - metric: string; + $id: string; /** - * The metric value. + * Whether the deny aliased email policy is enabled. */ - value: number; + enabled: boolean; + } + + /** + * Policy Deny Disposable Email + */ + export type PolicyDenyDisposableEmail = { /** - * The event timestamp. + * Policy ID. */ - time: string; + $id: string; + /** + * Whether the deny disposable email policy is enabled. + */ + enabled: boolean; + } + + /** + * Policy Deny Free Email + */ + export type PolicyDenyFreeEmail = { /** - * The API endpoint path. + * Policy ID. */ - path: string; + $id: string; /** - * The HTTP method. + * Whether the deny free email policy is enabled. */ - method: string; + enabled: boolean; + } + + /** + * Policy Deny Corporate Email + */ + export type PolicyDenyCorporateEmail = { + /** + * Policy ID. + */ + $id: string; + /** + * Whether the deny non-corporate email policy is enabled. + */ + enabled: boolean; + } + + /** + * Program + */ + export type Program = { + /** + * Program ID + */ + $id: string; + /** + * Program title + */ + title: string; + /** + * Program description + */ + description: string; + /** + * Program tag for highlighting on console + */ + tag: string; + /** + * Program icon for highlighting on console + */ + icon: string; + /** + * URL for more information on this program + */ + url: string; + /** + * Whether this program is active + */ + active: boolean; + /** + * Whether this program is external + */ + external: boolean; + /** + * Billing plan ID that this is program is associated with. + */ + billingPlanId: string; + } + + /** + * Restoration + */ + export type BackupRestoration = { + /** + * Restoration ID. + */ + $id: string; + /** + * Restoration creation time in ISO 8601 format. + */ + $createdAt: string; + /** + * Restoration update date in ISO 8601 format. + */ + $updatedAt: string; + /** + * Backup archive ID. + */ + archiveId: string; + /** + * Backup policy ID. + */ + policyId: string; /** - * HTTP status code. Stored as string to preserve unset state (empty string = not available). + * The status of the restoration. Possible values: pending, downloading, processing, completed, failed. */ status: string; /** - * The resource type. + * The backup start time. */ - resourceType: string; + startedAt: string; /** - * The resource ID. + * Migration ID. */ - resourceId: string; + migrationId: string; /** - * Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format. + * The services that are backed up by this policy. */ - countryCode: string; + services: string[]; /** - * The user agent string. + * The resources that are backed up by this policy. */ - userAgent: string; + resources: string[]; + /** + * Optional data in key-value object. + */ + options: string; } /** - * usageGauge + * usageBillingPlan */ - export type UsageGauge = { + export type UsageBillingPlan = { /** - * The metric key. + * Bandwidth additional resources */ - metric: string; + bandwidth: AdditionalResource; /** - * The current snapshot value. + * Executions additional resources */ - value: number; + executions: AdditionalResource; /** - * The snapshot timestamp. + * Member additional resources */ - time: string; + member: AdditionalResource; /** - * The resource type. + * Realtime additional resources */ - resourceType: string; + realtime: AdditionalResource; /** - * The resource ID. + * Realtime messages additional resources */ - resourceId: string; + realtimeMessages: AdditionalResource; + /** + * Realtime bandwidth additional resources + */ + realtimeBandwidth: AdditionalResource; + /** + * Storage additional resources + */ + storage: AdditionalResource; + /** + * User additional resources + */ + users: AdditionalResource; + /** + * GBHour additional resources + */ + GBHours: AdditionalResource; + /** + * Image transformation additional resources + */ + imageTransformations: AdditionalResource; + /** + * Credits additional resources + */ + credits: AdditionalResource; } /** @@ -7253,32 +7842,4 @@ export namespace Models { */ restorations: BackupRestoration[]; } - - /** - * Usage events list - */ - export type UsageEventList = { - /** - * Total number of events that matched your query. - */ - total: number; - /** - * List of events. - */ - events: UsageEvent[]; - } - - /** - * Usage gauges list - */ - export type UsageGaugeList = { - /** - * Total number of gauges that matched your query. - */ - total: number; - /** - * List of gauges. - */ - gauges: UsageGauge[]; - } } diff --git a/src/query.ts b/src/query.ts index fdd9f40..e0e9725 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 474bfba..57aadeb 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -292,7 +292,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "identityId"'); } - const apiPath = '/account/identities/{identityId}'.replace('{identityId}', identityId); + const apiPath = '/account/identities/{identityId}'.replace('{identityId}', encodeURIComponent(String(identityId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -518,7 +518,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "type"'); } - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); + const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -572,7 +572,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "type"'); } - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); + const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -635,7 +635,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "otp"'); } - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); + const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); const payload: Payload = {}; if (typeof otp !== 'undefined') { payload['otp'] = otp; @@ -700,7 +700,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "otp"'); } - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); + const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); const payload: Payload = {}; if (typeof otp !== 'undefined') { payload['otp'] = otp; @@ -758,7 +758,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "type"'); } - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); + const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -811,7 +811,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "type"'); } - const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); + const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', encodeURIComponent(String(type))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2100,7 +2100,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "sessionId"'); } - const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId); + const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', encodeURIComponent(String(sessionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2153,7 +2153,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "sessionId"'); } - const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId); + const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', encodeURIComponent(String(sessionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2207,7 +2207,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "sessionId"'); } - const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId); + const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', encodeURIComponent(String(sessionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2426,7 +2426,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. @@ -2441,7 +2441,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. @@ -2476,7 +2476,7 @@ export class Account { throw new AppwriteException('Missing required parameter: "provider"'); } - const apiPath = '/account/tokens/oauth2/{provider}'.replace('{provider}', provider); + const apiPath = '/account/tokens/oauth2/{provider}'.replace('{provider}', encodeURIComponent(String(provider))); const payload: Payload = {}; if (typeof success !== 'undefined') { payload['success'] = success; diff --git a/src/services/activities.ts b/src/services/activities.ts index 10b8062..e473154 100644 --- a/src/services/activities.ts +++ b/src/services/activities.ts @@ -101,7 +101,7 @@ export class Activities { throw new AppwriteException('Missing required parameter: "eventId"'); } - const apiPath = '/activities/events/{eventId}'.replace('{eventId}', eventId); + const apiPath = '/activities/events/{eventId}'.replace('{eventId}', encodeURIComponent(String(eventId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/advisor.ts b/src/services/advisor.ts index c735c29..ccb67d3 100644 --- a/src/services/advisor.ts +++ b/src/services/advisor.ts @@ -111,7 +111,7 @@ export class Advisor { throw new AppwriteException('Missing required parameter: "reportId"'); } - const apiPath = '/reports/{reportId}'.replace('{reportId}', reportId); + const apiPath = '/reports/{reportId}'.replace('{reportId}', encodeURIComponent(String(reportId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -166,7 +166,7 @@ export class Advisor { throw new AppwriteException('Missing required parameter: "reportId"'); } - const apiPath = '/reports/{reportId}'.replace('{reportId}', reportId); + const apiPath = '/reports/{reportId}'.replace('{reportId}', encodeURIComponent(String(reportId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -230,7 +230,7 @@ export class Advisor { throw new AppwriteException('Missing required parameter: "reportId"'); } - const apiPath = '/reports/{reportId}/insights'.replace('{reportId}', reportId); + const apiPath = '/reports/{reportId}/insights'.replace('{reportId}', encodeURIComponent(String(reportId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -299,7 +299,7 @@ export class Advisor { throw new AppwriteException('Missing required parameter: "insightId"'); } - const apiPath = '/reports/{reportId}/insights/{insightId}'.replace('{reportId}', reportId).replace('{insightId}', insightId); + const apiPath = '/reports/{reportId}/insights/{insightId}'.replace('{reportId}', encodeURIComponent(String(reportId))).replace('{insightId}', encodeURIComponent(String(insightId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/avatars.ts b/src/services/avatars.ts index 0e71d1a..d6914c0 100644 --- a/src/services/avatars.ts +++ b/src/services/avatars.ts @@ -70,7 +70,7 @@ export class Avatars { throw new AppwriteException('Missing required parameter: "code"'); } - const apiPath = '/avatars/browsers/{code}'.replace('{code}', code); + const apiPath = '/avatars/browsers/{code}'.replace('{code}', encodeURIComponent(String(code))); const payload: Payload = {}; if (typeof width !== 'undefined') { payload['width'] = width; @@ -152,7 +152,7 @@ export class Avatars { throw new AppwriteException('Missing required parameter: "code"'); } - const apiPath = '/avatars/credit-cards/{code}'.replace('{code}', code); + const apiPath = '/avatars/credit-cards/{code}'.replace('{code}', encodeURIComponent(String(code))); const payload: Payload = {}; if (typeof width !== 'undefined') { payload['width'] = width; @@ -295,7 +295,7 @@ export class Avatars { throw new AppwriteException('Missing required parameter: "code"'); } - const apiPath = '/avatars/flags/{code}'.replace('{code}', code); + const apiPath = '/avatars/flags/{code}'.replace('{code}', encodeURIComponent(String(code))); const payload: Payload = {}; if (typeof width !== 'undefined') { payload['width'] = width; diff --git a/src/services/backups.ts b/src/services/backups.ts index 098db6d..38b5cc0 100644 --- a/src/services/backups.ts +++ b/src/services/backups.ts @@ -165,7 +165,7 @@ export class Backups { throw new AppwriteException('Missing required parameter: "archiveId"'); } - const apiPath = '/backups/archives/{archiveId}'.replace('{archiveId}', archiveId); + const apiPath = '/backups/archives/{archiveId}'.replace('{archiveId}', encodeURIComponent(String(archiveId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -218,7 +218,7 @@ export class Backups { throw new AppwriteException('Missing required parameter: "archiveId"'); } - const apiPath = '/backups/archives/{archiveId}'.replace('{archiveId}', archiveId); + const apiPath = '/backups/archives/{archiveId}'.replace('{archiveId}', encodeURIComponent(String(archiveId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -434,7 +434,7 @@ export class Backups { throw new AppwriteException('Missing required parameter: "policyId"'); } - const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', policyId); + const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', encodeURIComponent(String(policyId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -504,7 +504,7 @@ export class Backups { throw new AppwriteException('Missing required parameter: "policyId"'); } - const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', policyId); + const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', encodeURIComponent(String(policyId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -570,7 +570,7 @@ export class Backups { throw new AppwriteException('Missing required parameter: "policyId"'); } - const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', policyId); + const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', encodeURIComponent(String(policyId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -590,41 +590,50 @@ export class Backups { /** * Create and trigger a new restoration for a backup on a project. + * + * When restoring a DocumentsDB or VectorsDB database to a new resource, pass `newSpecification` to provision the restored database on a different specification than the archived one (for example, restoring onto a larger or smaller dedicated database). Use `serverless` to restore onto the shared pool, or a dedicated specification slug to restore onto a dedicated database of that size. The specification must be permitted by the organization's plan. `newSpecification` is not supported for legacy/TablesDB databases or for bucket restores. + * * * @param {string} params.archiveId - Backup archive ID to restore * @param {BackupServices[]} params.services - Array of services to restore * @param {string} params.newResourceId - 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. * @param {string} params.newResourceName - Database name. Max length: 128 chars. + * @param {string} params.newSpecification - Specification to provision the restored database on, when restoring a DocumentsDB or VectorsDB database to a new resource. Defaults to the archived database's specification. Use `serverless` for the shared pool or a dedicated specification slug. * @throws {AppwriteException} * @returns {Promise} */ - createRestoration(params: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string }): Promise; + createRestoration(params: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string, newSpecification?: string }): Promise; /** * Create and trigger a new restoration for a backup on a project. + * + * When restoring a DocumentsDB or VectorsDB database to a new resource, pass `newSpecification` to provision the restored database on a different specification than the archived one (for example, restoring onto a larger or smaller dedicated database). Use `serverless` to restore onto the shared pool, or a dedicated specification slug to restore onto a dedicated database of that size. The specification must be permitted by the organization's plan. `newSpecification` is not supported for legacy/TablesDB databases or for bucket restores. + * * * @param {string} archiveId - Backup archive ID to restore * @param {BackupServices[]} services - Array of services to restore * @param {string} newResourceId - 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. * @param {string} newResourceName - Database name. Max length: 128 chars. + * @param {string} newSpecification - Specification to provision the restored database on, when restoring a DocumentsDB or VectorsDB database to a new resource. Defaults to the archived database's specification. Use `serverless` for the shared pool or a dedicated specification slug. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createRestoration(archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string): Promise; + createRestoration(archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string, newSpecification?: string): Promise; createRestoration( - paramsOrFirst: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string } | string, - ...rest: [(BackupServices[])?, (string)?, (string)?] + paramsOrFirst: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string, newSpecification?: string } | string, + ...rest: [(BackupServices[])?, (string)?, (string)?, (string)?] ): Promise { - let params: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string }; + let params: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string, newSpecification?: string }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string }; + params = (paramsOrFirst || {}) as { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string, newSpecification?: string }; } else { params = { archiveId: paramsOrFirst as string, services: rest[0] as BackupServices[], newResourceId: rest[1] as string, - newResourceName: rest[2] as string + newResourceName: rest[2] as string, + newSpecification: rest[3] as string }; } @@ -632,6 +641,7 @@ export class Backups { const services = params.services; const newResourceId = params.newResourceId; const newResourceName = params.newResourceName; + const newSpecification = params.newSpecification; if (typeof archiveId === 'undefined') { throw new AppwriteException('Missing required parameter: "archiveId"'); @@ -654,6 +664,9 @@ export class Backups { if (typeof newResourceName !== 'undefined') { payload['newResourceName'] = newResourceName; } + if (typeof newSpecification !== 'undefined') { + payload['newSpecification'] = newSpecification; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -759,7 +772,7 @@ export class Backups { throw new AppwriteException('Missing required parameter: "restorationId"'); } - const apiPath = '/backups/restorations/{restorationId}'.replace('{restorationId}', restorationId); + const apiPath = '/backups/restorations/{restorationId}'.replace('{restorationId}', encodeURIComponent(String(restorationId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/databases.ts b/src/services/databases.ts index 8107a94..ee501f8 100644 --- a/src/services/databases.ts +++ b/src/services/databases.ts @@ -167,6 +167,7 @@ export class 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} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTransactions` instead. */ listTransactions(params?: { queries?: string[] }): Promise; /** @@ -220,6 +221,7 @@ export class Databases { * @param {number} params.ttl - Seconds before the transaction expires. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTransaction` instead. */ createTransaction(params?: { ttl?: number }): Promise; /** @@ -274,6 +276,7 @@ export class Databases { * @param {string} params.transactionId - Transaction ID. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getTransaction` instead. */ getTransaction(params: { transactionId: string }): Promise; /** @@ -304,7 +307,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "transactionId"'); } - const apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', transactionId); + const apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -329,6 +332,7 @@ export class Databases { * @param {boolean} params.rollback - Rollback transaction? * @throws {AppwriteException} * @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; /** @@ -366,7 +370,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "transactionId"'); } - const apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', transactionId); + const apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); const payload: Payload = {}; if (typeof commit !== 'undefined') { payload['commit'] = commit; @@ -396,6 +400,7 @@ export class Databases { * @param {string} params.transactionId - Transaction ID. * @throws {AppwriteException} * @returns {Promise<{}>} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteTransaction` instead. */ deleteTransaction(params: { transactionId: string }): Promise<{}>; /** @@ -426,7 +431,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "transactionId"'); } - const apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', transactionId); + const apiPath = '/databases/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -450,6 +455,7 @@ export class Databases { * @param {object[]} params.operations - Array of staged operations. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createOperations` instead. */ createOperations(params: { transactionId: string, operations?: object[] }): Promise; /** @@ -484,7 +490,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "transactionId"'); } - const apiPath = '/databases/transactions/{transactionId}/operations'.replace('{transactionId}', transactionId); + const apiPath = '/databases/transactions/{transactionId}/operations'.replace('{transactionId}', encodeURIComponent(String(transactionId))); const payload: Payload = {}; if (typeof operations !== 'undefined') { payload['operations'] = operations; @@ -542,7 +548,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "databaseId"'); } - const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId); + const apiPath = '/databases/{databaseId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -605,7 +611,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "databaseId"'); } - const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId); + const apiPath = '/databases/{databaseId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -666,7 +672,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "databaseId"'); } - const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId); + const apiPath = '/databases/{databaseId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -733,7 +739,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "databaseId"'); } - const apiPath = '/databases/{databaseId}/collections'.replace('{databaseId}', databaseId); + const apiPath = '/databases/{databaseId}/collections'.replace('{databaseId}', encodeURIComponent(String(databaseId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -831,7 +837,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "name"'); } - const apiPath = '/databases/{databaseId}/collections'.replace('{databaseId}', databaseId); + const apiPath = '/databases/{databaseId}/collections'.replace('{databaseId}', encodeURIComponent(String(databaseId))); const payload: Payload = {}; if (typeof collectionId !== 'undefined') { payload['collectionId'] = collectionId; @@ -915,7 +921,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "collectionId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -997,7 +1003,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "collectionId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -1075,7 +1081,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "collectionId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1145,7 +1151,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "collectionId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -1245,7 +1251,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -1361,7 +1367,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -1463,7 +1469,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -1563,7 +1569,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -1657,7 +1663,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -1757,7 +1763,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -1853,7 +1859,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/email'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/email'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -1955,7 +1961,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -2058,7 +2064,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/enum'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/enum'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2170,7 +2176,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof elements !== 'undefined') { payload['elements'] = elements; @@ -2277,7 +2283,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2393,7 +2399,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -2503,7 +2509,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2619,7 +2625,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -2721,7 +2727,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/ip'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/ip'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2823,7 +2829,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -2857,12 +2863,12 @@ export class Databases { * @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.key - Attribute Key. * @param {boolean} params.required - Is attribute required? - * @param {any[]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. + * @param {any[][]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLineColumn` instead. */ - createLineAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] }): Promise; + createLineAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][] }): Promise; /** * Create a geometric line attribute. * @@ -2870,27 +2876,27 @@ export class Databases { * @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} key - Attribute Key. * @param {boolean} required - Is attribute required? - * @param {any[]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. + * @param {any[][]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise; + createLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][]): Promise; createLineAttribute( - paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?] + paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][] } | string, + ...rest: [(string)?, (string)?, (boolean)?, (any[][])?] ): Promise { - let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] }; + let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][] }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] }; + params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][] }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[] + xdefault: rest[3] as any[][] }; } @@ -2913,7 +2919,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/line'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/line'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2947,13 +2953,13 @@ export class Databases { * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @param {string} params.key - Attribute Key. * @param {boolean} params.required - Is attribute required? - * @param {any[]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. + * @param {any[][]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. * @param {string} params.newKey - New attribute key. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateLineColumn` instead. */ - updateLineAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }): Promise; + updateLineAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }): Promise; /** * Update a line attribute. Changing the `default` value will not update already existing documents. * @@ -2961,28 +2967,28 @@ export class Databases { * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @param {string} key - Attribute Key. * @param {boolean} required - Is attribute required? - * @param {any[]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. + * @param {any[][]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. * @param {string} newKey - New attribute key. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise; + updateLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string): Promise; updateLineAttribute( - paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?, (string)?] + paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string } | string, + ...rest: [(string)?, (string)?, (boolean)?, (any[][])?, (string)?] ): Promise { - let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[], + xdefault: rest[3] as any[][], newKey: rest[4] as string }; } @@ -3007,7 +3013,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -3047,6 +3053,7 @@ export class Databases { * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLongtextColumn` instead. */ createLongtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise; /** @@ -3106,7 +3113,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -3151,6 +3158,7 @@ export class Databases { * @param {string} params.newKey - New Attribute Key. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateLongtextColumn` instead. */ updateLongtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string }): Promise; /** @@ -3210,7 +3218,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -3250,6 +3258,7 @@ export class Databases { * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createMediumtextColumn` instead. */ createMediumtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise; /** @@ -3309,7 +3318,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -3354,6 +3363,7 @@ export class Databases { * @param {string} params.newKey - New Attribute Key. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateMediumtextColumn` instead. */ updateMediumtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string }): Promise; /** @@ -3413,7 +3423,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -3447,12 +3457,12 @@ export class Databases { * @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.key - Attribute Key. * @param {boolean} params.required - Is attribute required? - * @param {any[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. + * @param {number[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPointColumn` instead. */ - createPointAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] }): Promise; + createPointAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[] }): Promise; /** * Create a geometric point attribute. * @@ -3460,27 +3470,27 @@ export class Databases { * @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} key - Attribute Key. * @param {boolean} required - Is attribute required? - * @param {any[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. + * @param {number[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createPointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise; + createPointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[]): Promise; createPointAttribute( - paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?] + paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[] } | string, + ...rest: [(string)?, (string)?, (boolean)?, (number[])?] ): Promise { - let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] }; + let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[] }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] }; + params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[] }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[] + xdefault: rest[3] as number[] }; } @@ -3503,7 +3513,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -3537,13 +3547,13 @@ export class Databases { * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @param {string} params.key - Attribute Key. * @param {boolean} params.required - Is attribute required? - * @param {any[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. + * @param {number[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. * @param {string} params.newKey - New attribute key. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePointColumn` instead. */ - updatePointAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }): Promise; + updatePointAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[], newKey?: string }): Promise; /** * Update a point attribute. Changing the `default` value will not update already existing documents. * @@ -3551,28 +3561,28 @@ export class Databases { * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @param {string} key - Attribute Key. * @param {boolean} required - Is attribute required? - * @param {any[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. + * @param {number[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. * @param {string} newKey - New attribute key. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise; + updatePointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[], newKey?: string): Promise; updatePointAttribute( - paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?, (string)?] + paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[], newKey?: string } | string, + ...rest: [(string)?, (string)?, (boolean)?, (number[])?, (string)?] ): Promise { - let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[], newKey?: string }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[], newKey?: string }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[], + xdefault: rest[3] as number[], newKey: rest[4] as string }; } @@ -3597,7 +3607,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -3631,12 +3641,12 @@ export class Databases { * @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.key - Attribute Key. * @param {boolean} params.required - Is attribute required? - * @param {any[]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. + * @param {any[][]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPolygonColumn` instead. */ - createPolygonAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] }): Promise; + createPolygonAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][] }): Promise; /** * Create a geometric polygon attribute. * @@ -3644,27 +3654,27 @@ export class Databases { * @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} key - Attribute Key. * @param {boolean} required - Is attribute required? - * @param {any[]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. + * @param {any[][]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createPolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise; + createPolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][]): Promise; createPolygonAttribute( - paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?] + paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][] } | string, + ...rest: [(string)?, (string)?, (boolean)?, (any[][])?] ): Promise { - let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] }; + let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][] }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[] }; + params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][] }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[] + xdefault: rest[3] as any[][] }; } @@ -3687,7 +3697,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -3721,13 +3731,13 @@ export class Databases { * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @param {string} params.key - Attribute Key. * @param {boolean} params.required - Is attribute required? - * @param {any[]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. + * @param {any[][]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. * @param {string} params.newKey - New attribute key. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePolygonColumn` instead. */ - updatePolygonAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }): Promise; + updatePolygonAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }): Promise; /** * Update a polygon attribute. Changing the `default` value will not update already existing documents. * @@ -3735,28 +3745,28 @@ export class Databases { * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). * @param {string} key - Attribute Key. * @param {boolean} required - Is attribute required? - * @param {any[]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. + * @param {any[][]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. * @param {string} newKey - New attribute key. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise; + updatePolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string): Promise; updatePolygonAttribute( - paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?, (string)?] + paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string } | string, + ...rest: [(string)?, (string)?, (boolean)?, (any[][])?, (string)?] ): Promise { - let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }; } else { params = { databaseId: paramsOrFirst as string, collectionId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[], + xdefault: rest[3] as any[][], newKey: rest[4] as string }; } @@ -3781,7 +3791,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -3885,7 +3895,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "type"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof relatedCollectionId !== 'undefined') { payload['relatedCollectionId'] = relatedCollectionId; @@ -3983,7 +3993,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "key"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof onDelete !== 'undefined') { payload['onDelete'] = onDelete; @@ -4087,7 +4097,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -4199,7 +4209,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -4242,6 +4252,7 @@ export class Databases { * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTextColumn` instead. */ createTextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise; /** @@ -4301,7 +4312,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -4346,6 +4357,7 @@ export class Databases { * @param {string} params.newKey - New Attribute Key. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTextColumn` instead. */ updateTextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string }): Promise; /** @@ -4405,7 +4417,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -4501,7 +4513,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -4603,7 +4615,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -4644,6 +4656,7 @@ export class Databases { * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createVarcharColumn` instead. */ createVarcharAttribute(params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise; /** @@ -4709,7 +4722,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -4758,6 +4771,7 @@ export class Databases { * @param {string} params.newKey - New Attribute Key. * @throws {AppwriteException} * @returns {Promise} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateVarcharColumn` instead. */ updateVarcharAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string }): Promise; /** @@ -4820,7 +4834,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -4902,7 +4916,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "key"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -4971,7 +4985,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "key"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -5049,7 +5063,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "collectionId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', 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; @@ -5145,7 +5159,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "data"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', 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; @@ -5231,7 +5245,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "documents"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof documents !== 'undefined') { payload['documents'] = documents; @@ -5313,7 +5327,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "documents"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof documents !== 'undefined') { payload['documents'] = documents; @@ -5394,7 +5408,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "collectionId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof data !== 'undefined') { payload['data'] = data; @@ -5474,7 +5488,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "collectionId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', 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; @@ -5558,7 +5572,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "documentId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', 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; @@ -5645,7 +5659,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "documentId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', 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; @@ -5736,7 +5750,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "documentId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', 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; @@ -5819,7 +5833,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "documentId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', 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; @@ -5910,7 +5924,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "attribute"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', 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; @@ -6008,7 +6022,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "attribute"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', 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; @@ -6088,7 +6102,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "collectionId"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -6187,7 +6201,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "attributes"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -6272,7 +6286,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "key"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -6341,7 +6355,7 @@ export class Databases { throw new AppwriteException('Missing required parameter: "key"'); } - const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key); + const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/functions.ts b/src/services/functions.ts index 1a0fb93..9957381 100644 --- a/src/services/functions.ts +++ b/src/services/functions.ts @@ -99,7 +99,7 @@ export class Functions { * @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster. * @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory". * @param {string} params.commands - Build Commands. - * @param {ProjectKeyScopes[]} params.scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed. + * @param {ProjectKeyScopes[]} params.scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 200 scopes are allowed. * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment. * @param {string} params.providerRepositoryId - Repository ID of the repo linked to the function. * @param {string} params.providerBranch - Production branch for the repo linked to the function. @@ -128,7 +128,7 @@ export class Functions { * @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster. * @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory". * @param {string} commands - Build Commands. - * @param {ProjectKeyScopes[]} scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed. + * @param {ProjectKeyScopes[]} scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 200 scopes are allowed. * @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment. * @param {string} providerRepositoryId - Repository ID of the repo linked to the function. * @param {string} providerBranch - Production branch for the repo linked to the function. @@ -324,13 +324,41 @@ export class Functions { /** * List allowed function specifications for this instance. * + * @param {string} params.type - Specification type to list. Can be one of: runtimes, builds. * @throws {AppwriteException} * @returns {Promise} */ - listSpecifications(): Promise { + listSpecifications(params?: { type?: string }): Promise; + /** + * List allowed function specifications for this instance. + * + * @param {string} type - Specification type to list. Can be one of: runtimes, builds. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listSpecifications(type?: string): Promise; + listSpecifications( + paramsOrFirst?: { type?: string } | string + ): Promise { + let params: { type?: string }; + + if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + params = (paramsOrFirst || {}) as { type?: string }; + } else { + params = { + type: paramsOrFirst as string + }; + } + + const type = params.type; + const apiPath = '/functions/specifications'; const payload: Payload = {}; + if (typeof type !== 'undefined') { + payload['type'] = type; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -382,7 +410,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "functionId"'); } - const apiPath = '/functions/{functionId}'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -413,7 +441,7 @@ export class Functions { * @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster. * @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory". * @param {string} params.commands - Build Commands. - * @param {ProjectKeyScopes[]} params.scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed. + * @param {ProjectKeyScopes[]} params.scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 200 scopes are allowed. * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Controle System) deployment. * @param {string} params.providerRepositoryId - Repository ID of the repo linked to the function * @param {string} params.providerBranch - Production branch for the repo linked to the function @@ -442,7 +470,7 @@ export class Functions { * @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster. * @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory". * @param {string} commands - Build Commands. - * @param {ProjectKeyScopes[]} scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed. + * @param {ProjectKeyScopes[]} scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 200 scopes are allowed. * @param {string} installationId - Appwrite Installation ID for VCS (Version Controle System) deployment. * @param {string} providerRepositoryId - Repository ID of the repo linked to the function * @param {string} providerBranch - Production branch for the repo linked to the function @@ -523,7 +551,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "name"'); } - const apiPath = '/functions/{functionId}'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -640,7 +668,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "functionId"'); } - const apiPath = '/functions/{functionId}'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -701,7 +729,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/functions/{functionId}/deployment'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}/deployment'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof deploymentId !== 'undefined') { payload['deploymentId'] = deploymentId; @@ -771,7 +799,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "functionId"'); } - const apiPath = '/functions/{functionId}/deployments'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}/deployments'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -867,7 +895,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "activate"'); } - const apiPath = '/functions/{functionId}/deployments'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}/deployments'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof entrypoint !== 'undefined') { payload['entrypoint'] = entrypoint; @@ -946,7 +974,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/functions/{functionId}/deployments/duplicate'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}/deployments/duplicate'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof deploymentId !== 'undefined') { payload['deploymentId'] = deploymentId; @@ -1050,7 +1078,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "reference"'); } - const apiPath = '/functions/{functionId}/deployments/template'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}/deployments/template'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof repository !== 'undefined') { payload['repository'] = repository; @@ -1145,7 +1173,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "reference"'); } - const apiPath = '/functions/{functionId}/deployments/vcs'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}/deployments/vcs'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof type !== 'undefined') { payload['type'] = type; @@ -1216,7 +1244,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId); + const apiPath = '/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}', encodeURIComponent(String(functionId))).replace('{deploymentId}', encodeURIComponent(String(deploymentId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1277,7 +1305,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId); + const apiPath = '/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}', encodeURIComponent(String(functionId))).replace('{deploymentId}', encodeURIComponent(String(deploymentId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1300,40 +1328,44 @@ export class Functions { * @param {string} params.functionId - Function ID. * @param {string} params.deploymentId - Deployment ID. * @param {DeploymentDownloadType} params.type - Deployment file to download. Can be: "source", "output". + * @param {string} params.token - Presigned source-download token for accessing this deployment without a session (jobs-service). * @throws {AppwriteException} * @returns {Promise} */ - getDeploymentDownload(params: { functionId: string, deploymentId: string, type?: DeploymentDownloadType }): Promise; + getDeploymentDownload(params: { functionId: string, deploymentId: string, type?: DeploymentDownloadType, token?: string }): Promise; /** * Get a function deployment 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. * * @param {string} functionId - Function ID. * @param {string} deploymentId - Deployment ID. * @param {DeploymentDownloadType} type - Deployment file to download. Can be: "source", "output". + * @param {string} token - Presigned source-download token for accessing this deployment without a session (jobs-service). * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - getDeploymentDownload(functionId: string, deploymentId: string, type?: DeploymentDownloadType): Promise; + getDeploymentDownload(functionId: string, deploymentId: string, type?: DeploymentDownloadType, token?: string): Promise; getDeploymentDownload( - paramsOrFirst: { functionId: string, deploymentId: string, type?: DeploymentDownloadType } | string, - ...rest: [(string)?, (DeploymentDownloadType)?] + paramsOrFirst: { functionId: string, deploymentId: string, type?: DeploymentDownloadType, token?: string } | string, + ...rest: [(string)?, (DeploymentDownloadType)?, (string)?] ): Promise { - let params: { functionId: string, deploymentId: string, type?: DeploymentDownloadType }; + let params: { functionId: string, deploymentId: string, type?: DeploymentDownloadType, token?: string }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string, type?: DeploymentDownloadType }; + params = (paramsOrFirst || {}) as { functionId: string, deploymentId: string, type?: DeploymentDownloadType, token?: string }; } else { params = { functionId: paramsOrFirst as string, deploymentId: rest[0] as string, - type: rest[1] as DeploymentDownloadType + type: rest[1] as DeploymentDownloadType, + token: rest[2] as string }; } const functionId = params.functionId; const deploymentId = params.deploymentId; const type = params.type; + const token = params.token; if (typeof functionId === 'undefined') { throw new AppwriteException('Missing required parameter: "functionId"'); @@ -1342,11 +1374,14 @@ export class Functions { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/functions/{functionId}/deployments/{deploymentId}/download'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId); + const apiPath = '/functions/{functionId}/deployments/{deploymentId}/download'.replace('{functionId}', encodeURIComponent(String(functionId))).replace('{deploymentId}', encodeURIComponent(String(deploymentId))); const payload: Payload = {}; if (typeof type !== 'undefined') { payload['type'] = type; } + if (typeof token !== 'undefined') { + payload['token'] = token; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1407,7 +1442,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/functions/{functionId}/deployments/{deploymentId}/status'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId); + const apiPath = '/functions/{functionId}/deployments/{deploymentId}/status'.replace('{functionId}', encodeURIComponent(String(functionId))).replace('{deploymentId}', encodeURIComponent(String(deploymentId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1470,7 +1505,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "functionId"'); } - const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -1554,7 +1589,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "functionId"'); } - const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof body !== 'undefined') { payload['body'] = body; @@ -1634,7 +1669,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "executionId"'); } - const apiPath = '/functions/{functionId}/executions/{executionId}'.replace('{functionId}', functionId).replace('{executionId}', 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); @@ -1695,7 +1730,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "executionId"'); } - const apiPath = '/functions/{functionId}/executions/{executionId}'.replace('{functionId}', functionId).replace('{executionId}', 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); @@ -1757,7 +1792,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "functionId"'); } - const apiPath = '/functions/{functionId}/variables'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}/variables'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -1842,7 +1877,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "value"'); } - const apiPath = '/functions/{functionId}/variables'.replace('{functionId}', functionId); + const apiPath = '/functions/{functionId}/variables'.replace('{functionId}', encodeURIComponent(String(functionId))); const payload: Payload = {}; if (typeof variableId !== 'undefined') { payload['variableId'] = variableId; @@ -1916,7 +1951,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "variableId"'); } - const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', functionId).replace('{variableId}', variableId); + const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', encodeURIComponent(String(functionId))).replace('{variableId}', encodeURIComponent(String(variableId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1989,7 +2024,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "variableId"'); } - const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', functionId).replace('{variableId}', variableId); + const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', encodeURIComponent(String(functionId))).replace('{variableId}', encodeURIComponent(String(variableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2060,7 +2095,7 @@ export class Functions { throw new AppwriteException('Missing required parameter: "variableId"'); } - const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', functionId).replace('{variableId}', variableId); + const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', encodeURIComponent(String(functionId))).replace('{variableId}', encodeURIComponent(String(variableId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/health.ts b/src/services/health.ts deleted file mode 100644 index 6b8ceda..0000000 --- a/src/services/health.ts +++ /dev/null @@ -1,1117 +0,0 @@ -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; -import type { Models } from '../models'; - - -import { HealthQueueName } from '../enums/health-queue-name'; - -export class Health { - client: Client; - - constructor(client: Client) { - this.client = client; - } - - /** - * Check the Appwrite HTTP server is up and responsive. - * - * @throws {AppwriteException} - * @returns {Promise} - */ - get(): Promise { - - const apiPath = '/health'; - 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, - ); - } - - /** - * Check the Appwrite Antivirus server is up and connection is successful. - * - * @throws {AppwriteException} - * @returns {Promise} - */ - getAntivirus(): Promise { - - const apiPath = '/health/anti-virus'; - 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, - ); - } - - /** - * Check the database that backs the audit and activity store. When the connection is reachable the endpoint returns a passing status with its response time. - * - * - * @throws {AppwriteException} - * @returns {Promise} - */ - getAuditsDB(): Promise { - - const apiPath = '/health/audits-db'; - 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, - ); - } - - /** - * Check the Appwrite in-memory cache servers are up and connection is successful. - * - * @throws {AppwriteException} - * @returns {Promise} - */ - getCache(): Promise { - - const apiPath = '/health/cache'; - 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 the SSL certificate for a domain - * - * @param {string} params.domain - string - * @throws {AppwriteException} - * @returns {Promise} - */ - getCertificate(params?: { domain?: string }): Promise; - /** - * Get the SSL certificate for a domain - * - * @param {string} domain - string - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getCertificate(domain?: string): Promise; - getCertificate( - paramsOrFirst?: { domain?: string } | string - ): Promise { - let params: { domain?: string }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { domain?: string }; - } else { - params = { - domain: paramsOrFirst as string - }; - } - - const domain = params.domain; - - - const apiPath = '/health/certificate'; - const payload: Payload = {}; - if (typeof domain !== 'undefined') { - payload['domain'] = domain; - } - 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 console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking. - * - * - * @param {number} params.threshold - Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10. - * @param {number} params.inactivityDays - Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7. - * @throws {AppwriteException} - * @returns {Promise} - */ - getConsolePausing(params?: { threshold?: number, inactivityDays?: number }): Promise; - /** - * Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking. - * - * - * @param {number} threshold - Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10. - * @param {number} inactivityDays - Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getConsolePausing(threshold?: number, inactivityDays?: number): Promise; - getConsolePausing( - paramsOrFirst?: { threshold?: number, inactivityDays?: number } | number, - ...rest: [(number)?] - ): Promise { - let params: { threshold?: number, inactivityDays?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number, inactivityDays?: number }; - } else { - params = { - threshold: paramsOrFirst as number, - inactivityDays: rest[0] as number - }; - } - - const threshold = params.threshold; - const inactivityDays = params.inactivityDays; - - - const apiPath = '/health/console-pausing'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - if (typeof inactivityDays !== 'undefined') { - payload['inactivityDays'] = inactivityDays; - } - 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, - ); - } - - /** - * Check the Appwrite database servers are up and connection is successful. - * - * @throws {AppwriteException} - * @returns {Promise} - */ - getDB(): Promise { - - const apiPath = '/health/db'; - 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, - ); - } - - /** - * Check the Appwrite pub-sub servers are up and connection is successful. - * - * @throws {AppwriteException} - * @returns {Promise} - */ - getPubSub(): Promise { - - const apiPath = '/health/pubsub'; - 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 the number of audit logs that are waiting to be processed in the Appwrite internal queue server. - * - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueAudits(params?: { threshold?: number }): Promise; - /** - * Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server. - * - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueAudits(threshold?: number): Promise; - getQueueAudits( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/audits'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of builds that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueBuilds(params?: { threshold?: number }): Promise; - /** - * Get the number of builds that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueBuilds(threshold?: number): Promise; - getQueueBuilds( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/builds'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueCertificates(params?: { threshold?: number }): Promise; - /** - * Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueCertificates(threshold?: number): Promise; - getQueueCertificates( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/certificates'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of database changes that are waiting to be processed in the Appwrite internal queue server. - * - * @param {string} params.name - Queue name for which to check the queue size - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueDatabases(params?: { name?: string, threshold?: number }): Promise; - /** - * Get the number of database changes that are waiting to be processed in the Appwrite internal queue server. - * - * @param {string} name - Queue name for which to check the queue size - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueDatabases(name?: string, threshold?: number): Promise; - getQueueDatabases( - paramsOrFirst?: { name?: string, threshold?: number } | string, - ...rest: [(number)?] - ): Promise { - let params: { name?: string, threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { name?: string, threshold?: number }; - } else { - params = { - name: paramsOrFirst as string, - threshold: rest[0] as number - }; - } - - const name = params.name; - const threshold = params.threshold; - - - const apiPath = '/health/queue/databases'; - const payload: Payload = {}; - if (typeof name !== 'undefined') { - payload['name'] = name; - } - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueDeletes(params?: { threshold?: number }): Promise; - /** - * Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueDeletes(threshold?: number): Promise; - getQueueDeletes( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/deletes'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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, - ); - } - - /** - * Returns the amount of failed jobs in a given queue. - * - * - * @param {HealthQueueName} params.name - The name of the queue - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getFailedJobs(params: { name: HealthQueueName, threshold?: number }): Promise; - /** - * Returns the amount of failed jobs in a given queue. - * - * - * @param {HealthQueueName} name - The name of the queue - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getFailedJobs(name: HealthQueueName, threshold?: number): Promise; - getFailedJobs( - paramsOrFirst: { name: HealthQueueName, threshold?: number } | HealthQueueName, - ...rest: [(number)?] - ): Promise { - let params: { name: HealthQueueName, threshold?: number }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('name' in paramsOrFirst || 'threshold' in paramsOrFirst))) { - params = (paramsOrFirst || {}) as { name: HealthQueueName, threshold?: number }; - } else { - params = { - name: paramsOrFirst as HealthQueueName, - threshold: rest[0] as number - }; - } - - const name = params.name; - const threshold = params.threshold; - - if (typeof name === 'undefined') { - throw new AppwriteException('Missing required parameter: "name"'); - } - - const apiPath = '/health/queue/failed/{name}'.replace('{name}', name); - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of function executions that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueFunctions(params?: { threshold?: number }): Promise; - /** - * Get the number of function executions that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueFunctions(threshold?: number): Promise; - getQueueFunctions( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/functions'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of logs that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueLogs(params?: { threshold?: number }): Promise; - /** - * Get the number of logs that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueLogs(threshold?: number): Promise; - getQueueLogs( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/logs'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of mails that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueMails(params?: { threshold?: number }): Promise; - /** - * Get the number of mails that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueMails(threshold?: number): Promise; - getQueueMails( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/mails'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of messages that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueMessaging(params?: { threshold?: number }): Promise; - /** - * Get the number of messages that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueMessaging(threshold?: number): Promise; - getQueueMessaging( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/messaging'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of migrations that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueMigrations(params?: { threshold?: number }): Promise; - /** - * Get the number of migrations that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueMigrations(threshold?: number): Promise; - getQueueMigrations( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/migrations'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of metrics that are waiting to be processed in the Appwrite stats resources queue. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueStatsResources(params?: { threshold?: number }): Promise; - /** - * Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueStatsResources(threshold?: number): Promise; - getQueueStatsResources( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/stats-resources'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of metrics that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueUsage(params?: { threshold?: number }): Promise; - /** - * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueUsage(threshold?: number): Promise; - getQueueUsage( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/stats-usage'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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 the number of webhooks that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - */ - getQueueWebhooks(params?: { threshold?: number }): Promise; - /** - * Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server. - * - * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. - * @throws {AppwriteException} - * @returns {Promise} - * @deprecated Use the object parameter style method for a better developer experience. - */ - getQueueWebhooks(threshold?: number): Promise; - getQueueWebhooks( - paramsOrFirst?: { threshold?: number } | number - ): Promise { - let params: { threshold?: number }; - - if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { threshold?: number }; - } else { - params = { - threshold: paramsOrFirst as number - }; - } - - const threshold = params.threshold; - - - const apiPath = '/health/queue/webhooks'; - const payload: Payload = {}; - if (typeof threshold !== 'undefined') { - payload['threshold'] = threshold; - } - 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, - ); - } - - /** - * Check the Appwrite storage device is up and connection is successful. - * - * @throws {AppwriteException} - * @returns {Promise} - */ - getStorage(): Promise { - - const apiPath = '/health/storage'; - 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, - ); - } - - /** - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws {AppwriteException} - * @returns {Promise} - */ - getStorageLocal(): Promise { - - const apiPath = '/health/storage/local'; - 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, - ); - } - - /** - * Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP. - * - * @throws {AppwriteException} - * @returns {Promise} - */ - getTime(): Promise { - - const apiPath = '/health/time'; - 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, - ); - } -} diff --git a/src/services/messaging.ts b/src/services/messaging.ts index a1c719a..95646cc 100644 --- a/src/services/messaging.ts +++ b/src/services/messaging.ts @@ -304,7 +304,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "messageId"'); } - const apiPath = '/messaging/messages/email/{messageId}'.replace('{messageId}', messageId); + const apiPath = '/messaging/messages/email/{messageId}'.replace('{messageId}', encodeURIComponent(String(messageId))); const payload: Payload = {}; if (typeof topics !== 'undefined') { payload['topics'] = topics; @@ -650,7 +650,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "messageId"'); } - const apiPath = '/messaging/messages/push/{messageId}'.replace('{messageId}', messageId); + const apiPath = '/messaging/messages/push/{messageId}'.replace('{messageId}', encodeURIComponent(String(messageId))); const payload: Payload = {}; if (typeof topics !== 'undefined') { payload['topics'] = topics; @@ -993,7 +993,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "messageId"'); } - const apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', messageId); + const apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', encodeURIComponent(String(messageId))); const payload: Payload = {}; if (typeof topics !== 'undefined') { payload['topics'] = topics; @@ -1092,7 +1092,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "messageId"'); } - const apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', messageId); + const apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', encodeURIComponent(String(messageId))); const payload: Payload = {}; if (typeof topics !== 'undefined') { payload['topics'] = topics; @@ -1166,7 +1166,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "messageId"'); } - const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId); + const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', encodeURIComponent(String(messageId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1219,7 +1219,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "messageId"'); } - const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId); + const apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', encodeURIComponent(String(messageId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1236,74 +1236,6 @@ export class Messaging { ); } - /** - * Get the message activity logs listed by its unique ID. - * - * @param {string} params.messageId - Message 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). 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} - */ - listMessageLogs(params: { messageId: string, queries?: string[], total?: boolean }): Promise; - /** - * Get the message activity logs listed by its unique ID. - * - * @param {string} messageId - Message 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). 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. - */ - listMessageLogs(messageId: string, queries?: string[], total?: boolean): Promise; - listMessageLogs( - paramsOrFirst: { messageId: string, queries?: string[], total?: boolean } | string, - ...rest: [(string[])?, (boolean)?] - ): Promise { - let params: { messageId: string, queries?: string[], total?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { messageId: string, queries?: string[], total?: boolean }; - } else { - params = { - messageId: paramsOrFirst as string, - queries: rest[0] as string[], - total: rest[1] as boolean - }; - } - - const messageId = params.messageId; - const queries = params.queries; - const total = params.total; - - if (typeof messageId === 'undefined') { - throw new AppwriteException('Missing required parameter: "messageId"'); - } - - const apiPath = '/messaging/messages/{messageId}/logs'.replace('{messageId}', messageId); - 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 list of the targets associated with a message. * @@ -1349,7 +1281,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "messageId"'); } - const apiPath = '/messaging/messages/{messageId}/targets'.replace('{messageId}', messageId); + const apiPath = '/messaging/messages/{messageId}/targets'.replace('{messageId}', encodeURIComponent(String(messageId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -1727,7 +1659,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -1831,7 +1763,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -2085,7 +2017,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -2161,7 +2093,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -2385,7 +2317,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/mailgun/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/mailgun/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -2583,7 +2515,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -2791,7 +2723,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/resend/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/resend/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -3005,7 +2937,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -3241,7 +3173,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/ses/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/ses/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -3687,7 +3619,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -3833,7 +3765,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -4043,7 +3975,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/telesign/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/telesign/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -4229,7 +4161,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/textmagic/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/textmagic/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -4415,7 +4347,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/twilio/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/twilio/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -4601,7 +4533,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/vonage/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/vonage/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -4672,7 +4604,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -4725,7 +4657,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -4742,142 +4674,6 @@ export class Messaging { ); } - /** - * Get the provider activity logs listed by its unique ID. - * - * @param {string} params.providerId - Provider 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). 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} - */ - listProviderLogs(params: { providerId: string, queries?: string[], total?: boolean }): Promise; - /** - * Get the provider activity logs listed by its unique ID. - * - * @param {string} providerId - Provider 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). 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. - */ - listProviderLogs(providerId: string, queries?: string[], total?: boolean): Promise; - listProviderLogs( - paramsOrFirst: { providerId: string, queries?: string[], total?: boolean } | string, - ...rest: [(string[])?, (boolean)?] - ): Promise { - let params: { providerId: string, queries?: string[], total?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { providerId: string, queries?: string[], total?: boolean }; - } else { - params = { - providerId: paramsOrFirst as string, - queries: rest[0] as string[], - total: rest[1] as boolean - }; - } - - const providerId = params.providerId; - const queries = params.queries; - const total = params.total; - - if (typeof providerId === 'undefined') { - throw new AppwriteException('Missing required parameter: "providerId"'); - } - - const apiPath = '/messaging/providers/{providerId}/logs'.replace('{providerId}', providerId); - 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 the subscriber activity logs listed by its unique ID. - * - * @param {string} params.subscriberId - Subscriber 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). 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} - */ - listSubscriberLogs(params: { subscriberId: string, queries?: string[], total?: boolean }): Promise; - /** - * Get the subscriber activity logs listed by its unique ID. - * - * @param {string} subscriberId - Subscriber 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). 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. - */ - listSubscriberLogs(subscriberId: string, queries?: string[], total?: boolean): Promise; - listSubscriberLogs( - paramsOrFirst: { subscriberId: string, queries?: string[], total?: boolean } | string, - ...rest: [(string[])?, (boolean)?] - ): Promise { - let params: { subscriberId: string, queries?: string[], total?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { subscriberId: string, queries?: string[], total?: boolean }; - } else { - params = { - subscriberId: paramsOrFirst as string, - queries: rest[0] as string[], - total: rest[1] as boolean - }; - } - - const subscriberId = params.subscriberId; - const queries = params.queries; - const total = params.total; - - if (typeof subscriberId === 'undefined') { - throw new AppwriteException('Missing required parameter: "subscriberId"'); - } - - const apiPath = '/messaging/subscribers/{subscriberId}/logs'.replace('{subscriberId}', subscriberId); - 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 list of all topics from the current Appwrite project. * @@ -5059,7 +4855,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "topicId"'); } - const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId); + const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', encodeURIComponent(String(topicId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -5123,7 +4919,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "topicId"'); } - const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId); + const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', encodeURIComponent(String(topicId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -5183,7 +4979,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "topicId"'); } - const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId); + const apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', encodeURIComponent(String(topicId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -5200,74 +4996,6 @@ export class Messaging { ); } - /** - * Get the topic activity logs listed by its unique ID. - * - * @param {string} params.topicId - Topic 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). 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} - */ - listTopicLogs(params: { topicId: string, queries?: string[], total?: boolean }): Promise; - /** - * Get the topic activity logs listed by its unique ID. - * - * @param {string} topicId - Topic 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). 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. - */ - listTopicLogs(topicId: string, queries?: string[], total?: boolean): Promise; - listTopicLogs( - paramsOrFirst: { topicId: string, queries?: string[], total?: boolean } | string, - ...rest: [(string[])?, (boolean)?] - ): Promise { - let params: { topicId: string, queries?: string[], total?: boolean }; - - if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { topicId: string, queries?: string[], total?: boolean }; - } else { - params = { - topicId: paramsOrFirst as string, - queries: rest[0] as string[], - total: rest[1] as boolean - }; - } - - const topicId = params.topicId; - const queries = params.queries; - const total = params.total; - - if (typeof topicId === 'undefined') { - throw new AppwriteException('Missing required parameter: "topicId"'); - } - - const apiPath = '/messaging/topics/{topicId}/logs'.replace('{topicId}', topicId); - 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 list of all subscribers from the current Appwrite project. * @@ -5317,7 +5045,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "topicId"'); } - const apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId); + const apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', encodeURIComponent(String(topicId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -5394,7 +5122,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "targetId"'); } - const apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId); + const apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', encodeURIComponent(String(topicId))); const payload: Payload = {}; if (typeof subscriberId !== 'undefined') { payload['subscriberId'] = subscriberId; @@ -5464,7 +5192,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "subscriberId"'); } - const apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', 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); @@ -5525,7 +5253,7 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "subscriberId"'); } - const apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', 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); diff --git a/src/services/organization.ts b/src/services/organization.ts index c28cc7b..83d4977 100644 --- a/src/services/organization.ts +++ b/src/services/organization.ts @@ -12,6 +12,113 @@ export class Organization { this.client = client; } + /** + * Get the current organization. + * + * @throws {AppwriteException} + * @returns {Promise>} + */ + get(): Promise> { + + const apiPath = '/organization'; + 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 the current organization's name. + * + * @param {string} params.name - New organization name. Max length: 128 chars. + * @throws {AppwriteException} + * @returns {Promise>} + */ + update(params: { name: string }): Promise>; + /** + * Update the current organization's name. + * + * @param {string} name - New organization name. Max length: 128 chars. + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + update(name: string): Promise>; + update( + paramsOrFirst: { name: string } | string + ): Promise> { + let params: { name: string }; + + if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + params = (paramsOrFirst || {}) as { name: string }; + } else { + params = { + name: paramsOrFirst as string + }; + } + + const name = params.name; + + if (typeof name === 'undefined') { + throw new AppwriteException('Missing required parameter: "name"'); + } + + const apiPath = '/organization'; + const payload: Payload = {}; + 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( + 'put', + uri, + apiHeaders, + payload, + ); + } + + /** + * Delete the current organization. All projects that belong to the organization are deleted as well. + * + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + delete(): Promise<{}> { + + const apiPath = '/organization'; + 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, + ); + } + /** * Get a list of all API keys from the current organization. * @@ -78,7 +185,7 @@ export class Organization { * * @param {string} params.keyId - Key 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 - Key name. Max length: 128 chars. - * @param {OrganizationKeyScopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed. + * @param {OrganizationKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. * @throws {AppwriteException} * @returns {Promise} @@ -89,7 +196,7 @@ export class Organization { * * @param {string} keyId - Key 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 - Key name. Max length: 128 chars. - * @param {OrganizationKeyScopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed. + * @param {OrganizationKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. * @throws {AppwriteException} * @returns {Promise} @@ -194,7 +301,7 @@ export class Organization { throw new AppwriteException('Missing required parameter: "keyId"'); } - const apiPath = '/organization/keys/{keyId}'.replace('{keyId}', keyId); + const apiPath = '/organization/keys/{keyId}'.replace('{keyId}', encodeURIComponent(String(keyId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -216,7 +323,7 @@ export class Organization { * * @param {string} params.keyId - Key unique ID. * @param {string} params.name - Key name. Max length: 128 chars. - * @param {OrganizationKeyScopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed. + * @param {OrganizationKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. * @throws {AppwriteException} * @returns {Promise} @@ -227,7 +334,7 @@ export class Organization { * * @param {string} keyId - Key unique ID. * @param {string} name - Key name. Max length: 128 chars. - * @param {OrganizationKeyScopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed. + * @param {OrganizationKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. * @throws {AppwriteException} * @returns {Promise} @@ -266,7 +373,7 @@ export class Organization { throw new AppwriteException('Missing required parameter: "scopes"'); } - const apiPath = '/organization/keys/{keyId}'.replace('{keyId}', keyId); + const apiPath = '/organization/keys/{keyId}'.replace('{keyId}', encodeURIComponent(String(keyId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -329,7 +436,339 @@ export class Organization { throw new AppwriteException('Missing required parameter: "keyId"'); } - const apiPath = '/organization/keys/{keyId}'.replace('{keyId}', keyId); + const apiPath = '/organization/keys/{keyId}'.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', + } + + return this.client.call( + 'delete', + uri, + apiHeaders, + payload, + ); + } + + /** + * Get a list of all memberships from the current organization. + * + * @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: userId, teamId, invited, joined, confirm, roles + * @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} + */ + listMemberships(params?: { queries?: string[], search?: string, total?: boolean }): Promise; + /** + * Get a list of all memberships from the current organization. + * + * @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: userId, teamId, invited, joined, confirm, roles + * @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. + */ + listMemberships(queries?: string[], search?: string, total?: boolean): Promise; + listMemberships( + 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 }; + } else { + params = { + queries: paramsOrFirst as string[], + search: rest[0] as string, + total: rest[1] as boolean + }; + } + + const queries = params.queries; + const search = params.search; + const total = params.total; + + + const apiPath = '/organization/memberships'; + const payload: Payload = {}; + if (typeof queries !== 'undefined') { + payload['queries'] = queries; + } + if (typeof search !== 'undefined') { + payload['search'] = search; + } + 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, + ); + } + + /** + * Invite a new member to join the current organization. An email with a link to join the organization will be sent to the new member's email address. If member doesn't exist in the project it will be automatically created. + * + * @param {string[]} params.roles - Array of strings. Use this param to set the user roles in the organization. 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. + * @param {string} params.email - Email of the new organization member. + * @param {string} params.userId - ID of the user to be added to the organization. + * @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. + * @param {string} params.url - URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. + * @param {string} params.name - Name of the new organization member. Max length: 128 chars. + * @throws {AppwriteException} + * @returns {Promise} + */ + createMembership(params: { roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string }): Promise; + /** + * Invite a new member to join the current organization. An email with a link to join the organization will be sent to the new member's email address. If member doesn't exist in the project it will be automatically created. + * + * @param {string[]} roles - Array of strings. Use this param to set the user roles in the organization. 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. + * @param {string} email - Email of the new organization member. + * @param {string} userId - ID of the user to be added to the organization. + * @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. + * @param {string} url - URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. + * @param {string} name - Name of the new organization member. Max length: 128 chars. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createMembership(roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise; + createMembership( + paramsOrFirst: { roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string } | string[], + ...rest: [(string)?, (string)?, (string)?, (string)?, (string)?] + ): Promise { + let params: { roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string }; + + if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + params = (paramsOrFirst || {}) as { roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string }; + } else { + params = { + roles: paramsOrFirst as string[], + email: rest[0] as string, + userId: rest[1] as string, + phone: rest[2] as string, + url: rest[3] as string, + name: rest[4] as string + }; + } + + const roles = params.roles; + const email = params.email; + const userId = params.userId; + const phone = params.phone; + const url = params.url; + const name = params.name; + + if (typeof roles === 'undefined') { + throw new AppwriteException('Missing required parameter: "roles"'); + } + + const apiPath = '/organization/memberships'; + const payload: Payload = {}; + if (typeof email !== 'undefined') { + payload['email'] = email; + } + if (typeof userId !== 'undefined') { + payload['userId'] = userId; + } + if (typeof phone !== 'undefined') { + payload['phone'] = phone; + } + if (typeof roles !== 'undefined') { + payload['roles'] = roles; + } + if (typeof url !== 'undefined') { + payload['url'] = url; + } + 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, + ); + } + + /** + * Get a membership from the current organization by its unique ID. + * + * @param {string} params.membershipId - Membership ID. + * @throws {AppwriteException} + * @returns {Promise} + */ + getMembership(params: { membershipId: string }): Promise; + /** + * Get a membership from the current organization by its unique ID. + * + * @param {string} membershipId - Membership ID. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + getMembership(membershipId: string): Promise; + getMembership( + paramsOrFirst: { membershipId: string } | string + ): Promise { + let params: { membershipId: string }; + + if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + params = (paramsOrFirst || {}) as { membershipId: string }; + } else { + params = { + membershipId: paramsOrFirst as string + }; + } + + const membershipId = params.membershipId; + + if (typeof membershipId === 'undefined') { + throw new AppwriteException('Missing required parameter: "membershipId"'); + } + + const apiPath = '/organization/memberships/{membershipId}'.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', + } + + return this.client.call( + 'get', + uri, + apiHeaders, + payload, + ); + } + + /** + * Modify the roles of a member in the current organization. + * + * @param {string} params.membershipId - Membership ID. + * @param {string[]} params.roles - An array of strings. Use this param to set the user's roles in the organization. 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. + * @throws {AppwriteException} + * @returns {Promise} + */ + updateMembership(params: { membershipId: string, roles: string[] }): Promise; + /** + * Modify the roles of a member in the current organization. + * + * @param {string} membershipId - Membership ID. + * @param {string[]} roles - An array of strings. Use this param to set the user's roles in the organization. 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. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateMembership(membershipId: string, roles: string[]): Promise; + updateMembership( + paramsOrFirst: { membershipId: string, roles: string[] } | string, + ...rest: [(string[])?] + ): Promise { + let params: { membershipId: string, roles: string[] }; + + if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + params = (paramsOrFirst || {}) as { membershipId: string, roles: string[] }; + } else { + params = { + membershipId: paramsOrFirst as string, + roles: rest[0] as string[] + }; + } + + const membershipId = params.membershipId; + const roles = params.roles; + + if (typeof membershipId === 'undefined') { + throw new AppwriteException('Missing required parameter: "membershipId"'); + } + if (typeof roles === 'undefined') { + throw new AppwriteException('Missing required parameter: "roles"'); + } + + const apiPath = '/organization/memberships/{membershipId}'.replace('{membershipId}', encodeURIComponent(String(membershipId))); + const payload: Payload = {}; + if (typeof roles !== 'undefined') { + payload['roles'] = roles; + } + 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, + ); + } + + /** + * Remove a member from the current organization. The member is removed whether they accepted the invitation or not; a pending invitation is revoked. + * + * @param {string} params.membershipId - Membership ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + deleteMembership(params: { membershipId: string }): Promise<{}>; + /** + * Remove a member from the current organization. The member is removed whether they accepted the invitation or not; a pending invitation is revoked. + * + * @param {string} membershipId - Membership ID. + * @throws {AppwriteException} + * @returns {Promise<{}>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + deleteMembership(membershipId: string): Promise<{}>; + deleteMembership( + paramsOrFirst: { membershipId: string } | string + ): Promise<{}> { + let params: { membershipId: string }; + + if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + params = (paramsOrFirst || {}) as { membershipId: string }; + } else { + params = { + membershipId: paramsOrFirst as string + }; + } + + const membershipId = params.membershipId; + + if (typeof membershipId === 'undefined') { + throw new AppwriteException('Missing required parameter: "membershipId"'); + } + + const apiPath = '/organization/memberships/{membershipId}'.replace('{membershipId}', encodeURIComponent(String(membershipId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -349,7 +788,7 @@ export class Organization { /** * Get a list of all projects. You can use the query params to filter your results. * - * @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, teamId, labels, search + * @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, teamId, labels, search, accessedAt * @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} @@ -359,7 +798,7 @@ export class Organization { /** * Get a list of all projects. You can use the query params to filter your results. * - * @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, teamId, labels, search + * @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, teamId, labels, search, accessedAt * @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} @@ -525,7 +964,7 @@ export class Organization { throw new AppwriteException('Missing required parameter: "projectId"'); } - const apiPath = '/organization/projects/{projectId}'.replace('{projectId}', projectId); + const apiPath = '/organization/projects/{projectId}'.replace('{projectId}', encodeURIComponent(String(projectId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -585,7 +1024,7 @@ export class Organization { throw new AppwriteException('Missing required parameter: "name"'); } - const apiPath = '/organization/projects/{projectId}'.replace('{projectId}', projectId); + const apiPath = '/organization/projects/{projectId}'.replace('{projectId}', encodeURIComponent(String(projectId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -642,7 +1081,7 @@ export class Organization { throw new AppwriteException('Missing required parameter: "projectId"'); } - const apiPath = '/organization/projects/{projectId}'.replace('{projectId}', projectId); + const apiPath = '/organization/projects/{projectId}'.replace('{projectId}', encodeURIComponent(String(projectId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/presences.ts b/src/services/presences.ts index 51fb984..d7e8af9 100644 --- a/src/services/presences.ts +++ b/src/services/presences.ts @@ -118,7 +118,7 @@ export class Presences { throw new AppwriteException('Missing required parameter: "presenceId"'); } - const apiPath = '/presences/{presenceId}'.replace('{presenceId}', presenceId); + const apiPath = '/presences/{presenceId}'.replace('{presenceId}', encodeURIComponent(String(presenceId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -200,7 +200,7 @@ export class Presences { throw new AppwriteException('Missing required parameter: "status"'); } - const apiPath = '/presences/{presenceId}'.replace('{presenceId}', presenceId); + const apiPath = '/presences/{presenceId}'.replace('{presenceId}', encodeURIComponent(String(presenceId))); const payload: Payload = {}; if (typeof userId !== 'undefined') { payload['userId'] = userId; @@ -299,7 +299,7 @@ export class Presences { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/presences/{presenceId}'.replace('{presenceId}', presenceId); + const apiPath = '/presences/{presenceId}'.replace('{presenceId}', encodeURIComponent(String(presenceId))); const payload: Payload = {}; if (typeof userId !== 'undefined') { payload['userId'] = userId; @@ -373,7 +373,7 @@ export class Presences { throw new AppwriteException('Missing required parameter: "presenceId"'); } - const apiPath = '/presences/{presenceId}'.replace('{presenceId}', presenceId); + const apiPath = '/presences/{presenceId}'.replace('{presenceId}', encodeURIComponent(String(presenceId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/project.ts b/src/services/project.ts index 45207af..1d79f2f 100644 --- a/src/services/project.ts +++ b/src/services/project.ts @@ -5,6 +5,7 @@ import type { Models } from '../models'; import { ProjectAuthMethodId } from '../enums/project-auth-method-id'; import { ProjectKeyScopes } from '../enums/project-key-scopes'; import { ProjectOAuth2GooglePrompt } from '../enums/project-o-auth-2-google-prompt'; +import { ProjectOAuth2OidcPrompt } from '../enums/project-o-auth-2-oidc-prompt'; import { ProjectOAuthProviderId } from '../enums/project-o-auth-provider-id'; import { ProjectPolicyId } from '../enums/project-policy-id'; import { ProjectProtocolId } from '../enums/project-protocol-id'; @@ -113,7 +114,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "enabled"'); } - const apiPath = '/project/auth-methods/{methodId}'.replace('{methodId}', methodId); + const apiPath = '/project/auth-methods/{methodId}'.replace('{methodId}', encodeURIComponent(String(methodId))); const payload: Payload = {}; if (typeof enabled !== 'undefined') { payload['enabled'] = enabled; @@ -202,7 +203,7 @@ export class Project { * * @param {string} params.keyId - Key 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 - Key name. Max length: 128 chars. - * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed. + * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. * @throws {AppwriteException} * @returns {Promise} @@ -215,7 +216,7 @@ export class Project { * * @param {string} keyId - Key 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 - Key name. Max length: 128 chars. - * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed. + * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. * @throws {AppwriteException} * @returns {Promise} @@ -289,7 +290,7 @@ export class Project { * * You can also create a standard API key if you need a longer-lived key instead. * - * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed. + * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {number} params.duration - Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds. * @throws {AppwriteException} * @returns {Promise} @@ -300,7 +301,7 @@ export class Project { * * You can also create a standard API key if you need a longer-lived key instead. * - * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed. + * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {number} duration - Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds. * @throws {AppwriteException} * @returns {Promise} @@ -392,7 +393,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "keyId"'); } - const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId); + const apiPath = '/project/keys/{keyId}'.replace('{keyId}', encodeURIComponent(String(keyId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -414,7 +415,7 @@ export class Project { * * @param {string} params.keyId - Key ID. * @param {string} params.name - Key name. Max length: 128 chars. - * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed. + * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. * @throws {AppwriteException} * @returns {Promise} @@ -425,7 +426,7 @@ export class Project { * * @param {string} keyId - Key ID. * @param {string} name - Key name. Max length: 128 chars. - * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed. + * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. * @throws {AppwriteException} * @returns {Promise} @@ -464,7 +465,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "scopes"'); } - const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId); + const apiPath = '/project/keys/{keyId}'.replace('{keyId}', encodeURIComponent(String(keyId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -527,7 +528,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "keyId"'); } - const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId); + const apiPath = '/project/keys/{keyId}'.replace('{keyId}', encodeURIComponent(String(keyId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -766,7 +767,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "number"'); } - const apiPath = '/project/mock-phones/{number}'.replace('{number}', number); + const apiPath = '/project/mock-phones/{number}'.replace('{number}', encodeURIComponent(String(number))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -827,7 +828,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "otp"'); } - const apiPath = '/project/mock-phones/{number}'.replace('{number}', number); + const apiPath = '/project/mock-phones/{number}'.replace('{number}', encodeURIComponent(String(number))); const payload: Payload = {}; if (typeof otp !== 'undefined') { payload['otp'] = otp; @@ -884,7 +885,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "number"'); } - const apiPath = '/project/mock-phones/{number}'.replace('{number}', number); + const apiPath = '/project/mock-phones/{number}'.replace('{number}', encodeURIComponent(String(number))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -978,10 +979,11 @@ export class Project { * @param {number} params.userCodeLength - Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8. * @param {string} params.userCodeFormat - Character set for device flow user codes: `numeric` (digits only — best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits — highest entropy per character). Defaults to `alphanumeric`. * @param {number} params.deviceCodeDuration - Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600. + * @param {string[]} params.defaultScopes - List of OAuth2 scopes used when an authorization request omits the scope parameter. Every default scope must also be allowed by the OAuth2 server. Maximum of 100 scopes are allowed, each up to 128 characters long. * @throws {AppwriteException} * @returns {Promise} */ - updateOAuth2Server(params: { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number }): Promise; + updateOAuth2Server(params: { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number, defaultScopes?: string[] }): Promise; /** * Update the OAuth2 server (OIDC provider) configuration. * @@ -998,19 +1000,20 @@ export class Project { * @param {number} userCodeLength - Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8. * @param {string} userCodeFormat - Character set for device flow user codes: `numeric` (digits only — best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits — highest entropy per character). Defaults to `alphanumeric`. * @param {number} deviceCodeDuration - Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600. + * @param {string[]} defaultScopes - List of OAuth2 scopes used when an authorization request omits the scope parameter. Every default scope must also be allowed by the OAuth2 server. Maximum of 100 scopes are allowed, each up to 128 characters long. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateOAuth2Server(enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number): Promise; + updateOAuth2Server(enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number, defaultScopes?: string[]): Promise; updateOAuth2Server( - paramsOrFirst: { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number } | boolean, - ...rest: [(string)?, (string[])?, (string[])?, (number)?, (number)?, (number)?, (number)?, (boolean)?, (string)?, (number)?, (string)?, (number)?] + paramsOrFirst: { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number, defaultScopes?: string[] } | boolean, + ...rest: [(string)?, (string[])?, (string[])?, (number)?, (number)?, (number)?, (number)?, (boolean)?, (string)?, (number)?, (string)?, (number)?, (string[])?] ): Promise { - let params: { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number }; + let params: { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number, defaultScopes?: string[] }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number }; + params = (paramsOrFirst || {}) as { enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number, defaultScopes?: string[] }; } else { params = { enabled: paramsOrFirst as boolean, @@ -1025,7 +1028,8 @@ export class Project { verificationUrl: rest[8] as string, userCodeLength: rest[9] as number, userCodeFormat: rest[10] as string, - deviceCodeDuration: rest[11] as number + deviceCodeDuration: rest[11] as number, + defaultScopes: rest[12] as string[] }; } @@ -1042,6 +1046,7 @@ export class Project { const userCodeLength = params.userCodeLength; const userCodeFormat = params.userCodeFormat; const deviceCodeDuration = params.deviceCodeDuration; + const defaultScopes = params.defaultScopes; if (typeof enabled === 'undefined') { throw new AppwriteException('Missing required parameter: "enabled"'); @@ -1091,6 +1096,9 @@ export class Project { if (typeof deviceCodeDuration !== 'undefined') { payload['deviceCodeDuration'] = deviceCodeDuration; } + if (typeof defaultScopes !== 'undefined') { + payload['defaultScopes'] = defaultScopes; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1259,6 +1267,75 @@ export class Project { ); } + /** + * Update the project OAuth2 Appwrite configuration. + * + * @param {string} params.clientId - 'Client ID' of Appwrite OAuth2 app. For example: 6a42000000000000b5a0 + * @param {string} params.clientSecret - 'Client Secret' of Appwrite OAuth2 app. For example: b86afd000000000000000000000000000000000000000000000000000ced5f93 + * @param {boolean} params.enabled - OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. + * @throws {AppwriteException} + * @returns {Promise} + */ + updateOAuth2Appwrite(params?: { clientId?: string, clientSecret?: string, enabled?: boolean }): Promise; + /** + * Update the project OAuth2 Appwrite configuration. + * + * @param {string} clientId - 'Client ID' of Appwrite OAuth2 app. For example: 6a42000000000000b5a0 + * @param {string} clientSecret - 'Client Secret' of Appwrite OAuth2 app. For example: b86afd000000000000000000000000000000000000000000000000000ced5f93 + * @param {boolean} enabled - OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateOAuth2Appwrite(clientId?: string, clientSecret?: string, enabled?: boolean): Promise; + updateOAuth2Appwrite( + paramsOrFirst?: { clientId?: string, clientSecret?: string, enabled?: boolean } | string, + ...rest: [(string)?, (boolean)?] + ): Promise { + let params: { clientId?: string, clientSecret?: string, enabled?: boolean }; + + if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + params = (paramsOrFirst || {}) as { clientId?: string, clientSecret?: string, enabled?: boolean }; + } else { + params = { + clientId: paramsOrFirst as string, + clientSecret: rest[0] as string, + enabled: rest[1] as boolean + }; + } + + const clientId = params.clientId; + const clientSecret = params.clientSecret; + const enabled = params.enabled; + + + const apiPath = '/project/oauth2/appwrite'; + const payload: Payload = {}; + if (typeof clientId !== 'undefined') { + payload['clientId'] = clientId; + } + if (typeof clientSecret !== 'undefined') { + payload['clientSecret'] = clientSecret; + } + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + 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, + ); + } + /** * Update the project OAuth2 Auth0 configuration. * @@ -2842,11 +2919,13 @@ export class Project { * @param {string} params.authorizationURL - OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/authorize * @param {string} params.tokenURL - OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/token * @param {string} params.userInfoURL - OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/userinfo + * @param {ProjectOAuth2OidcPrompt[]} params.prompt - Array of OpenID Connect prompt values controlling the authentication and consent screens. If "none" is included, it must be the only element. "none" means: don't display any authentication or consent screens. "login" means: prompt the user to re-authenticate. "consent" means: prompt the user for consent. "select_account" means: prompt the user to select an account. + * @param {number} params.maxAge - Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds, otherwise they are prompted to re-authenticate. * @param {boolean} params.enabled - OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. * @throws {AppwriteException} * @returns {Promise} */ - updateOAuth2Oidc(params?: { clientId?: string, clientSecret?: string, wellKnownURL?: string, authorizationURL?: string, tokenURL?: string, userInfoURL?: string, enabled?: boolean }): Promise; + updateOAuth2Oidc(params?: { clientId?: string, clientSecret?: string, wellKnownURL?: string, authorizationURL?: string, tokenURL?: string, userInfoURL?: string, prompt?: ProjectOAuth2OidcPrompt[], maxAge?: number, enabled?: boolean }): Promise; /** * Update the project OAuth2 Oidc configuration. * @@ -2856,20 +2935,22 @@ export class Project { * @param {string} authorizationURL - OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/authorize * @param {string} tokenURL - OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/token * @param {string} userInfoURL - OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/userinfo + * @param {ProjectOAuth2OidcPrompt[]} prompt - Array of OpenID Connect prompt values controlling the authentication and consent screens. If "none" is included, it must be the only element. "none" means: don't display any authentication or consent screens. "login" means: prompt the user to re-authenticate. "consent" means: prompt the user for consent. "select_account" means: prompt the user to select an account. + * @param {number} maxAge - Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds, otherwise they are prompted to re-authenticate. * @param {boolean} enabled - OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateOAuth2Oidc(clientId?: string, clientSecret?: string, wellKnownURL?: string, authorizationURL?: string, tokenURL?: string, userInfoURL?: string, enabled?: boolean): Promise; + updateOAuth2Oidc(clientId?: string, clientSecret?: string, wellKnownURL?: string, authorizationURL?: string, tokenURL?: string, userInfoURL?: string, prompt?: ProjectOAuth2OidcPrompt[], maxAge?: number, enabled?: boolean): Promise; updateOAuth2Oidc( - paramsOrFirst?: { clientId?: string, clientSecret?: string, wellKnownURL?: string, authorizationURL?: string, tokenURL?: string, userInfoURL?: string, enabled?: boolean } | string, - ...rest: [(string)?, (string)?, (string)?, (string)?, (string)?, (boolean)?] + paramsOrFirst?: { clientId?: string, clientSecret?: string, wellKnownURL?: string, authorizationURL?: string, tokenURL?: string, userInfoURL?: string, prompt?: ProjectOAuth2OidcPrompt[], maxAge?: number, enabled?: boolean } | string, + ...rest: [(string)?, (string)?, (string)?, (string)?, (string)?, (ProjectOAuth2OidcPrompt[])?, (number)?, (boolean)?] ): Promise { - let params: { clientId?: string, clientSecret?: string, wellKnownURL?: string, authorizationURL?: string, tokenURL?: string, userInfoURL?: string, enabled?: boolean }; + let params: { clientId?: string, clientSecret?: string, wellKnownURL?: string, authorizationURL?: string, tokenURL?: string, userInfoURL?: string, prompt?: ProjectOAuth2OidcPrompt[], maxAge?: number, enabled?: boolean }; if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { clientId?: string, clientSecret?: string, wellKnownURL?: string, authorizationURL?: string, tokenURL?: string, userInfoURL?: string, enabled?: boolean }; + params = (paramsOrFirst || {}) as { clientId?: string, clientSecret?: string, wellKnownURL?: string, authorizationURL?: string, tokenURL?: string, userInfoURL?: string, prompt?: ProjectOAuth2OidcPrompt[], maxAge?: number, enabled?: boolean }; } else { params = { clientId: paramsOrFirst as string, @@ -2878,7 +2959,9 @@ export class Project { authorizationURL: rest[2] as string, tokenURL: rest[3] as string, userInfoURL: rest[4] as string, - enabled: rest[5] as boolean + prompt: rest[5] as ProjectOAuth2OidcPrompt[], + maxAge: rest[6] as number, + enabled: rest[7] as boolean }; } @@ -2888,6 +2971,8 @@ export class Project { const authorizationURL = params.authorizationURL; const tokenURL = params.tokenURL; const userInfoURL = params.userInfoURL; + const prompt = params.prompt; + const maxAge = params.maxAge; const enabled = params.enabled; @@ -2911,6 +2996,12 @@ export class Project { if (typeof userInfoURL !== 'undefined') { payload['userInfoURL'] = userInfoURL; } + if (typeof prompt !== 'undefined') { + payload['prompt'] = prompt; + } + if (typeof maxAge !== 'undefined') { + payload['maxAge'] = maxAge; + } if (typeof enabled !== 'undefined') { payload['enabled'] = enabled; } @@ -4153,7 +4244,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "providerId"'); } - const apiPath = '/project/oauth2/{providerId}'.replace('{providerId}', providerId); + const apiPath = '/project/oauth2/{providerId}'.replace('{providerId}', encodeURIComponent(String(providerId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -4360,7 +4451,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "applicationId"'); } - const apiPath = '/project/platforms/android/{platformId}'.replace('{platformId}', platformId); + const apiPath = '/project/platforms/android/{platformId}'.replace('{platformId}', encodeURIComponent(String(platformId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -4513,7 +4604,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "bundleIdentifier"'); } - const apiPath = '/project/platforms/apple/{platformId}'.replace('{platformId}', platformId); + const apiPath = '/project/platforms/apple/{platformId}'.replace('{platformId}', encodeURIComponent(String(platformId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -4666,7 +4757,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "packageName"'); } - const apiPath = '/project/platforms/linux/{platformId}'.replace('{platformId}', platformId); + const apiPath = '/project/platforms/linux/{platformId}'.replace('{platformId}', encodeURIComponent(String(platformId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -4819,7 +4910,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "hostname"'); } - const apiPath = '/project/platforms/web/{platformId}'.replace('{platformId}', platformId); + const apiPath = '/project/platforms/web/{platformId}'.replace('{platformId}', encodeURIComponent(String(platformId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -4972,7 +5063,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "packageIdentifierName"'); } - const apiPath = '/project/platforms/windows/{platformId}'.replace('{platformId}', platformId); + const apiPath = '/project/platforms/windows/{platformId}'.replace('{platformId}', encodeURIComponent(String(platformId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -5032,7 +5123,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "platformId"'); } - const apiPath = '/project/platforms/{platformId}'.replace('{platformId}', platformId); + const apiPath = '/project/platforms/{platformId}'.replace('{platformId}', encodeURIComponent(String(platformId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -5085,7 +5176,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "platformId"'); } - const apiPath = '/project/platforms/{platformId}'.replace('{platformId}', platformId); + const apiPath = '/project/platforms/{platformId}'.replace('{platformId}', encodeURIComponent(String(platformId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -5220,6 +5311,63 @@ export class Project { ); } + /** + * Configures if only corporate email addresses (non-free and non-disposable domains) are allowed during new user sign-ups and email updates. + * + * @param {boolean} params.enabled - Set whether or not to restrict sign-ups and email updates to corporate email addresses only. + * @throws {AppwriteException} + * @returns {Promise} + */ + updateDenyCorporateEmailPolicy(params: { enabled: boolean }): Promise; + /** + * Configures if only corporate email addresses (non-free and non-disposable domains) are allowed during new user sign-ups and email updates. + * + * @param {boolean} enabled - Set whether or not to restrict sign-ups and email updates to corporate email addresses only. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + updateDenyCorporateEmailPolicy(enabled: boolean): Promise; + updateDenyCorporateEmailPolicy( + paramsOrFirst: { enabled: boolean } | boolean + ): Promise { + let params: { enabled: boolean }; + + if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + params = (paramsOrFirst || {}) as { enabled: boolean }; + } else { + params = { + enabled: paramsOrFirst as boolean + }; + } + + const enabled = params.enabled; + + if (typeof enabled === 'undefined') { + throw new AppwriteException('Missing required parameter: "enabled"'); + } + + const apiPath = '/project/policies/deny-corporate-email'; + const payload: Payload = {}; + if (typeof enabled !== 'undefined') { + payload['enabled'] = enabled; + } + 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, + ); + } + /** * Configures if disposable emails from known temporary domains are denied during new users sign-ups and email updates. * @@ -5970,23 +6118,23 @@ export class Project { /** * Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy. * - * @param {ProjectPolicyId} params.policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email. + * @param {ProjectPolicyId} params.policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email. * @throws {AppwriteException} - * @returns {Promise} + * @returns {Promise} */ - getPolicy(params: { policyId: ProjectPolicyId }): Promise; + getPolicy(params: { policyId: ProjectPolicyId }): Promise; /** * Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy. * - * @param {ProjectPolicyId} policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email. + * @param {ProjectPolicyId} policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email. * @throws {AppwriteException} - * @returns {Promise} + * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - getPolicy(policyId: ProjectPolicyId): Promise; + getPolicy(policyId: ProjectPolicyId): Promise; getPolicy( paramsOrFirst: { policyId: ProjectPolicyId } | ProjectPolicyId - ): Promise { + ): Promise { let params: { policyId: ProjectPolicyId }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('policyId' in paramsOrFirst))) { @@ -6003,7 +6151,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "policyId"'); } - const apiPath = '/project/policies/{policyId}'.replace('{policyId}', policyId); + const apiPath = '/project/policies/{policyId}'.replace('{policyId}', encodeURIComponent(String(policyId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -6064,7 +6212,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "enabled"'); } - const apiPath = '/project/protocols/{protocolId}'.replace('{protocolId}', protocolId); + const apiPath = '/project/protocols/{protocolId}'.replace('{protocolId}', encodeURIComponent(String(protocolId))); const payload: Payload = {}; if (typeof enabled !== 'undefined') { payload['enabled'] = enabled; @@ -6088,7 +6236,7 @@ export class Project { /** * Update properties of a specific service. Use this endpoint to enable or disable a service in your project. * - * @param {ProjectServiceId} params.serviceId - Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor + * @param {ProjectServiceId} params.serviceId - Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor, oauth2 * @param {boolean} params.enabled - Service status. * @throws {AppwriteException} * @returns {Promise} @@ -6097,7 +6245,7 @@ export class Project { /** * Update properties of a specific service. Use this endpoint to enable or disable a service in your project. * - * @param {ProjectServiceId} serviceId - Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor + * @param {ProjectServiceId} serviceId - Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor, oauth2 * @param {boolean} enabled - Service status. * @throws {AppwriteException} * @returns {Promise} @@ -6129,7 +6277,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "enabled"'); } - const apiPath = '/project/services/{serviceId}'.replace('{serviceId}', serviceId); + const apiPath = '/project/services/{serviceId}'.replace('{serviceId}', encodeURIComponent(String(serviceId))); const payload: Payload = {}; if (typeof enabled !== 'undefined') { payload['enabled'] = enabled; @@ -6533,7 +6681,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "templateId"'); } - const apiPath = '/project/templates/email/{templateId}'.replace('{templateId}', templateId); + const apiPath = '/project/templates/email/{templateId}'.replace('{templateId}', encodeURIComponent(String(templateId))); const payload: Payload = {}; if (typeof locale !== 'undefined') { payload['locale'] = locale; @@ -6735,7 +6883,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "variableId"'); } - const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId); + const apiPath = '/project/variables/{variableId}'.replace('{variableId}', encodeURIComponent(String(variableId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -6801,7 +6949,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "variableId"'); } - const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId); + const apiPath = '/project/variables/{variableId}'.replace('{variableId}', encodeURIComponent(String(variableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -6864,7 +7012,7 @@ export class Project { throw new AppwriteException('Missing required parameter: "variableId"'); } - const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId); + const apiPath = '/project/variables/{variableId}'.replace('{variableId}', encodeURIComponent(String(variableId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/proxy.ts b/src/services/proxy.ts index b2c53fa..04379aa 100644 --- a/src/services/proxy.ts +++ b/src/services/proxy.ts @@ -430,7 +430,7 @@ export class Proxy { throw new AppwriteException('Missing required parameter: "ruleId"'); } - const apiPath = '/proxy/rules/{ruleId}'.replace('{ruleId}', ruleId); + const apiPath = '/proxy/rules/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -483,7 +483,7 @@ export class Proxy { throw new AppwriteException('Missing required parameter: "ruleId"'); } - const apiPath = '/proxy/rules/{ruleId}'.replace('{ruleId}', ruleId); + const apiPath = '/proxy/rules/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -536,7 +536,7 @@ export class Proxy { throw new AppwriteException('Missing required parameter: "ruleId"'); } - const apiPath = '/proxy/rules/{ruleId}/status'.replace('{ruleId}', ruleId); + const apiPath = '/proxy/rules/{ruleId}/status'.replace('{ruleId}', encodeURIComponent(String(ruleId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/sites.ts b/src/services/sites.ts index 0de414a..314650f 100644 --- a/src/services/sites.ts +++ b/src/services/sites.ts @@ -334,13 +334,41 @@ export class Sites { /** * List allowed site specifications for this instance. * + * @param {string} params.type - Specification type to list. Can be one of: runtimes, builds. * @throws {AppwriteException} * @returns {Promise} */ - listSpecifications(): Promise { + listSpecifications(params?: { type?: string }): Promise; + /** + * List allowed site specifications for this instance. + * + * @param {string} type - Specification type to list. Can be one of: runtimes, builds. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listSpecifications(type?: string): Promise; + listSpecifications( + paramsOrFirst?: { type?: string } | string + ): Promise { + let params: { type?: string }; + + if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { + params = (paramsOrFirst || {}) as { type?: string }; + } else { + params = { + type: paramsOrFirst as string + }; + } + + const type = params.type; + const apiPath = '/sites/specifications'; const payload: Payload = {}; + if (typeof type !== 'undefined') { + payload['type'] = type; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -392,7 +420,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "siteId"'); } - const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -540,7 +568,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "framework"'); } - const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -660,7 +688,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "siteId"'); } - const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -721,7 +749,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/sites/{siteId}/deployment'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}/deployment'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; if (typeof deploymentId !== 'undefined') { payload['deploymentId'] = deploymentId; @@ -791,7 +819,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "siteId"'); } - const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -880,7 +908,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "code"'); } - const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; if (typeof installCommand !== 'undefined') { payload['installCommand'] = installCommand; @@ -958,7 +986,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/sites/{siteId}/deployments/duplicate'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}/deployments/duplicate'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; if (typeof deploymentId !== 'undefined') { payload['deploymentId'] = deploymentId; @@ -1059,7 +1087,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "reference"'); } - const apiPath = '/sites/{siteId}/deployments/template'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}/deployments/template'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; if (typeof repository !== 'undefined') { payload['repository'] = repository; @@ -1154,7 +1182,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "reference"'); } - const apiPath = '/sites/{siteId}/deployments/vcs'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}/deployments/vcs'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; if (typeof type !== 'undefined') { payload['type'] = type; @@ -1225,7 +1253,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId); + const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', encodeURIComponent(String(siteId))).replace('{deploymentId}', encodeURIComponent(String(deploymentId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1286,7 +1314,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId); + const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', encodeURIComponent(String(siteId))).replace('{deploymentId}', encodeURIComponent(String(deploymentId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1351,7 +1379,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/sites/{siteId}/deployments/{deploymentId}/download'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId); + const apiPath = '/sites/{siteId}/deployments/{deploymentId}/download'.replace('{siteId}', encodeURIComponent(String(siteId))).replace('{deploymentId}', encodeURIComponent(String(deploymentId))); const payload: Payload = {}; if (typeof type !== 'undefined') { payload['type'] = type; @@ -1416,7 +1444,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - const apiPath = '/sites/{siteId}/deployments/{deploymentId}/status'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId); + const apiPath = '/sites/{siteId}/deployments/{deploymentId}/status'.replace('{siteId}', encodeURIComponent(String(siteId))).replace('{deploymentId}', encodeURIComponent(String(deploymentId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1479,7 +1507,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "siteId"'); } - const apiPath = '/sites/{siteId}/logs'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}/logs'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -1546,7 +1574,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "logId"'); } - const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId); + const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', encodeURIComponent(String(siteId))).replace('{logId}', encodeURIComponent(String(logId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1607,7 +1635,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "logId"'); } - const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId); + const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', encodeURIComponent(String(siteId))).replace('{logId}', encodeURIComponent(String(logId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1670,7 +1698,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "siteId"'); } - const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -1755,7 +1783,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "value"'); } - const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId); + const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', encodeURIComponent(String(siteId))); const payload: Payload = {}; if (typeof variableId !== 'undefined') { payload['variableId'] = variableId; @@ -1829,7 +1857,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "variableId"'); } - const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId); + const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', encodeURIComponent(String(siteId))).replace('{variableId}', encodeURIComponent(String(variableId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1902,7 +1930,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "variableId"'); } - const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId); + const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', encodeURIComponent(String(siteId))).replace('{variableId}', encodeURIComponent(String(variableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -1973,7 +2001,7 @@ export class Sites { throw new AppwriteException('Missing required parameter: "variableId"'); } - const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId); + const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', encodeURIComponent(String(siteId))).replace('{variableId}', encodeURIComponent(String(variableId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/storage.ts b/src/services/storage.ts index f4ae7a0..7ff1932 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -249,7 +249,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "bucketId"'); } - const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId); + const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', encodeURIComponent(String(bucketId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -346,7 +346,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "name"'); } - const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId); + const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', encodeURIComponent(String(bucketId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -430,7 +430,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "bucketId"'); } - const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId); + const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', encodeURIComponent(String(bucketId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -496,7 +496,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "bucketId"'); } - const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId); + const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', encodeURIComponent(String(bucketId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -594,7 +594,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "file"'); } - const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId); + const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', encodeURIComponent(String(bucketId))); const payload: Payload = {}; if (typeof fileId !== 'undefined') { payload['fileId'] = fileId; @@ -666,7 +666,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "fileId"'); } - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', 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); @@ -735,7 +735,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "fileId"'); } - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', 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; @@ -803,7 +803,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "fileId"'); } - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', 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); @@ -868,7 +868,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "fileId"'); } - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', 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; @@ -981,7 +981,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "fileId"'); } - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replace('{bucketId}', bucketId).replace('{fileId}', 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; @@ -1083,7 +1083,7 @@ export class Storage { throw new AppwriteException('Missing required parameter: "fileId"'); } - const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', 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; diff --git a/src/services/tables-db.ts b/src/services/tables-db.ts index aa4248f..57baaf2 100644 --- a/src/services/tables-db.ts +++ b/src/services/tables-db.ts @@ -89,10 +89,11 @@ export class TablesDB { * @param {string} params.databaseId - 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. * @param {string} params.name - Database name. Max length: 128 chars. * @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. + * @param {string} params.specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification. * @throws {AppwriteException} * @returns {Promise} */ - create(params: { databaseId: string, name: string, enabled?: boolean }): Promise; + create(params: { databaseId: string, name: string, enabled?: boolean, specification?: string }): Promise; /** * Create a new Database. * @@ -100,30 +101,33 @@ export class TablesDB { * @param {string} databaseId - 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. * @param {string} name - Database name. Max length: 128 chars. * @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. + * @param {string} specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - create(databaseId: string, name: string, enabled?: boolean): Promise; + create(databaseId: string, name: string, enabled?: boolean, specification?: string): Promise; create( - paramsOrFirst: { databaseId: string, name: string, enabled?: boolean } | string, - ...rest: [(string)?, (boolean)?] + paramsOrFirst: { databaseId: string, name: string, enabled?: boolean, specification?: string } | string, + ...rest: [(string)?, (boolean)?, (string)?] ): Promise { - let params: { databaseId: string, name: string, enabled?: boolean }; + let params: { databaseId: string, name: string, enabled?: boolean, specification?: string }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, name: string, enabled?: boolean }; + params = (paramsOrFirst || {}) as { databaseId: string, name: string, enabled?: boolean, specification?: string }; } else { params = { databaseId: paramsOrFirst as string, name: rest[0] as string, - enabled: rest[1] as boolean + enabled: rest[1] as boolean, + specification: rest[2] as string }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const specification = params.specification; if (typeof databaseId === 'undefined') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -143,6 +147,9 @@ export class TablesDB { if (typeof enabled !== 'undefined') { payload['enabled'] = enabled; } + if (typeof specification !== 'undefined') { + payload['specification'] = specification; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -302,7 +309,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "transactionId"'); } - const apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', transactionId); + const apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -364,7 +371,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "transactionId"'); } - const apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', transactionId); + const apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); const payload: Payload = {}; if (typeof commit !== 'undefined') { payload['commit'] = commit; @@ -424,7 +431,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "transactionId"'); } - const apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', transactionId); + const apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', encodeURIComponent(String(transactionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -482,7 +489,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "transactionId"'); } - const apiPath = '/tablesdb/transactions/{transactionId}/operations'.replace('{transactionId}', transactionId); + const apiPath = '/tablesdb/transactions/{transactionId}/operations'.replace('{transactionId}', encodeURIComponent(String(transactionId))); const payload: Payload = {}; if (typeof operations !== 'undefined') { payload['operations'] = operations; @@ -539,7 +546,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "databaseId"'); } - const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId); + const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -601,7 +608,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "databaseId"'); } - const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId); + const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -661,7 +668,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "databaseId"'); } - const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId); + const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -727,7 +734,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "databaseId"'); } - const apiPath = '/tablesdb/{databaseId}/tables'.replace('{databaseId}', databaseId); + const apiPath = '/tablesdb/{databaseId}/tables'.replace('{databaseId}', encodeURIComponent(String(databaseId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -824,7 +831,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "name"'); } - const apiPath = '/tablesdb/{databaseId}/tables'.replace('{databaseId}', databaseId); + const apiPath = '/tablesdb/{databaseId}/tables'.replace('{databaseId}', encodeURIComponent(String(databaseId))); const payload: Payload = {}; if (typeof tableId !== 'undefined') { payload['tableId'] = tableId; @@ -907,7 +914,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "tableId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -988,7 +995,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "tableId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -1065,7 +1072,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "tableId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1134,7 +1141,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "tableId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -1233,7 +1240,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/bigint'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/bigint'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -1348,7 +1355,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/bigint/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/bigint/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -1449,7 +1456,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -1548,7 +1555,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -1641,7 +1648,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -1740,7 +1747,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -1835,7 +1842,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -1936,7 +1943,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -2036,7 +2043,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2147,7 +2154,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof elements !== 'undefined') { payload['elements'] = elements; @@ -2253,7 +2260,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2368,7 +2375,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -2477,7 +2484,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2592,7 +2599,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -2693,7 +2700,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2794,7 +2801,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -2828,11 +2835,11 @@ export class TablesDB { * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? - * @param {any[]} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. + * @param {any[][]} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. * @throws {AppwriteException} * @returns {Promise} */ - createLineColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }): Promise; + createLineColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][] }): Promise; /** * Create a geometric line column. * @@ -2840,27 +2847,27 @@ export class TablesDB { * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} key - Column Key. * @param {boolean} required - Is column required? - * @param {any[]} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. + * @param {any[][]} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createLineColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[]): Promise; + createLineColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][]): Promise; createLineColumn( - paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?] + paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][] } | string, + ...rest: [(string)?, (string)?, (boolean)?, (any[][])?] ): Promise { - let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }; + let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][] }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }; + params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][] }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[] + xdefault: rest[3] as any[][] }; } @@ -2883,7 +2890,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -2917,12 +2924,12 @@ export class TablesDB { * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? - * @param {any[]} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. + * @param {any[][]} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. * @param {string} params.newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise} */ - updateLineColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }): Promise; + updateLineColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }): Promise; /** * Update a line column. Changing the `default` value will not update already existing rows. * @@ -2930,28 +2937,28 @@ export class TablesDB { * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} key - Column Key. * @param {boolean} required - Is column required? - * @param {any[]} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. + * @param {any[][]} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. * @param {string} newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updateLineColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise; + updateLineColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string): Promise; updateLineColumn( - paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?, (string)?] + paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string } | string, + ...rest: [(string)?, (string)?, (boolean)?, (any[][])?, (string)?] ): Promise { - let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[], + xdefault: rest[3] as any[][], newKey: rest[4] as string }; } @@ -2976,7 +2983,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -3075,7 +3082,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -3179,7 +3186,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -3278,7 +3285,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -3382,7 +3389,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -3416,11 +3423,11 @@ export class TablesDB { * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? - * @param {any[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. + * @param {number[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. * @throws {AppwriteException} * @returns {Promise} */ - createPointColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }): Promise; + createPointColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[] }): Promise; /** * Create a geometric point column. * @@ -3428,27 +3435,27 @@ export class TablesDB { * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} key - Column Key. * @param {boolean} required - Is column required? - * @param {any[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. + * @param {number[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createPointColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[]): Promise; + createPointColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[]): Promise; createPointColumn( - paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?] + paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[] } | string, + ...rest: [(string)?, (string)?, (boolean)?, (number[])?] ): Promise { - let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }; + let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[] }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }; + params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[] }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[] + xdefault: rest[3] as number[] }; } @@ -3471,7 +3478,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -3505,12 +3512,12 @@ export class TablesDB { * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? - * @param {any[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. + * @param {number[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. * @param {string} params.newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise} */ - updatePointColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }): Promise; + updatePointColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[], newKey?: string }): Promise; /** * Update a point column. Changing the `default` value will not update already existing rows. * @@ -3518,28 +3525,28 @@ export class TablesDB { * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} key - Column Key. * @param {boolean} required - Is column required? - * @param {any[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. + * @param {number[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. * @param {string} newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePointColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise; + updatePointColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[], newKey?: string): Promise; updatePointColumn( - paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?, (string)?] + paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[], newKey?: string } | string, + ...rest: [(string)?, (string)?, (boolean)?, (number[])?, (string)?] ): Promise { - let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[], newKey?: string }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[], newKey?: string }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[], + xdefault: rest[3] as number[], newKey: rest[4] as string }; } @@ -3564,7 +3571,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -3598,11 +3605,11 @@ export class TablesDB { * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? - * @param {any[]} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. + * @param {any[][]} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. * @throws {AppwriteException} * @returns {Promise} */ - createPolygonColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }): Promise; + createPolygonColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][] }): Promise; /** * Create a geometric polygon column. * @@ -3610,27 +3617,27 @@ export class TablesDB { * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} key - Column Key. * @param {boolean} required - Is column required? - * @param {any[]} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. + * @param {any[][]} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - createPolygonColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[]): Promise; + createPolygonColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][]): Promise; createPolygonColumn( - paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?] + paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][] } | string, + ...rest: [(string)?, (string)?, (boolean)?, (any[][])?] ): Promise { - let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }; + let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][] }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[] }; + params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][] }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[] + xdefault: rest[3] as any[][] }; } @@ -3653,7 +3660,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -3687,12 +3694,12 @@ export class TablesDB { * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? - * @param {any[]} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. + * @param {any[][]} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. * @param {string} params.newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise} */ - updatePolygonColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }): Promise; + updatePolygonColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }): Promise; /** * Update a polygon column. Changing the `default` value will not update already existing rows. * @@ -3700,28 +3707,28 @@ export class TablesDB { * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @param {string} key - Column Key. * @param {boolean} required - Is column required? - * @param {any[]} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. + * @param {any[][]} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. * @param {string} newKey - New Column Key. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePolygonColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise; + updatePolygonColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string): Promise; updatePolygonColumn( - paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string } | string, - ...rest: [(string)?, (string)?, (boolean)?, (any[])?, (string)?] + paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string } | string, + ...rest: [(string)?, (string)?, (boolean)?, (any[][])?, (string)?] ): Promise { - let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string }; + params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string }; } else { params = { databaseId: paramsOrFirst as string, tableId: rest[0] as string, key: rest[1] as string, required: rest[2] as boolean, - xdefault: rest[3] as any[], + xdefault: rest[3] as any[][], newKey: rest[4] as string }; } @@ -3746,7 +3753,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -3849,7 +3856,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "type"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof relatedTableId !== 'undefined') { payload['relatedTableId'] = relatedTableId; @@ -3965,7 +3972,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -4077,7 +4084,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -4179,7 +4186,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -4283,7 +4290,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -4378,7 +4385,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -4479,7 +4486,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -4585,7 +4592,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "required"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -4696,7 +4703,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "xdefault"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof required !== 'undefined') { payload['required'] = required; @@ -4777,7 +4784,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "key"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -4845,7 +4852,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "key"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -4923,7 +4930,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "key"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}/relationship'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; if (typeof onDelete !== 'undefined') { payload['onDelete'] = onDelete; @@ -4999,7 +5006,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "tableId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -5097,7 +5104,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "columns"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof key !== 'undefined') { payload['key'] = key; @@ -5181,7 +5188,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "key"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -5249,7 +5256,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "key"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))).replace('{key}', encodeURIComponent(String(key))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -5326,7 +5333,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "tableId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', 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; @@ -5421,7 +5428,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "data"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', 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; @@ -5506,7 +5513,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "rows"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof rows !== 'undefined') { payload['rows'] = rows; @@ -5587,7 +5594,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "rows"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof rows !== 'undefined') { payload['rows'] = rows; @@ -5667,7 +5674,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "tableId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{tableId}', encodeURIComponent(String(tableId))); const payload: Payload = {}; if (typeof data !== 'undefined') { payload['data'] = data; @@ -5746,7 +5753,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "tableId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', 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; @@ -5829,7 +5836,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "rowId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', 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; @@ -5915,7 +5922,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "rowId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', 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; @@ -6005,7 +6012,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "rowId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', 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; @@ -6087,7 +6094,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "rowId"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', 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; @@ -6177,7 +6184,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "column"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId).replace('{column}', 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; @@ -6274,7 +6281,7 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "column"'); } - const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId).replace('{column}', 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; diff --git a/src/services/teams.ts b/src/services/teams.ts index 3a77c58..28a9533 100644 --- a/src/services/teams.ts +++ b/src/services/teams.ts @@ -189,7 +189,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "teamId"'); } - const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId); + const apiPath = '/teams/{teamId}'.replace('{teamId}', encodeURIComponent(String(teamId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -250,7 +250,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "name"'); } - const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId); + const apiPath = '/teams/{teamId}'.replace('{teamId}', encodeURIComponent(String(teamId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -307,7 +307,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "teamId"'); } - const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId); + const apiPath = '/teams/{teamId}'.replace('{teamId}', encodeURIComponent(String(teamId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -373,7 +373,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "teamId"'); } - const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', teamId); + const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', encodeURIComponent(String(teamId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -477,7 +477,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "roles"'); } - const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', teamId); + const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', encodeURIComponent(String(teamId))); const payload: Payload = {}; if (typeof email !== 'undefined') { payload['email'] = email; @@ -557,7 +557,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "membershipId"'); } - const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', 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); @@ -627,7 +627,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "roles"'); } - const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', 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; @@ -692,7 +692,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "membershipId"'); } - const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', 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); @@ -773,7 +773,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "secret"'); } - const apiPath = '/teams/{teamId}/memberships/{membershipId}/status'.replace('{teamId}', teamId).replace('{membershipId}', 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; @@ -833,7 +833,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "teamId"'); } - const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', teamId); + const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', encodeURIComponent(String(teamId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -894,7 +894,7 @@ export class Teams { throw new AppwriteException('Missing required parameter: "prefs"'); } - const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', teamId); + const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', encodeURIComponent(String(teamId))); const payload: Payload = {}; if (typeof prefs !== 'undefined') { payload['prefs'] = prefs; diff --git a/src/services/tokens.ts b/src/services/tokens.ts index 18b0fed..f5b9cb0 100644 --- a/src/services/tokens.ts +++ b/src/services/tokens.ts @@ -62,7 +62,7 @@ export class Tokens { throw new AppwriteException('Missing required parameter: "fileId"'); } - const apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId); + const apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', encodeURIComponent(String(bucketId))).replace('{fileId}', encodeURIComponent(String(fileId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -133,7 +133,7 @@ export class Tokens { throw new AppwriteException('Missing required parameter: "fileId"'); } - const apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId); + const apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', encodeURIComponent(String(bucketId))).replace('{fileId}', encodeURIComponent(String(fileId))); const payload: Payload = {}; if (typeof expire !== 'undefined') { payload['expire'] = expire; @@ -190,7 +190,7 @@ export class Tokens { throw new AppwriteException('Missing required parameter: "tokenId"'); } - const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', tokenId); + const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', encodeURIComponent(String(tokenId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -248,7 +248,7 @@ export class Tokens { throw new AppwriteException('Missing required parameter: "tokenId"'); } - const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', tokenId); + const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', encodeURIComponent(String(tokenId))); const payload: Payload = {}; if (typeof expire !== 'undefined') { payload['expire'] = expire; @@ -305,7 +305,7 @@ export class Tokens { throw new AppwriteException('Missing required parameter: "tokenId"'); } - const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', tokenId); + const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', encodeURIComponent(String(tokenId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); diff --git a/src/services/usage.ts b/src/services/usage.ts deleted file mode 100644 index f7d485e..0000000 --- a/src/services/usage.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; -import type { Models } from '../models'; - - - -export class Usage { - client: Client; - - constructor(client: Client) { - this.client = client; - } - - /** - * Query usage event metrics from the usage database. Returns individual event rows with full metadata. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, path, method, status, resource, resourceId, country, userAgent, time (these match the underlying column names — note that the response surfaces `resource` as `resourceType` and `country` as `countryCode`). When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable — pass `total=false` to skip the count entirely. - * - * @param {string[]} params.queries - Array of query strings as JSON. Supported: equal("metric", [...]), equal("path", [...]), equal("method", [...]), equal("status", [...]), equal("resource", [...]), equal("resourceId", [...]), equal("country", [...]), equal("userAgent", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N). - * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. - * @throws {AppwriteException} - * @returns {Promise} - */ - listEvents(params?: { queries?: string[], total?: boolean }): Promise; - /** - * Query usage event metrics from the usage database. Returns individual event rows with full metadata. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, path, method, status, resource, resourceId, country, userAgent, time (these match the underlying column names — note that the response surfaces `resource` as `resourceType` and `country` as `countryCode`). When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable — pass `total=false` to skip the count entirely. - * - * @param {string[]} queries - Array of query strings as JSON. Supported: equal("metric", [...]), equal("path", [...]), equal("method", [...]), equal("status", [...]), equal("resource", [...]), equal("resourceId", [...]), equal("country", [...]), equal("userAgent", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N). - * @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. - */ - listEvents(queries?: string[], total?: boolean): Promise; - listEvents( - 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 = '/usage/events'; - 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, - ); - } - - /** - * Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc("time"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable — pass `total=false` to skip the count entirely. - * - * @param {string[]} params.queries - Array of query strings as JSON. Supported: equal("metric", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N). - * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. - * @throws {AppwriteException} - * @returns {Promise} - */ - listGauges(params?: { queries?: string[], total?: boolean }): Promise; - /** - * Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc("time"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable — pass `total=false` to skip the count entirely. - * - * @param {string[]} queries - Array of query strings as JSON. Supported: equal("metric", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N). - * @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. - */ - listGauges(queries?: string[], total?: boolean): Promise; - listGauges( - 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 = '/usage/gauges'; - 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, - ); - } -} diff --git a/src/services/users.ts b/src/services/users.ts index 44a107a..6b9985c 100644 --- a/src/services/users.ts +++ b/src/services/users.ts @@ -16,7 +16,7 @@ export class Users { /** * Get a list of all the project's users. You can use the query params to filter your results. * - * @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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator + * @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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator, accessedAt * @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} @@ -26,7 +26,7 @@ export class Users { /** * Get a list of all the project's users. You can use the query params to filter your results. * - * @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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator + * @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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator, accessedAt * @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} @@ -441,7 +441,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "identityId"'); } - const apiPath = '/users/identities/{identityId}'.replace('{identityId}', identityId); + const apiPath = '/users/identities/{identityId}'.replace('{identityId}', encodeURIComponent(String(identityId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1006,7 +1006,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}'.replace('{userId}', userId); + const apiPath = '/users/{userId}'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1059,7 +1059,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}'.replace('{userId}', userId); + const apiPath = '/users/{userId}'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1120,7 +1120,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "email"'); } - const apiPath = '/users/{userId}/email'.replace('{userId}', userId); + const apiPath = '/users/{userId}/email'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof email !== 'undefined') { payload['email'] = email; @@ -1187,7 +1187,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "impersonator"'); } - const apiPath = '/users/{userId}/impersonator'.replace('{userId}', userId); + const apiPath = '/users/{userId}/impersonator'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof impersonator !== 'undefined') { payload['impersonator'] = impersonator; @@ -1253,7 +1253,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/jwts'.replace('{userId}', userId); + const apiPath = '/users/{userId}/jwts'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof sessionId !== 'undefined') { payload['sessionId'] = sessionId; @@ -1325,7 +1325,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "labels"'); } - const apiPath = '/users/{userId}/labels'.replace('{userId}', userId); + const apiPath = '/users/{userId}/labels'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof labels !== 'undefined') { payload['labels'] = labels; @@ -1391,7 +1391,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/logs'.replace('{userId}', userId); + const apiPath = '/users/{userId}/logs'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -1463,7 +1463,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/memberships'.replace('{userId}', userId); + const apiPath = '/users/{userId}/memberships'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -1534,7 +1534,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "mfa"'); } - const apiPath = '/users/{userId}/mfa'.replace('{userId}', userId); + const apiPath = '/users/{userId}/mfa'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof mfa !== 'undefined') { payload['mfa'] = mfa; @@ -1599,7 +1599,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "mfa"'); } - const apiPath = '/users/{userId}/mfa'.replace('{userId}', userId); + const apiPath = '/users/{userId}/mfa'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof mfa !== 'undefined') { payload['mfa'] = mfa; @@ -1665,7 +1665,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "type"'); } - const apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', userId).replace('{type}', type); + const apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', encodeURIComponent(String(userId))).replace('{type}', encodeURIComponent(String(type))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1726,7 +1726,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "type"'); } - const apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', userId).replace('{type}', type); + const apiPath = '/users/{userId}/mfa/authenticators/{type}'.replace('{userId}', encodeURIComponent(String(userId))).replace('{type}', encodeURIComponent(String(type))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1780,7 +1780,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId); + const apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1833,7 +1833,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', userId); + const apiPath = '/users/{userId}/mfa/factors'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1887,7 +1887,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); + const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1940,7 +1940,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); + const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -1994,7 +1994,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); + const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2048,7 +2048,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); + const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2103,7 +2103,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); + const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2157,7 +2157,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', userId); + const apiPath = '/users/{userId}/mfa/recovery-codes'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2219,7 +2219,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "name"'); } - const apiPath = '/users/{userId}/name'.replace('{userId}', userId); + const apiPath = '/users/{userId}/name'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -2284,7 +2284,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "password"'); } - const apiPath = '/users/{userId}/password'.replace('{userId}', userId); + const apiPath = '/users/{userId}/password'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof password !== 'undefined') { payload['password'] = password; @@ -2349,7 +2349,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "number"'); } - const apiPath = '/users/{userId}/phone'.replace('{userId}', userId); + const apiPath = '/users/{userId}/phone'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof number !== 'undefined') { payload['number'] = number; @@ -2406,7 +2406,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/prefs'.replace('{userId}', userId); + const apiPath = '/users/{userId}/prefs'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2467,7 +2467,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "prefs"'); } - const apiPath = '/users/{userId}/prefs'.replace('{userId}', userId); + const apiPath = '/users/{userId}/prefs'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof prefs !== 'undefined') { payload['prefs'] = prefs; @@ -2529,7 +2529,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/sessions'.replace('{userId}', userId); + const apiPath = '/users/{userId}/sessions'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof total !== 'undefined') { payload['total'] = total; @@ -2589,7 +2589,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/sessions'.replace('{userId}', userId); + const apiPath = '/users/{userId}/sessions'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2643,7 +2643,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/sessions'.replace('{userId}', userId); + const apiPath = '/users/{userId}/sessions'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2704,7 +2704,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "sessionId"'); } - const apiPath = '/users/{userId}/sessions/{sessionId}'.replace('{userId}', userId).replace('{sessionId}', sessionId); + const apiPath = '/users/{userId}/sessions/{sessionId}'.replace('{userId}', encodeURIComponent(String(userId))).replace('{sessionId}', encodeURIComponent(String(sessionId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -2765,7 +2765,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "status"'); } - const apiPath = '/users/{userId}/status'.replace('{userId}', userId); + const apiPath = '/users/{userId}/status'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof status !== 'undefined') { payload['status'] = status; @@ -2831,7 +2831,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/targets'.replace('{userId}', userId); + const apiPath = '/users/{userId}/targets'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof queries !== 'undefined') { payload['queries'] = queries; @@ -2920,7 +2920,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "identifier"'); } - const apiPath = '/users/{userId}/targets'.replace('{userId}', userId); + const apiPath = '/users/{userId}/targets'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof targetId !== 'undefined') { payload['targetId'] = targetId; @@ -2997,7 +2997,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "targetId"'); } - const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', userId).replace('{targetId}', targetId); + const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', encodeURIComponent(String(userId))).replace('{targetId}', encodeURIComponent(String(targetId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -3070,7 +3070,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "targetId"'); } - const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', userId).replace('{targetId}', targetId); + const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', encodeURIComponent(String(userId))).replace('{targetId}', encodeURIComponent(String(targetId))); const payload: Payload = {}; if (typeof identifier !== 'undefined') { payload['identifier'] = identifier; @@ -3141,7 +3141,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "targetId"'); } - const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', userId).replace('{targetId}', targetId); + const apiPath = '/users/{userId}/targets/{targetId}'.replace('{userId}', encodeURIComponent(String(userId))).replace('{targetId}', encodeURIComponent(String(targetId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -3205,7 +3205,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } - const apiPath = '/users/{userId}/tokens'.replace('{userId}', userId); + const apiPath = '/users/{userId}/tokens'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof length !== 'undefined') { payload['length'] = length; @@ -3273,7 +3273,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "emailVerification"'); } - const apiPath = '/users/{userId}/verification'.replace('{userId}', userId); + const apiPath = '/users/{userId}/verification'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof emailVerification !== 'undefined') { payload['emailVerification'] = emailVerification; @@ -3338,7 +3338,7 @@ export class Users { throw new AppwriteException('Missing required parameter: "phoneVerification"'); } - const apiPath = '/users/{userId}/verification/phone'.replace('{userId}', userId); + const apiPath = '/users/{userId}/verification/phone'.replace('{userId}', encodeURIComponent(String(userId))); const payload: Payload = {}; if (typeof phoneVerification !== 'undefined') { payload['phoneVerification'] = phoneVerification; diff --git a/src/services/webhooks.ts b/src/services/webhooks.ts index cf096f8..71d27f1 100644 --- a/src/services/webhooks.ts +++ b/src/services/webhooks.ts @@ -230,7 +230,7 @@ export class Webhooks { throw new AppwriteException('Missing required parameter: "webhookId"'); } - const apiPath = '/webhooks/{webhookId}'.replace('{webhookId}', webhookId); + const apiPath = '/webhooks/{webhookId}'.replace('{webhookId}', encodeURIComponent(String(webhookId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -321,7 +321,7 @@ export class Webhooks { throw new AppwriteException('Missing required parameter: "events"'); } - const apiPath = '/webhooks/{webhookId}'.replace('{webhookId}', webhookId); + const apiPath = '/webhooks/{webhookId}'.replace('{webhookId}', encodeURIComponent(String(webhookId))); const payload: Payload = {}; if (typeof name !== 'undefined') { payload['name'] = name; @@ -396,7 +396,7 @@ export class Webhooks { throw new AppwriteException('Missing required parameter: "webhookId"'); } - const apiPath = '/webhooks/{webhookId}'.replace('{webhookId}', webhookId); + const apiPath = '/webhooks/{webhookId}'.replace('{webhookId}', encodeURIComponent(String(webhookId))); const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -454,7 +454,7 @@ export class Webhooks { throw new AppwriteException('Missing required parameter: "webhookId"'); } - const apiPath = '/webhooks/{webhookId}/secret'.replace('{webhookId}', webhookId); + const apiPath = '/webhooks/{webhookId}/secret'.replace('{webhookId}', encodeURIComponent(String(webhookId))); const payload: Payload = {}; if (typeof secret !== 'undefined') { payload['secret'] = secret; diff --git a/test/services/account.test.js b/test/services/account.test.js index f13cbde..21537be 100644 --- a/test/services/account.test.js +++ b/test/services/account.test.js @@ -62,7 +62,7 @@ describe('Account', () => { const response = await account.create( '', 'email@example.com', - '', + 'password', ); // Remove custom toString method on the objects to allow for clean data comparison. @@ -605,7 +605,7 @@ describe('Account', () => { mockedFetch.mockImplementation(() => Response.json(data)); const response = await account.updatePassword( - '', + 'password', ); // Remove custom toString method on the objects to allow for clean data comparison. @@ -722,7 +722,7 @@ describe('Account', () => { const response = await account.updateRecovery( '', '', - '', + 'password', ); // Remove custom toString method on the objects to allow for clean data comparison. diff --git a/test/services/activities.test.js b/test/services/activities.test.js index e7c258a..2823e41 100644 --- a/test/services/activities.test.js +++ b/test/services/activities.test.js @@ -44,21 +44,7 @@ describe('Activities', () => { 'time': '2020-10-15T06:38:00.000+00:00', 'projectId': '610fc2f985ee0', 'teamId': '610fc2f985ee0', - 'hostname': 'appwrite.io', - 'osCode': 'Mac', - 'osName': 'Mac', - 'osVersion': 'Mac', - 'clientType': 'browser', - 'clientCode': 'CM', - 'clientName': 'Chrome Mobile iOS', - 'clientVersion': '84.0', - 'clientEngine': 'WebKit', - 'clientEngineVersion': '605.1.15', - 'deviceName': 'smartphone', - 'deviceBrand': 'Google', - 'deviceModel': 'Nexus 5', - 'countryCode': 'US', - 'countryName': 'United States',}; + 'hostname': 'appwrite.io',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await activities.getEvent( diff --git a/test/services/backups.test.js b/test/services/backups.test.js index a5e5599..46f5814 100644 --- a/test/services/backups.test.js +++ b/test/services/backups.test.js @@ -112,6 +112,7 @@ describe('Backups', () => { 'resources': [], 'retention': 7, 'schedule': '0 * * * *', + 'type': 'full', 'enabled': true,}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -138,6 +139,7 @@ describe('Backups', () => { 'resources': [], 'retention': 7, 'schedule': '0 * * * *', + 'type': 'full', 'enabled': true,}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -161,6 +163,7 @@ describe('Backups', () => { 'resources': [], 'retention': 7, 'schedule': '0 * * * *', + 'type': 'full', 'enabled': true,}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -200,7 +203,7 @@ describe('Backups', () => { 'migrationId': 'did8jx6ws45jana098ab7', 'services': [], 'resources': [], - 'options': '{databases.database[{oldId, newId, newName}]}',}; + 'options': '{databases.database[{oldId, newId, newName, newSpecification}]}',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await backups.createRestoration( @@ -241,7 +244,7 @@ describe('Backups', () => { 'migrationId': 'did8jx6ws45jana098ab7', 'services': [], 'resources': [], - 'options': '{databases.database[{oldId, newId, newName}]}',}; + 'options': '{databases.database[{oldId, newId, newName, newSpecification}]}',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await backups.getRestoration( diff --git a/test/services/health.test.js b/test/services/health.test.js deleted file mode 100644 index 3e306fe..0000000 --- a/test/services/health.test.js +++ /dev/null @@ -1,383 +0,0 @@ -const { Client } = require("../../dist/client"); -const { InputFile } = require("../../dist/inputFile"); -const { Health } = require("../../dist/services/health"); - -const { fetch: mockedFetch, Response } = require("undici"); -jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); - -describe('Health', () => { - const client = new Client(); - const health = new Health(client); - - - test('test method get()', async () => { - const data = { - 'name': 'database', - 'ping': 128, - 'status': 'pass',}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.get( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getAntivirus()', async () => { - const data = { - 'version': '1.0.0', - 'status': 'online',}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getAntivirus( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getAuditsDB()', async () => { - const data = { - 'total': 5, - 'statuses': [],}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getAuditsDB( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getCache()', async () => { - const data = { - 'total': 5, - 'statuses': [],}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getCache( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getCertificate()', async () => { - const data = { - 'name': '/CN=www.google.com', - 'subjectSN': '', - 'issuerOrganisation': '', - 'validFrom': '1704200998', - 'validTo': '1711458597', - 'signatureTypeSN': 'RSA-SHA256',}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getCertificate( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getConsolePausing()', async () => { - const data = { - 'name': 'database', - 'ping': 128, - 'status': 'pass',}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getConsolePausing( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getDB()', async () => { - const data = { - 'total': 5, - 'statuses': [],}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getDB( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getPubSub()', async () => { - const data = { - 'total': 5, - 'statuses': [],}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getPubSub( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueAudits()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueAudits( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueBuilds()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueBuilds( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueCertificates()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueCertificates( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueDatabases()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueDatabases( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueDeletes()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueDeletes( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getFailedJobs()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getFailedJobs( - 'v1-database', - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueFunctions()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueFunctions( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueLogs()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueLogs( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueMails()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueMails( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueMessaging()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueMessaging( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueMigrations()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueMigrations( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueStatsResources()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueStatsResources( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueUsage()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueUsage( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getQueueWebhooks()', async () => { - const data = { - 'size': 8,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getQueueWebhooks( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getStorage()', async () => { - const data = { - 'name': 'database', - 'ping': 128, - 'status': 'pass',}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getStorage( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getStorageLocal()', async () => { - const data = { - 'name': 'database', - 'ping': 128, - 'status': 'pass',}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getStorageLocal( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method getTime()', async () => { - const data = { - 'remoteTime': 1639490751, - 'localTime': 1639490844, - 'diff': 93,}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await health.getTime( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - }) diff --git a/test/services/messaging.test.js b/test/services/messaging.test.js index 1a08800..007688e 100644 --- a/test/services/messaging.test.js +++ b/test/services/messaging.test.js @@ -259,22 +259,6 @@ describe('Messaging', () => { expect(response).toEqual(data); }); - test('test method listMessageLogs()', async () => { - const data = { - 'total': 5, - 'logs': [],}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await messaging.listMessageLogs( - '', - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - test('test method listTargets()', async () => { const data = { 'total': 5, @@ -1019,38 +1003,6 @@ describe('Messaging', () => { expect(response).toEqual(data); }); - test('test method listProviderLogs()', async () => { - const data = { - 'total': 5, - 'logs': [],}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await messaging.listProviderLogs( - '', - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method listSubscriberLogs()', async () => { - const data = { - 'total': 5, - 'logs': [],}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await messaging.listSubscriberLogs( - '', - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - test('test method listTopics()', async () => { const data = { 'total': 5, @@ -1147,22 +1099,6 @@ describe('Messaging', () => { expect(response).toEqual(data); }); - test('test method listTopicLogs()', async () => { - const data = { - 'total': 5, - 'logs': [],}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await messaging.listTopicLogs( - '', - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - test('test method listSubscribers()', async () => { const data = { 'total': 5, diff --git a/test/services/organization.test.js b/test/services/organization.test.js index a2a6a29..69a6ea4 100644 --- a/test/services/organization.test.js +++ b/test/services/organization.test.js @@ -10,6 +10,114 @@ describe('Organization', () => { const organization = new Organization(client); + test('test method get()', async () => { + const data = { + '\$id': '5e5ea5c16897e', + '\$createdAt': '2020-10-15T06:38:00.000+00:00', + '\$updatedAt': '2020-10-15T06:38:00.000+00:00', + 'name': 'VIP', + 'total': 7, + 'prefs': {}, + 'billingBudget': 50, + 'budgetAlerts': [], + 'billingPlan': 'tier-1', + 'billingPlanId': 'tier-1', + 'billingPlanDetails': {}, + 'billingEmail': 'billing@org.example', + 'billingStartDate': '2020-10-15T06:38:00.000+00:00', + 'billingCurrentInvoiceDate': '2020-10-15T06:38:00.000+00:00', + 'billingNextInvoiceDate': '2020-10-15T06:38:00.000+00:00', + 'billingTrialStartDate': '2020-10-15T06:38:00.000+00:00', + 'billingTrialDays': 14, + 'billingAggregationId': 'adbc3de4rddfsd', + 'billingInvoiceId': 'adbc3de4rddfsd', + 'paymentMethodId': 'adbc3de4rddfsd', + 'billingAddressId': 'adbc3de4rddfsd', + 'backupPaymentMethodId': 'adbc3de4rddfsd', + 'status': 'active', + 'remarks': 'Pending initial payment', + 'agreementBAA': '', + 'programManagerName': '', + 'programManagerCalendar': '', + 'programDiscordChannelName': '', + 'programDiscordChannelUrl': '', + 'billingPlanDowngrade': 'tier-1', + 'billingTaxId': '', + 'markedForDeletion': true, + 'platform': 'imagine', + 'projects': [],}; + mockedFetch.mockImplementation(() => Response.json(data)); + + const response = await organization.get( + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); + + test('test method update()', async () => { + const data = { + '\$id': '5e5ea5c16897e', + '\$createdAt': '2020-10-15T06:38:00.000+00:00', + '\$updatedAt': '2020-10-15T06:38:00.000+00:00', + 'name': 'VIP', + 'total': 7, + 'prefs': {}, + 'billingBudget': 50, + 'budgetAlerts': [], + 'billingPlan': 'tier-1', + 'billingPlanId': 'tier-1', + 'billingPlanDetails': {}, + 'billingEmail': 'billing@org.example', + 'billingStartDate': '2020-10-15T06:38:00.000+00:00', + 'billingCurrentInvoiceDate': '2020-10-15T06:38:00.000+00:00', + 'billingNextInvoiceDate': '2020-10-15T06:38:00.000+00:00', + 'billingTrialStartDate': '2020-10-15T06:38:00.000+00:00', + 'billingTrialDays': 14, + 'billingAggregationId': 'adbc3de4rddfsd', + 'billingInvoiceId': 'adbc3de4rddfsd', + 'paymentMethodId': 'adbc3de4rddfsd', + 'billingAddressId': 'adbc3de4rddfsd', + 'backupPaymentMethodId': 'adbc3de4rddfsd', + 'status': 'active', + 'remarks': 'Pending initial payment', + 'agreementBAA': '', + 'programManagerName': '', + 'programManagerCalendar': '', + 'programDiscordChannelName': '', + 'programDiscordChannelUrl': '', + 'billingPlanDowngrade': 'tier-1', + 'billingTaxId': '', + 'markedForDeletion': true, + 'platform': 'imagine', + 'projects': [],}; + mockedFetch.mockImplementation(() => Response.json(data)); + + const response = await organization.update( + '', + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); + + test('test method delete()', async () => { + const data = {message: ""}; + mockedFetch.mockImplementation(() => Response.json(data)); + + const response = await organization.delete( + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); + test('test method listKeys()', async () => { const data = { 'total': 5, @@ -112,6 +220,123 @@ describe('Organization', () => { expect(response).toEqual(data); }); + test('test method listMemberships()', async () => { + const data = { + 'total': 5, + 'memberships': [],}; + mockedFetch.mockImplementation(() => Response.json(data)); + + const response = await organization.listMemberships( + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); + + test('test method createMembership()', async () => { + const data = { + '\$id': '5e5ea5c16897e', + '\$createdAt': '2020-10-15T06:38:00.000+00:00', + '\$updatedAt': '2020-10-15T06:38:00.000+00:00', + 'userId': '5e5ea5c16897e', + 'userName': 'John Doe', + 'userEmail': 'john@appwrite.io', + 'userPhone': '+1 555 555 5555', + 'teamId': '5e5ea5c16897e', + 'teamName': 'VIP', + 'invited': '2020-10-15T06:38:00.000+00:00', + 'joined': '2020-10-15T06:38:00.000+00:00', + 'confirm': true, + 'mfa': true, + 'userAccessedAt': '2020-10-15T06:38:00.000+00:00', + 'roles': [],}; + mockedFetch.mockImplementation(() => Response.json(data)); + + const response = await organization.createMembership( + [], + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); + + test('test method getMembership()', async () => { + const data = { + '\$id': '5e5ea5c16897e', + '\$createdAt': '2020-10-15T06:38:00.000+00:00', + '\$updatedAt': '2020-10-15T06:38:00.000+00:00', + 'userId': '5e5ea5c16897e', + 'userName': 'John Doe', + 'userEmail': 'john@appwrite.io', + 'userPhone': '+1 555 555 5555', + 'teamId': '5e5ea5c16897e', + 'teamName': 'VIP', + 'invited': '2020-10-15T06:38:00.000+00:00', + 'joined': '2020-10-15T06:38:00.000+00:00', + 'confirm': true, + 'mfa': true, + 'userAccessedAt': '2020-10-15T06:38:00.000+00:00', + 'roles': [],}; + mockedFetch.mockImplementation(() => Response.json(data)); + + const response = await organization.getMembership( + '', + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); + + test('test method updateMembership()', async () => { + const data = { + '\$id': '5e5ea5c16897e', + '\$createdAt': '2020-10-15T06:38:00.000+00:00', + '\$updatedAt': '2020-10-15T06:38:00.000+00:00', + 'userId': '5e5ea5c16897e', + 'userName': 'John Doe', + 'userEmail': 'john@appwrite.io', + 'userPhone': '+1 555 555 5555', + 'teamId': '5e5ea5c16897e', + 'teamName': 'VIP', + 'invited': '2020-10-15T06:38:00.000+00:00', + 'joined': '2020-10-15T06:38:00.000+00:00', + 'confirm': true, + 'mfa': true, + 'userAccessedAt': '2020-10-15T06:38:00.000+00:00', + 'roles': [],}; + mockedFetch.mockImplementation(() => Response.json(data)); + + const response = await organization.updateMembership( + '', + [], + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); + + test('test method deleteMembership()', async () => { + const data = {message: ""}; + mockedFetch.mockImplementation(() => Response.json(data)); + + const response = await organization.deleteMembership( + '', + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); + test('test method listProjects()', async () => { const data = { 'total': 5, @@ -144,31 +369,18 @@ describe('Organization', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await organization.createProject( @@ -199,31 +411,18 @@ describe('Organization', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await organization.getProject( @@ -253,31 +452,18 @@ describe('Organization', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await organization.updateProject( diff --git a/test/services/project.test.js b/test/services/project.test.js index d644e0d..48aaf8e 100644 --- a/test/services/project.test.js +++ b/test/services/project.test.js @@ -27,31 +27,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.get( @@ -93,31 +80,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateAuthMethod( @@ -274,31 +248,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateLabels( @@ -428,31 +389,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateOAuth2Server( @@ -502,6 +450,23 @@ describe('Project', () => { expect(response).toEqual(data); }); + test('test method updateOAuth2Appwrite()', async () => { + const data = { + '\$id': 'github', + 'enabled': true, + 'clientId': '6a42000000000000b5a0', + 'clientSecret': 'b86afd000000000000000000000000000000000000000000000000000ced5f93',}; + mockedFetch.mockImplementation(() => Response.json(data)); + + const response = await project.updateOAuth2Appwrite( + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); + test('test method updateOAuth2Auth0()', async () => { const data = { '\$id': 'github', @@ -893,7 +858,8 @@ describe('Project', () => { 'wellKnownURL': 'https://myoauth.com/.well-known/openid-configuration', 'authorizationURL': 'https://myoauth.com/oauth2/authorize', 'tokenURL': 'https://myoauth.com/oauth2/token', - 'userInfoURL': 'https://myoauth.com/oauth2/userinfo',}; + 'userInfoURL': 'https://myoauth.com/oauth2/userinfo', + 'prompt': [],}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateOAuth2Oidc( @@ -1516,31 +1482,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateDenyAliasedEmailPolicy( @@ -1553,6 +1506,47 @@ describe('Project', () => { expect(response).toEqual(data); }); + test('test method updateDenyCorporateEmailPolicy()', async () => { + const data = { + '\$id': '5e5ea5c16897e', + '\$createdAt': '2020-10-15T06:38:00.000+00:00', + '\$updatedAt': '2020-10-15T06:38:00.000+00:00', + 'name': 'New Project', + 'teamId': '1592981250', + 'region': 'fra', + 'devKeys': [], + 'smtpEnabled': true, + 'smtpSenderName': 'John Appwrite', + 'smtpSenderEmail': 'john@appwrite.io', + 'smtpReplyToName': 'Support Team', + 'smtpReplyToEmail': 'support@appwrite.io', + 'smtpHost': 'mail.appwrite.io', + 'smtpPort': 25, + 'smtpUsername': 'emailuser', + 'smtpPassword': 'smtp-password', + 'smtpSecure': 'tls', + 'pingCount': 1, + 'pingedAt': '2020-10-15T06:38:00.000+00:00', + 'labels': [], + 'status': 'active', + 'onboarding': {}, + 'authMethods': [], + 'services': [], + 'protocols': [], + 'blocks': [], + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; + mockedFetch.mockImplementation(() => Response.json(data)); + + const response = await project.updateDenyCorporateEmailPolicy( + true, + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); + test('test method updateDenyDisposableEmailPolicy()', async () => { const data = { '\$id': '5e5ea5c16897e', @@ -1570,31 +1564,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateDenyDisposableEmailPolicy( @@ -1624,31 +1605,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateDenyFreeEmailPolicy( @@ -1678,31 +1646,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateMembershipPrivacyPolicy( @@ -1731,31 +1686,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updatePasswordDictionaryPolicy( @@ -1785,31 +1727,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updatePasswordHistoryPolicy( @@ -1839,31 +1768,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updatePasswordPersonalDataPolicy( @@ -1912,31 +1828,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateSessionAlertPolicy( @@ -1966,31 +1869,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateSessionDurationPolicy( @@ -2020,31 +1910,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateSessionInvalidationPolicy( @@ -2074,31 +1951,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateSessionLimitPolicy( @@ -2128,31 +1992,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateUserLimitPolicy( @@ -2198,31 +2049,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateProtocol( @@ -2253,31 +2091,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateService( @@ -2308,31 +2133,18 @@ describe('Project', () => { 'smtpHost': 'mail.appwrite.io', 'smtpPort': 25, 'smtpUsername': 'emailuser', - 'smtpPassword': '', + 'smtpPassword': 'smtp-password', 'smtpSecure': 'tls', 'pingCount': 1, 'pingedAt': '2020-10-15T06:38:00.000+00:00', 'labels': [], 'status': 'active', + 'onboarding': {}, 'authMethods': [], 'services': [], 'protocols': [], 'blocks': [], - 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00', - 'oAuth2ServerEnabled': true, - 'oAuth2ServerAuthorizationUrl': 'https://cloud.appwrite.io/oauth2/.well-known/openid-configuration', - 'oAuth2ServerScopes': [], - 'oAuth2ServerAuthorizationDetailsTypes': [], - 'oAuth2ServerAccessTokenDuration': 3600, - 'oAuth2ServerRefreshTokenDuration': 86400, - 'oAuth2ServerPublicAccessTokenDuration': 3600, - 'oAuth2ServerPublicRefreshTokenDuration': 2592000, - 'oAuth2ServerConfidentialPkce': true, - 'oAuth2ServerVerificationUrl': 'https://cloud.appwrite.io/device', - 'oAuth2ServerUserCodeLength': 8, - 'oAuth2ServerUserCodeFormat': 'alphanumeric', - 'oAuth2ServerDeviceCodeDuration': 600, - 'oAuth2ServerDiscoveryUrl': 'https://auth.example.com/.well-known/openid-configuration',}; + 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); const response = await project.updateSMTP( diff --git a/test/services/usage.test.js b/test/services/usage.test.js deleted file mode 100644 index 44efb8e..0000000 --- a/test/services/usage.test.js +++ /dev/null @@ -1,42 +0,0 @@ -const { Client } = require("../../dist/client"); -const { InputFile } = require("../../dist/inputFile"); -const { Usage } = require("../../dist/services/usage"); - -const { fetch: mockedFetch, Response } = require("undici"); -jest.mock('undici', () => ({ ...jest.requireActual('undici'), fetch: jest.fn() })); - -describe('Usage', () => { - const client = new Client(); - const usage = new Usage(client); - - - test('test method listEvents()', async () => { - const data = { - 'total': 5, - 'events': [],}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await usage.listEvents( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - - test('test method listGauges()', async () => { - const data = { - 'total': 5, - 'gauges': [],}; - mockedFetch.mockImplementation(() => Response.json(data)); - - const response = await usage.listGauges( - ); - - // Remove custom toString method on the objects to allow for clean data comparison. - delete response.toString; - - expect(response).toEqual(data); - }); - }) diff --git a/test/services/users.test.js b/test/services/users.test.js index 7513e57..f9ea2b1 100644 --- a/test/services/users.test.js +++ b/test/services/users.test.js @@ -771,7 +771,7 @@ describe('Users', () => { const response = await users.updatePassword( '', - '', + 'password', ); // Remove custom toString method on the objects to allow for clean data comparison. diff --git a/test/services/webhooks.test.js b/test/services/webhooks.test.js index 7fb1338..46382da 100644 --- a/test/services/webhooks.test.js +++ b/test/services/webhooks.test.js @@ -35,7 +35,7 @@ describe('Webhooks', () => { 'events': [], 'tls': true, 'authUsername': 'username', - 'authPassword': 'password', + 'authPassword': 'webhook-password', 'secret': 'ad3d581ca230e2b7059c545e5a', 'enabled': true, 'logs': 'Failed to connect to remote server.', @@ -65,7 +65,7 @@ describe('Webhooks', () => { 'events': [], 'tls': true, 'authUsername': 'username', - 'authPassword': 'password', + 'authPassword': 'webhook-password', 'secret': 'ad3d581ca230e2b7059c545e5a', 'enabled': true, 'logs': 'Failed to connect to remote server.', @@ -92,7 +92,7 @@ describe('Webhooks', () => { 'events': [], 'tls': true, 'authUsername': 'username', - 'authPassword': 'password', + 'authPassword': 'webhook-password', 'secret': 'ad3d581ca230e2b7059c545e5a', 'enabled': true, 'logs': 'Failed to connect to remote server.', @@ -136,7 +136,7 @@ describe('Webhooks', () => { 'events': [], 'tls': true, 'authUsername': 'username', - 'authPassword': 'password', + 'authPassword': 'webhook-password', 'secret': 'ad3d581ca230e2b7059c545e5a', 'enabled': true, 'logs': 'Failed to connect to remote server.', From c2a4f04053ac013fcfae4e12b73b7b4c8d1df147 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 13 Jul 2026 12:10:38 +0530 Subject: [PATCH 3/4] chore: update Node.js SDK to 27.0.0 --- src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 4fb7ac6..960612e 100644 --- a/src/client.ts +++ b/src/client.ts @@ -256,7 +256,7 @@ class Client { * @return {this} */ setBearer(value: string): this { - this.headers['Authorization'] = value; + this.headers['Authorization'] = `Bearer ${value}`; this.config.bearer = value; return this; } From 5b3431bdeac005883f5fc655a3006641aa4b729a Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 13 Jul 2026 13:17:33 +0530 Subject: [PATCH 4/4] (fix): remove duplicate Project model properties from merge --- src/models.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/models.ts b/src/models.ts index 448a4e3..5e56cfa 100644 --- a/src/models.ts +++ b/src/models.ts @@ -4335,10 +4335,6 @@ export namespace Models { * OAuth2 server accepted RFC 9396 authorization_details types */ oAuth2ServerAuthorizationDetailsTypes?: string[]; - /** - * OAuth2 server accepted RFC 9396 authorization_details types - */ - oAuth2ServerAuthorizationDetailsTypes: string[]; /** * OAuth2 server access token duration in seconds for confidential clients */ @@ -4375,22 +4371,6 @@ export namespace Models { * Lifetime in seconds of device flow device codes and user codes. */ oAuth2ServerDeviceCodeDuration?: number; - /** - * URL to your application page where users enter the device flow user code. Empty when the Device Authorization Grant is not configured. - */ - oAuth2ServerVerificationUrl: string; - /** - * Number of characters in the device flow user code, excluding the formatting separator. - */ - oAuth2ServerUserCodeLength: number; - /** - * Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`. - */ - oAuth2ServerUserCodeFormat: string; - /** - * Lifetime in seconds of device flow device codes and user codes. - */ - oAuth2ServerDeviceCodeDuration: number; /** * OAuth2 server discovery URL */