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();