diff --git a/app/config/frameworks.php b/app/config/frameworks.php index d224a6e170..6078c53c63 100644 --- a/app/config/frameworks.php +++ b/app/config/frameworks.php @@ -8,20 +8,13 @@ use Utopia\Config\Config; $templateRuntimes = Config::getParam('template-runtimes'); -function getVersions(array $versions, string $prefix) -{ - return array_map(function ($version) use ($prefix) { - return $prefix . '-' . $version; - }, $versions); -} - return [ 'analog' => [ 'key' => 'analog', 'name' => 'Analog', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'bundleCommand' => 'bash /usr/local/server/helpers/analog/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/analog/env.sh', 'adapters' => [ @@ -47,7 +40,7 @@ return [ 'name' => 'Angular', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'bundleCommand' => 'bash /usr/local/server/helpers/angular/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/angular/env.sh', 'adapters' => [ @@ -73,7 +66,7 @@ return [ 'name' => 'Next.js', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'bundleCommand' => 'bash /usr/local/server/helpers/next-js/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/next-js/env.sh', 'adapters' => [ @@ -98,7 +91,7 @@ return [ 'name' => 'React', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'adapters' => [ 'static' => [ 'key' => 'static', @@ -115,7 +108,7 @@ return [ 'name' => 'Nuxt', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'bundleCommand' => 'bash /usr/local/server/helpers/nuxt/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/nuxt/env.sh', 'adapters' => [ @@ -140,7 +133,7 @@ return [ 'name' => 'Vue.js', 'screenshotSleep' => 5000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'adapters' => [ 'static' => [ 'key' => 'static', @@ -157,7 +150,7 @@ return [ 'name' => 'SvelteKit', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'bundleCommand' => 'bash /usr/local/server/helpers/sveltekit/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/sveltekit/env.sh', 'adapters' => [ @@ -182,7 +175,7 @@ return [ 'name' => 'Astro', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'bundleCommand' => 'bash /usr/local/server/helpers/astro/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/astro/env.sh', 'adapters' => [ @@ -207,7 +200,7 @@ return [ 'name' => 'TanStack Start', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'bundleCommand' => 'bash /usr/local/server/helpers/tanstack-start/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/tanstack-start/env.sh', 'adapters' => [ @@ -232,7 +225,7 @@ return [ 'name' => 'Remix', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'bundleCommand' => 'bash /usr/local/server/helpers/remix/bundle.sh', 'envCommand' => 'source /usr/local/server/helpers/remix/env.sh', 'adapters' => [ @@ -257,7 +250,7 @@ return [ 'name' => 'Lynx', 'screenshotSleep' => 5000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'adapters' => [ 'static' => [ 'key' => 'static', @@ -274,7 +267,7 @@ return [ 'name' => 'Flutter', 'screenshotSleep' => 5000, 'buildRuntime' => 'flutter-3.35', - 'runtimes' => getVersions($templateRuntimes['FLUTTER']['versions'], 'flutter'), + 'runtimes' => $templateRuntimes['FLUTTER'], 'adapters' => [ 'static' => [ 'key' => 'static', @@ -291,7 +284,7 @@ return [ 'name' => 'React Native', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'adapters' => [ 'static' => [ 'key' => 'static', @@ -308,7 +301,7 @@ return [ 'name' => 'Vite', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'adapters' => [ 'static' => [ 'key' => 'static', @@ -324,7 +317,7 @@ return [ 'name' => 'Other', 'screenshotSleep' => 3000, 'buildRuntime' => 'node-22', - 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'runtimes' => $templateRuntimes['NODE'], 'adapters' => [ 'static' => [ 'key' => 'static', diff --git a/app/config/platforms.php b/app/config/platforms.php index ceb05235d3..b8b66efa39 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -11,7 +11,7 @@ return [ [ 'key' => 'web', 'name' => 'Web', - 'version' => '21.4.0', + 'version' => '21.5.0', 'url' => 'https://github.com/appwrite/sdk-for-web', 'package' => 'https://www.npmjs.com/package/appwrite', 'enabled' => true, @@ -79,7 +79,7 @@ return [ [ 'key' => 'apple', 'name' => 'Apple', - 'version' => '13.4.0', + 'version' => '13.5.0', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -116,7 +116,7 @@ return [ [ 'key' => 'android', 'name' => 'Android', - 'version' => '11.3.0', + 'version' => '11.4.0', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -139,7 +139,7 @@ return [ [ 'key' => 'react-native', 'name' => 'React Native', - 'version' => '0.18.0', + 'version' => '0.19.0', 'url' => 'https://github.com/appwrite/sdk-for-react-native', 'package' => 'https://npmjs.com/package/react-native-appwrite', 'enabled' => true, @@ -226,7 +226,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '12.0.0', + 'version' => '12.0.1', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -262,7 +262,7 @@ return [ [ 'key' => 'nodejs', 'name' => 'Node.js', - 'version' => '20.3.0', + 'version' => '21.0.0', 'url' => 'https://github.com/appwrite/sdk-for-node', 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, @@ -281,7 +281,7 @@ return [ [ 'key' => 'php', 'name' => 'PHP', - 'version' => '18.0.1', + 'version' => '19.0.0', 'url' => 'https://github.com/appwrite/sdk-for-php', 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, @@ -300,7 +300,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '13.6.1', + 'version' => '14.0.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -319,7 +319,7 @@ return [ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '19.3.0', + 'version' => '20.0.0', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -338,7 +338,7 @@ return [ [ 'key' => 'go', 'name' => 'Go', - 'version' => 'v0.14.0', + 'version' => 'v0.15.0', 'url' => 'https://github.com/appwrite/sdk-for-go', 'package' => 'https://github.com/appwrite/sdk-for-go', 'enabled' => true, @@ -357,7 +357,7 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.22.0', + 'version' => '0.23.0', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, @@ -376,7 +376,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '19.4.0', + 'version' => '20.0.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, @@ -395,7 +395,7 @@ return [ [ 'key' => 'kotlin', 'name' => 'Kotlin', - 'version' => '12.3.0', + 'version' => '13.0.0', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, @@ -418,7 +418,7 @@ return [ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '13.3.0', + 'version' => '14.0.0', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index 9adb21d960..5d645ac86e 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -258,7 +258,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -328,7 +328,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -517,7 +517,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -587,7 +587,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -707,7 +707,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -843,7 +843,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -939,7 +939,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -963,7 +963,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1091,7 +1091,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1225,7 +1225,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1322,7 +1322,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1417,7 +1417,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1512,7 +1512,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -2918,7 +2918,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -2997,7 +2997,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3068,7 +3068,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -3879,7 +3879,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4005,7 +4005,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4137,7 +4137,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4195,7 +4195,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4683,7 +4683,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4765,7 +4765,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4857,7 +4857,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4949,7 +4949,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -4993,7 +4993,7 @@ "required": false, "schema": { "type": "object", - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "default": {} }, "in": "query" @@ -5005,7 +5005,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280 }, "in": "query" @@ -5017,7 +5017,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720 }, "in": "query" @@ -5029,7 +5029,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1 }, "in": "query" @@ -5040,7 +5040,7 @@ "required": false, "schema": { "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -5057,7 +5057,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "" }, "in": "query" @@ -5068,7 +5068,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -5079,7 +5079,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "en-US", "default": "" }, "in": "query" @@ -5090,7 +5090,7 @@ "required": false, "schema": { "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5525,7 +5525,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0 }, "in": "query" @@ -5537,7 +5537,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0 }, "in": "query" @@ -5549,7 +5549,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0 }, "in": "query" @@ -5560,7 +5560,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -5572,8 +5572,33 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [] }, "in": "query" @@ -5585,7 +5610,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0 }, "in": "query" @@ -5597,7 +5622,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0 }, "in": "query" @@ -5609,7 +5634,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0 }, "in": "query" @@ -5621,7 +5646,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1 }, "in": "query" @@ -5632,7 +5657,7 @@ "required": false, "schema": { "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -7370,7 +7395,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -7422,7 +7447,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -7474,7 +7499,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -7526,7 +7551,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -7578,7 +7603,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -7630,7 +7655,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -7682,7 +7707,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -7734,7 +7759,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -7786,7 +7811,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -7838,7 +7863,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -7890,7 +7915,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -7973,7 +7998,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -8048,7 +8073,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -8145,7 +8170,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -8244,7 +8269,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -8316,7 +8341,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -8407,7 +8432,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -8474,7 +8499,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -8552,7 +8577,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -8780,7 +8805,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -10281,7 +10306,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -10368,7 +10393,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -10453,7 +10478,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -10515,7 +10540,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -10589,7 +10614,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -10653,7 +10678,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -10750,7 +10775,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -10814,7 +10839,14 @@ "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -10861,7 +10893,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -10933,7 +10965,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -10992,7 +11024,14 @@ "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -11020,7 +11059,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -11094,7 +11133,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -11192,7 +11231,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -11253,7 +11292,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 365f926685..e6a6bdfee5 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -295,7 +295,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -364,7 +364,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -551,7 +551,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -620,7 +620,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -739,7 +739,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -874,7 +874,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -969,7 +969,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -993,7 +993,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1121,7 +1121,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1254,7 +1254,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1350,7 +1350,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1444,7 +1444,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1538,7 +1538,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -2930,7 +2930,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3008,7 +3008,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3078,7 +3078,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -3884,7 +3884,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4010,7 +4010,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4142,7 +4142,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4200,7 +4200,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4688,7 +4688,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4770,7 +4770,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4862,7 +4862,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4954,7 +4954,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -4998,7 +4998,7 @@ "required": false, "schema": { "type": "object", - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "default": {} }, "in": "query" @@ -5010,7 +5010,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280 }, "in": "query" @@ -5022,7 +5022,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720 }, "in": "query" @@ -5034,7 +5034,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1 }, "in": "query" @@ -5045,7 +5045,7 @@ "required": false, "schema": { "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -5062,7 +5062,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "" }, "in": "query" @@ -5073,7 +5073,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -5084,7 +5084,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "en-US", "default": "" }, "in": "query" @@ -5095,7 +5095,7 @@ "required": false, "schema": { "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5530,7 +5530,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0 }, "in": "query" @@ -5542,7 +5542,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0 }, "in": "query" @@ -5554,7 +5554,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0 }, "in": "query" @@ -5565,7 +5565,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -5577,8 +5577,33 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [] }, "in": "query" @@ -5590,7 +5615,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0 }, "in": "query" @@ -5602,7 +5627,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0 }, "in": "query" @@ -5614,7 +5639,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0 }, "in": "query" @@ -5626,7 +5651,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1 }, "in": "query" @@ -5637,7 +5662,7 @@ "required": false, "schema": { "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -5673,7 +5698,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 253, + "weight": 243, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -5808,7 +5833,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 252, + "weight": 242, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -7071,6 +7096,22 @@ "type": "boolean", "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -12379,7 +12420,13 @@ "description": "Array of index orders. Maximum of 100 orders are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -13239,7 +13286,66 @@ "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -13437,7 +13543,78 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-ml-3.11", + "python-ml-3.12", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "go-1.23", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [] }, @@ -13450,7 +13627,17 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "dev-tools", + "starter", + "databases", + "ai", + "messaging", + "utilities" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [] }, @@ -13882,7 +14069,66 @@ "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -15663,7 +15909,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -15715,7 +15961,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -15767,7 +16013,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -15816,7 +16062,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -15865,7 +16111,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -15914,7 +16160,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -15974,7 +16220,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -16023,7 +16269,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -16072,7 +16318,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -16134,7 +16380,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -16196,7 +16442,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -16269,7 +16515,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -16331,7 +16577,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -16419,7 +16665,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -16481,7 +16727,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -16543,7 +16789,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -16605,7 +16851,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -16667,7 +16913,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -16729,7 +16975,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -16791,7 +17037,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -16853,7 +17099,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -16915,7 +17161,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -16964,7 +17210,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -17013,7 +17259,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -17062,7 +17308,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -17114,7 +17360,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -17166,7 +17412,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -17218,7 +17464,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -17270,7 +17516,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -17322,7 +17568,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -17374,7 +17620,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -17426,7 +17672,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -17478,7 +17724,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -17565,7 +17811,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -17710,7 +17956,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -17867,7 +18113,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18043,7 +18289,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18239,7 +18485,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18417,7 +18663,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -18601,7 +18847,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -18654,7 +18900,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -18716,7 +18962,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -18802,7 +19048,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -18888,7 +19134,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -18975,7 +19221,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19151,7 +19397,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19329,7 +19575,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19478,7 +19724,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19628,7 +19874,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19745,7 +19991,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -19865,7 +20111,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -19961,7 +20207,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -20060,7 +20306,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -20166,7 +20412,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -20275,7 +20521,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20381,7 +20627,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20490,7 +20736,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20718,7 +20964,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20946,7 +21192,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21042,7 +21288,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21141,7 +21387,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21237,7 +21483,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21336,7 +21582,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21432,7 +21678,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21531,7 +21777,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21627,7 +21873,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21726,7 +21972,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21779,7 +22025,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21841,7 +22087,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21927,7 +22173,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -22013,7 +22259,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22098,7 +22344,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22181,7 +22427,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22241,7 +22487,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22320,7 +22566,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22382,7 +22628,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22468,7 +22714,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22563,7 +22809,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22653,7 +22899,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22716,7 +22962,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22791,7 +23037,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 260, + "weight": 250, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -22876,7 +23122,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 254, + "weight": 244, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -22909,7 +23155,27 @@ "description": "List of resources to migrate", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file", + "function", + "deployment", + "environment-variable" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "endpoint": { @@ -22964,7 +23230,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 262, + "weight": 252, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -22994,7 +23260,27 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file", + "function", + "deployment", + "environment-variable" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "in": "query" @@ -23057,7 +23343,7 @@ "x-appwrite": { "method": "createCSVExport", "group": null, - "weight": 259, + "weight": 249, "cookies": false, "type": "", "demo": "migrations\/create-csv-export.md", @@ -23171,7 +23457,7 @@ "x-appwrite": { "method": "createCSVImport", "group": null, - "weight": 258, + "weight": 248, "cookies": false, "type": "", "demo": "migrations\/create-csv-import.md", @@ -23255,7 +23541,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 255, + "weight": 245, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -23288,7 +23574,21 @@ "description": "List of resources to migrate", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "serviceAccount": { @@ -23331,7 +23631,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 263, + "weight": 253, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -23361,7 +23661,21 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "in": "query" @@ -23403,7 +23717,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 257, + "weight": 247, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -23436,7 +23750,22 @@ "description": "List of resources to migrate", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "subdomain": { @@ -23514,7 +23843,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 265, + "weight": 255, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -23544,7 +23873,22 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "in": "query" @@ -23647,7 +23991,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 256, + "weight": 246, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -23680,7 +24024,22 @@ "description": "List of resources to migrate", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "endpoint": { @@ -23752,7 +24111,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 264, + "weight": 254, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -23782,7 +24141,22 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "in": "query" @@ -23876,7 +24250,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 261, + "weight": 251, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -23934,7 +24308,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 266, + "weight": 256, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -23985,7 +24359,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 267, + "weight": 257, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -24045,7 +24419,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 149, + "weight": 139, "cookies": false, "type": "", "demo": "project\/get-usage.md", @@ -24133,7 +24507,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 151, + "weight": 141, "cookies": false, "type": "", "demo": "project\/list-variables.md", @@ -24179,7 +24553,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 150, + "weight": 140, "cookies": false, "type": "", "demo": "project\/create-variable.md", @@ -24257,7 +24631,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 152, + "weight": 142, "cookies": false, "type": "", "demo": "project\/get-variable.md", @@ -24315,7 +24689,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 153, + "weight": 143, "cookies": false, "type": "", "demo": "project\/update-variable.md", @@ -24397,7 +24771,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 154, + "weight": 144, "cookies": false, "type": "", "demo": "project\/delete-variable.md", @@ -24540,7 +24914,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 103, + "weight": 93, "cookies": false, "type": "", "demo": "projects\/create.md", @@ -24674,7 +25048,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 104, + "weight": 94, "cookies": false, "type": "", "demo": "projects\/get.md", @@ -24732,7 +25106,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 105, + "weight": 95, "cookies": false, "type": "", "demo": "projects\/update.md", @@ -24847,7 +25221,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 122, + "weight": 112, "cookies": false, "type": "", "demo": "projects\/delete.md", @@ -24907,7 +25281,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 109, + "weight": 99, "cookies": false, "type": "", "demo": "projects\/update-api-status.md", @@ -25061,7 +25435,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 110, + "weight": 100, "cookies": false, "type": "", "demo": "projects\/update-api-status-all.md", @@ -25198,7 +25572,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 115, + "weight": 105, "cookies": false, "type": "", "demo": "projects\/update-auth-duration.md", @@ -25277,7 +25651,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 114, + "weight": 104, "cookies": false, "type": "", "demo": "projects\/update-auth-limit.md", @@ -25356,7 +25730,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 120, + "weight": 110, "cookies": false, "type": "", "demo": "projects\/update-auth-sessions-limit.md", @@ -25435,7 +25809,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 113, + "weight": 103, "cookies": false, "type": "", "demo": "projects\/update-memberships-privacy.md", @@ -25526,7 +25900,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 121, + "weight": 111, "cookies": false, "type": "", "demo": "projects\/update-mock-numbers.md", @@ -25608,7 +25982,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 118, + "weight": 108, "cookies": false, "type": "", "demo": "projects\/update-auth-password-dictionary.md", @@ -25687,7 +26061,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 117, + "weight": 107, "cookies": false, "type": "", "demo": "projects\/update-auth-password-history.md", @@ -25766,7 +26140,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 119, + "weight": 109, "cookies": false, "type": "", "demo": "projects\/update-personal-data-check.md", @@ -25845,7 +26219,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 112, + "weight": 102, "cookies": false, "type": "", "demo": "projects\/update-session-alerts.md", @@ -25924,7 +26298,7 @@ "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", - "weight": 148, + "weight": 138, "cookies": false, "type": "", "demo": "projects\/update-session-invalidation.md", @@ -26003,7 +26377,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 116, + "weight": 106, "cookies": false, "type": "", "demo": "projects\/update-auth-status.md", @@ -26483,7 +26857,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 134, + "weight": 124, "cookies": false, "type": "", "demo": "projects\/create-jwt.md", @@ -26528,7 +26902,66 @@ "description": "List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "duration": { @@ -26570,7 +27003,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 130, + "weight": 120, "cookies": false, "type": "", "demo": "projects\/list-keys.md", @@ -26639,7 +27072,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 129, + "weight": 119, "cookies": false, "type": "", "demo": "projects\/create-key.md", @@ -26689,7 +27122,66 @@ "description": "Key scopes list. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "x-nullable": true }, @@ -26734,7 +27226,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 131, + "weight": 121, "cookies": false, "type": "", "demo": "projects\/get-key.md", @@ -26802,7 +27294,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 132, + "weight": 122, "cookies": false, "type": "", "demo": "projects\/update-key.md", @@ -26862,7 +27354,66 @@ "description": "Key scopes list. Maximum of 100 events are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "x-nullable": true }, @@ -26898,7 +27449,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 133, + "weight": 123, "cookies": false, "type": "", "demo": "projects\/delete-key.md", @@ -26968,7 +27519,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 111, + "weight": 101, "cookies": false, "type": "", "demo": "projects\/update-o-auth-2.md", @@ -27109,7 +27660,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 136, + "weight": 126, "cookies": false, "type": "", "demo": "projects\/list-platforms.md", @@ -27178,7 +27729,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 135, + "weight": 125, "cookies": false, "type": "", "demo": "projects\/create-platform.md", @@ -27297,7 +27848,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 137, + "weight": 127, "cookies": false, "type": "", "demo": "projects\/get-platform.md", @@ -27365,7 +27916,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 138, + "weight": 128, "cookies": false, "type": "", "demo": "projects\/update-platform.md", @@ -27460,7 +28011,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 139, + "weight": 129, "cookies": false, "type": "", "demo": "projects\/delete-platform.md", @@ -27530,7 +28081,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 107, + "weight": 97, "cookies": false, "type": "", "demo": "projects\/update-service-status.md", @@ -27632,7 +28183,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 108, + "weight": 98, "cookies": false, "type": "", "demo": "projects\/update-service-status-all.md", @@ -27711,7 +28262,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 140, + "weight": 130, "cookies": false, "type": "", "demo": "projects\/update-smtp.md", @@ -27903,7 +28454,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 141, + "weight": 131, "cookies": false, "type": "", "demo": "projects\/create-smtp-test.md", @@ -28112,7 +28663,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 106, + "weight": 96, "cookies": false, "type": "", "demo": "projects\/update-team.md", @@ -28191,7 +28742,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 143, + "weight": 133, "cookies": false, "type": "", "demo": "projects\/get-email-template.md", @@ -28415,7 +28966,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 145, + "weight": 135, "cookies": false, "type": "", "demo": "projects\/update-email-template.md", @@ -28679,7 +29230,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 147, + "weight": 137, "cookies": false, "type": "", "demo": "projects\/delete-email-template.md", @@ -28905,7 +29456,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 142, + "weight": 132, "cookies": false, "type": "", "demo": "projects\/get-sms-template.md", @@ -29188,7 +29739,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 144, + "weight": 134, "cookies": false, "type": "", "demo": "projects\/update-sms-template.md", @@ -29494,7 +30045,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 146, + "weight": 136, "cookies": false, "type": "", "demo": "projects\/delete-sms-template.md", @@ -29779,7 +30330,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 124, + "weight": 114, "cookies": false, "type": "", "demo": "projects\/list-webhooks.md", @@ -29848,7 +30399,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 123, + "weight": 113, "cookies": false, "type": "", "demo": "projects\/create-webhook.md", @@ -29963,7 +30514,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 125, + "weight": 115, "cookies": false, "type": "", "demo": "projects\/get-webhook.md", @@ -30031,7 +30582,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 126, + "weight": 116, "cookies": false, "type": "", "demo": "projects\/update-webhook.md", @@ -30147,7 +30698,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 128, + "weight": 118, "cookies": false, "type": "", "demo": "projects\/delete-webhook.md", @@ -30217,7 +30768,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 127, + "weight": 117, "cookies": false, "type": "", "demo": "projects\/update-webhook-signature.md", @@ -31344,7 +31895,26 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [] }, @@ -31357,7 +31927,17 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "dev-tools", + "starter", + "databases", + "ai", + "messaging", + "utilities" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [] }, @@ -33456,7 +34036,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -33540,7 +34120,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -33673,7 +34253,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -33732,7 +34312,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -33862,7 +34442,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -33923,7 +34503,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -34020,7 +34600,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -34119,7 +34699,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -34191,7 +34771,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -34282,7 +34862,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -34349,7 +34929,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -34427,7 +35007,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -34655,7 +35235,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -34740,7 +35320,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 169, + "weight": 159, "cookies": false, "type": "", "demo": "storage\/get-usage.md", @@ -34812,7 +35392,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 170, + "weight": 160, "cookies": false, "type": "", "demo": "storage\/get-bucket-usage.md", @@ -35955,6 +36535,22 @@ "type": "boolean", "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -39763,7 +40359,13 @@ "description": "Array of index orders. Maximum of 100 orders are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -41692,7 +42294,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -41779,7 +42381,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -41864,7 +42466,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -41926,7 +42528,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -42000,7 +42602,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -42064,7 +42666,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 184, + "weight": 174, "cookies": false, "type": "", "demo": "teams\/list-logs.md", @@ -42148,7 +42750,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -42245,7 +42847,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -42309,7 +42911,14 @@ "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -42356,7 +42965,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -42428,7 +43037,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -42487,7 +43096,14 @@ "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -42515,7 +43131,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -42589,7 +43205,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -42686,7 +43302,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -42746,7 +43362,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -43202,7 +43818,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -43286,7 +43902,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -43376,7 +43992,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -43461,7 +44077,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -43546,7 +44162,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -43625,7 +44241,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -43686,7 +44302,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -43771,7 +44387,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -43856,7 +44472,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -43971,7 +44587,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -44074,7 +44690,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -44179,7 +44795,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 227, + "weight": 217, "cookies": false, "type": "", "demo": "users\/get-usage.md", @@ -44251,7 +44867,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -44303,7 +44919,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -44364,7 +44980,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -44444,7 +45060,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -44526,7 +45142,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -44609,7 +45225,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -44694,7 +45310,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -44790,7 +45406,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -44921,7 +45537,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -45053,7 +45669,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -45168,7 +45784,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -45281,7 +45897,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -45394,7 +46010,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -45509,7 +46125,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -45589,7 +46205,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -45669,7 +46285,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -45749,7 +46365,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -45808,7 +46424,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -45888,7 +46504,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -45958,7 +46574,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -46010,7 +46626,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -46064,7 +46680,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -46135,7 +46751,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -46215,7 +46831,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -46299,7 +46915,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -46409,7 +47025,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -46479,7 +47095,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -46568,7 +47184,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -46640,7 +47256,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -46722,7 +47338,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -46802,7 +47418,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -46882,7 +47498,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 231, + "weight": 221, "cookies": false, "type": "", "demo": "vcs\/create-repository-detection.md", @@ -46978,7 +47594,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 232, + "weight": 222, "cookies": false, "type": "", "demo": "vcs\/list-repositories.md", @@ -47037,6 +47653,19 @@ "default": "" }, "in": "query" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } ] }, @@ -47063,7 +47692,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 233, + "weight": 223, "cookies": false, "type": "", "demo": "vcs\/create-repository.md", @@ -47148,7 +47777,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 234, + "weight": 224, "cookies": false, "type": "", "demo": "vcs\/get-repository.md", @@ -47218,7 +47847,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 235, + "weight": 225, "cookies": false, "type": "", "demo": "vcs\/list-repository-branches.md", @@ -47288,7 +47917,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 230, + "weight": 220, "cookies": false, "type": "", "demo": "vcs\/get-repository-contents.md", @@ -47373,7 +48002,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 240, + "weight": 230, "cookies": false, "type": "", "demo": "vcs\/update-external-deployments.md", @@ -47462,7 +48091,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 237, + "weight": 227, "cookies": false, "type": "", "demo": "vcs\/list-installations.md", @@ -47547,7 +48176,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 238, + "weight": 228, "cookies": false, "type": "", "demo": "vcs\/get-installation.md", @@ -47598,7 +48227,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 239, + "weight": 229, "cookies": false, "type": "", "demo": "vcs\/delete-installation.md", diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index a2a97c046e..1803b42b53 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -260,7 +260,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -331,7 +331,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -522,7 +522,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -593,7 +593,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -716,7 +716,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -855,7 +855,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -954,7 +954,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -978,7 +978,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1106,7 +1106,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1243,7 +1243,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1343,7 +1343,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1441,7 +1441,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1539,7 +1539,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3584,7 +3584,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3712,7 +3712,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -3846,7 +3846,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -3906,7 +3906,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4396,7 +4396,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4480,7 +4480,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4574,7 +4574,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4668,7 +4668,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -4714,7 +4714,7 @@ "required": false, "schema": { "type": "object", - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "default": {} }, "in": "query" @@ -4726,7 +4726,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280 }, "in": "query" @@ -4738,7 +4738,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720 }, "in": "query" @@ -4750,7 +4750,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1 }, "in": "query" @@ -4761,7 +4761,7 @@ "required": false, "schema": { "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -4778,7 +4778,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "" }, "in": "query" @@ -4789,7 +4789,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -4800,7 +4800,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "en-US", "default": "" }, "in": "query" @@ -4811,7 +4811,7 @@ "required": false, "schema": { "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5246,7 +5246,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0 }, "in": "query" @@ -5258,7 +5258,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0 }, "in": "query" @@ -5270,7 +5270,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0 }, "in": "query" @@ -5281,7 +5281,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -5293,8 +5293,33 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [] }, "in": "query" @@ -5306,7 +5331,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0 }, "in": "query" @@ -5318,7 +5343,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0 }, "in": "query" @@ -5330,7 +5355,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0 }, "in": "query" @@ -5342,7 +5367,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1 }, "in": "query" @@ -5353,7 +5378,7 @@ "required": false, "schema": { "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -6533,6 +6558,22 @@ "type": "boolean", "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -11801,7 +11842,13 @@ "description": "Array of index orders. Maximum of 100 orders are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -12261,7 +12308,66 @@ "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -12665,7 +12771,66 @@ "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -14387,7 +14552,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -14441,7 +14606,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -14495,7 +14660,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -14545,7 +14710,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -14595,7 +14760,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -14645,7 +14810,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -14706,7 +14871,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -14756,7 +14921,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -14806,7 +14971,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -14869,7 +15034,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -14932,7 +15097,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -15006,7 +15171,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -15069,7 +15234,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -15158,7 +15323,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -15221,7 +15386,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -15284,7 +15449,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -15347,7 +15512,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -15410,7 +15575,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -15473,7 +15638,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -15536,7 +15701,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -15599,7 +15764,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -15662,7 +15827,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -15712,7 +15877,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -15762,7 +15927,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -15812,7 +15977,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -15866,7 +16031,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -15920,7 +16085,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -15974,7 +16139,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -16028,7 +16193,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -16082,7 +16247,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -16136,7 +16301,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -16190,7 +16355,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -16244,7 +16409,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -16332,7 +16497,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -16478,7 +16643,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -16636,7 +16801,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -16813,7 +16978,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -17010,7 +17175,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -17191,7 +17356,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -17378,7 +17543,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -17432,7 +17597,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -17495,7 +17660,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -17582,7 +17747,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -17669,7 +17834,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -17757,7 +17922,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -17936,7 +18101,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -18117,7 +18282,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -18269,7 +18434,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -18422,7 +18587,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -18540,7 +18705,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -18661,7 +18826,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -18758,7 +18923,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -18858,7 +19023,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -18965,7 +19130,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -19075,7 +19240,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -19182,7 +19347,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -19292,7 +19457,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -19523,7 +19688,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -19754,7 +19919,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -19851,7 +20016,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -19951,7 +20116,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -20048,7 +20213,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -20148,7 +20313,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -20245,7 +20410,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -20345,7 +20510,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -20442,7 +20607,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -20542,7 +20707,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -20596,7 +20761,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -20659,7 +20824,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -20746,7 +20911,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -20833,7 +20998,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -20919,7 +21084,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21003,7 +21168,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -21064,7 +21229,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -21144,7 +21309,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -21207,7 +21372,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -21294,7 +21459,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -21390,7 +21555,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -21482,7 +21647,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -21546,7 +21711,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -23911,7 +24076,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -23996,7 +24161,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -24130,7 +24295,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -24190,7 +24355,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -24321,7 +24486,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -24383,7 +24548,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -24482,7 +24647,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -24583,7 +24748,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -24657,7 +24822,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -24750,7 +24915,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -24819,7 +24984,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -24899,7 +25064,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -25129,7 +25294,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -26199,6 +26364,22 @@ "type": "boolean", "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -30041,7 +30222,13 @@ "description": "Array of index orders. Maximum of 100 orders are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -31608,7 +31795,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -31697,7 +31884,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -31784,7 +31971,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -31848,7 +32035,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -31924,7 +32111,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -31990,7 +32177,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -32089,7 +32276,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -32155,7 +32342,14 @@ "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -32202,7 +32396,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -32276,7 +32470,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -32337,7 +32531,14 @@ "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -32365,7 +32566,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -32441,7 +32642,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -32540,7 +32741,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -32602,7 +32803,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -33065,7 +33266,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -33150,7 +33351,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -33241,7 +33442,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -33327,7 +33528,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -33413,7 +33614,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -33493,7 +33694,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -33555,7 +33756,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -33641,7 +33842,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -33727,7 +33928,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -33843,7 +34044,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -33947,7 +34148,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -34053,7 +34254,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -34106,7 +34307,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -34168,7 +34369,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -34249,7 +34450,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -34332,7 +34533,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -34416,7 +34617,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -34502,7 +34703,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -34599,7 +34800,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -34733,7 +34934,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -34868,7 +35069,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -34986,7 +35187,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -35102,7 +35303,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -35218,7 +35419,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -35336,7 +35537,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -35417,7 +35618,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -35498,7 +35699,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -35579,7 +35780,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -35639,7 +35840,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -35720,7 +35921,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -35791,7 +35992,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -35844,7 +36045,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -35899,7 +36100,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -35971,7 +36172,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -36052,7 +36253,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -36137,7 +36338,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -36248,7 +36449,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -36319,7 +36520,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -36409,7 +36610,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -36482,7 +36683,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -36565,7 +36766,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -36646,7 +36847,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 9adb21d960..5d645ac86e 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -258,7 +258,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -328,7 +328,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -517,7 +517,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -587,7 +587,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -707,7 +707,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -843,7 +843,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -939,7 +939,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -963,7 +963,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1091,7 +1091,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1225,7 +1225,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1322,7 +1322,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1417,7 +1417,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1512,7 +1512,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -2918,7 +2918,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -2997,7 +2997,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3068,7 +3068,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -3879,7 +3879,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4005,7 +4005,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4137,7 +4137,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4195,7 +4195,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4683,7 +4683,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4765,7 +4765,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4857,7 +4857,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4949,7 +4949,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -4993,7 +4993,7 @@ "required": false, "schema": { "type": "object", - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "default": {} }, "in": "query" @@ -5005,7 +5005,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280 }, "in": "query" @@ -5017,7 +5017,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720 }, "in": "query" @@ -5029,7 +5029,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1 }, "in": "query" @@ -5040,7 +5040,7 @@ "required": false, "schema": { "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -5057,7 +5057,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "" }, "in": "query" @@ -5068,7 +5068,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -5079,7 +5079,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "en-US", "default": "" }, "in": "query" @@ -5090,7 +5090,7 @@ "required": false, "schema": { "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5525,7 +5525,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0 }, "in": "query" @@ -5537,7 +5537,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0 }, "in": "query" @@ -5549,7 +5549,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0 }, "in": "query" @@ -5560,7 +5560,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -5572,8 +5572,33 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [] }, "in": "query" @@ -5585,7 +5610,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0 }, "in": "query" @@ -5597,7 +5622,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0 }, "in": "query" @@ -5609,7 +5634,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0 }, "in": "query" @@ -5621,7 +5646,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1 }, "in": "query" @@ -5632,7 +5657,7 @@ "required": false, "schema": { "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -7370,7 +7395,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -7422,7 +7447,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -7474,7 +7499,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -7526,7 +7551,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -7578,7 +7603,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -7630,7 +7655,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -7682,7 +7707,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -7734,7 +7759,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -7786,7 +7811,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -7838,7 +7863,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -7890,7 +7915,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -7973,7 +7998,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -8048,7 +8073,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -8145,7 +8170,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -8244,7 +8269,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -8316,7 +8341,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -8407,7 +8432,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -8474,7 +8499,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -8552,7 +8577,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -8780,7 +8805,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -10281,7 +10306,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -10368,7 +10393,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -10453,7 +10478,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -10515,7 +10540,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -10589,7 +10614,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -10653,7 +10678,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -10750,7 +10775,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -10814,7 +10839,14 @@ "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -10861,7 +10893,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -10933,7 +10965,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -10992,7 +11024,14 @@ "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -11020,7 +11059,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -11094,7 +11133,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -11192,7 +11231,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -11253,7 +11292,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 365f926685..e6a6bdfee5 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -295,7 +295,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -364,7 +364,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -551,7 +551,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -620,7 +620,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -739,7 +739,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -874,7 +874,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -969,7 +969,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -993,7 +993,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1121,7 +1121,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1254,7 +1254,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1350,7 +1350,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1444,7 +1444,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1538,7 +1538,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -2930,7 +2930,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3008,7 +3008,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3078,7 +3078,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -3884,7 +3884,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4010,7 +4010,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4142,7 +4142,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4200,7 +4200,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4688,7 +4688,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4770,7 +4770,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4862,7 +4862,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4954,7 +4954,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -4998,7 +4998,7 @@ "required": false, "schema": { "type": "object", - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "default": {} }, "in": "query" @@ -5010,7 +5010,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280 }, "in": "query" @@ -5022,7 +5022,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720 }, "in": "query" @@ -5034,7 +5034,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1 }, "in": "query" @@ -5045,7 +5045,7 @@ "required": false, "schema": { "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -5062,7 +5062,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "" }, "in": "query" @@ -5073,7 +5073,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -5084,7 +5084,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "en-US", "default": "" }, "in": "query" @@ -5095,7 +5095,7 @@ "required": false, "schema": { "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5530,7 +5530,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0 }, "in": "query" @@ -5542,7 +5542,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0 }, "in": "query" @@ -5554,7 +5554,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0 }, "in": "query" @@ -5565,7 +5565,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -5577,8 +5577,33 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [] }, "in": "query" @@ -5590,7 +5615,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0 }, "in": "query" @@ -5602,7 +5627,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0 }, "in": "query" @@ -5614,7 +5639,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0 }, "in": "query" @@ -5626,7 +5651,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1 }, "in": "query" @@ -5637,7 +5662,7 @@ "required": false, "schema": { "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -5673,7 +5698,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 253, + "weight": 243, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -5808,7 +5833,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 252, + "weight": 242, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -7071,6 +7096,22 @@ "type": "boolean", "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -12379,7 +12420,13 @@ "description": "Array of index orders. Maximum of 100 orders are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -13239,7 +13286,66 @@ "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -13437,7 +13543,78 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-ml-3.11", + "python-ml-3.12", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "go-1.23", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [] }, @@ -13450,7 +13627,17 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "dev-tools", + "starter", + "databases", + "ai", + "messaging", + "utilities" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [] }, @@ -13882,7 +14069,66 @@ "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -15663,7 +15909,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -15715,7 +15961,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -15767,7 +16013,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -15816,7 +16062,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -15865,7 +16111,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -15914,7 +16160,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -15974,7 +16220,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -16023,7 +16269,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -16072,7 +16318,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -16134,7 +16380,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -16196,7 +16442,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -16269,7 +16515,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -16331,7 +16577,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -16419,7 +16665,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -16481,7 +16727,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -16543,7 +16789,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -16605,7 +16851,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -16667,7 +16913,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -16729,7 +16975,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -16791,7 +17037,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -16853,7 +17099,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -16915,7 +17161,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -16964,7 +17210,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -17013,7 +17259,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -17062,7 +17308,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -17114,7 +17360,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -17166,7 +17412,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -17218,7 +17464,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -17270,7 +17516,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -17322,7 +17568,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -17374,7 +17620,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -17426,7 +17672,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -17478,7 +17724,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -17565,7 +17811,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -17710,7 +17956,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -17867,7 +18113,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18043,7 +18289,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18239,7 +18485,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18417,7 +18663,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -18601,7 +18847,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -18654,7 +18900,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -18716,7 +18962,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -18802,7 +19048,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -18888,7 +19134,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -18975,7 +19221,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19151,7 +19397,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19329,7 +19575,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19478,7 +19724,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19628,7 +19874,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19745,7 +19991,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -19865,7 +20111,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -19961,7 +20207,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -20060,7 +20306,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -20166,7 +20412,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -20275,7 +20521,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20381,7 +20627,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20490,7 +20736,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20718,7 +20964,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20946,7 +21192,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21042,7 +21288,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21141,7 +21387,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21237,7 +21483,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21336,7 +21582,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21432,7 +21678,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21531,7 +21777,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21627,7 +21873,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21726,7 +21972,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21779,7 +22025,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21841,7 +22087,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21927,7 +22173,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -22013,7 +22259,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22098,7 +22344,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22181,7 +22427,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22241,7 +22487,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22320,7 +22566,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22382,7 +22628,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22468,7 +22714,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22563,7 +22809,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22653,7 +22899,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22716,7 +22962,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22791,7 +23037,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 260, + "weight": 250, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -22876,7 +23122,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 254, + "weight": 244, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -22909,7 +23155,27 @@ "description": "List of resources to migrate", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file", + "function", + "deployment", + "environment-variable" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "endpoint": { @@ -22964,7 +23230,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 262, + "weight": 252, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -22994,7 +23260,27 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file", + "function", + "deployment", + "environment-variable" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "in": "query" @@ -23057,7 +23343,7 @@ "x-appwrite": { "method": "createCSVExport", "group": null, - "weight": 259, + "weight": 249, "cookies": false, "type": "", "demo": "migrations\/create-csv-export.md", @@ -23171,7 +23457,7 @@ "x-appwrite": { "method": "createCSVImport", "group": null, - "weight": 258, + "weight": 248, "cookies": false, "type": "", "demo": "migrations\/create-csv-import.md", @@ -23255,7 +23541,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 255, + "weight": 245, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -23288,7 +23574,21 @@ "description": "List of resources to migrate", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "serviceAccount": { @@ -23331,7 +23631,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 263, + "weight": 253, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -23361,7 +23661,21 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "in": "query" @@ -23403,7 +23717,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 257, + "weight": 247, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -23436,7 +23750,22 @@ "description": "List of resources to migrate", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "subdomain": { @@ -23514,7 +23843,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 265, + "weight": 255, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -23544,7 +23873,22 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "in": "query" @@ -23647,7 +23991,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 256, + "weight": 246, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -23680,7 +24024,22 @@ "description": "List of resources to migrate", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "endpoint": { @@ -23752,7 +24111,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 264, + "weight": 254, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -23782,7 +24141,22 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "in": "query" @@ -23876,7 +24250,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 261, + "weight": 251, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -23934,7 +24308,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 266, + "weight": 256, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -23985,7 +24359,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 267, + "weight": 257, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -24045,7 +24419,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 149, + "weight": 139, "cookies": false, "type": "", "demo": "project\/get-usage.md", @@ -24133,7 +24507,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 151, + "weight": 141, "cookies": false, "type": "", "demo": "project\/list-variables.md", @@ -24179,7 +24553,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 150, + "weight": 140, "cookies": false, "type": "", "demo": "project\/create-variable.md", @@ -24257,7 +24631,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 152, + "weight": 142, "cookies": false, "type": "", "demo": "project\/get-variable.md", @@ -24315,7 +24689,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 153, + "weight": 143, "cookies": false, "type": "", "demo": "project\/update-variable.md", @@ -24397,7 +24771,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 154, + "weight": 144, "cookies": false, "type": "", "demo": "project\/delete-variable.md", @@ -24540,7 +24914,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 103, + "weight": 93, "cookies": false, "type": "", "demo": "projects\/create.md", @@ -24674,7 +25048,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 104, + "weight": 94, "cookies": false, "type": "", "demo": "projects\/get.md", @@ -24732,7 +25106,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 105, + "weight": 95, "cookies": false, "type": "", "demo": "projects\/update.md", @@ -24847,7 +25221,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 122, + "weight": 112, "cookies": false, "type": "", "demo": "projects\/delete.md", @@ -24907,7 +25281,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 109, + "weight": 99, "cookies": false, "type": "", "demo": "projects\/update-api-status.md", @@ -25061,7 +25435,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 110, + "weight": 100, "cookies": false, "type": "", "demo": "projects\/update-api-status-all.md", @@ -25198,7 +25572,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 115, + "weight": 105, "cookies": false, "type": "", "demo": "projects\/update-auth-duration.md", @@ -25277,7 +25651,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 114, + "weight": 104, "cookies": false, "type": "", "demo": "projects\/update-auth-limit.md", @@ -25356,7 +25730,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 120, + "weight": 110, "cookies": false, "type": "", "demo": "projects\/update-auth-sessions-limit.md", @@ -25435,7 +25809,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 113, + "weight": 103, "cookies": false, "type": "", "demo": "projects\/update-memberships-privacy.md", @@ -25526,7 +25900,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 121, + "weight": 111, "cookies": false, "type": "", "demo": "projects\/update-mock-numbers.md", @@ -25608,7 +25982,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 118, + "weight": 108, "cookies": false, "type": "", "demo": "projects\/update-auth-password-dictionary.md", @@ -25687,7 +26061,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 117, + "weight": 107, "cookies": false, "type": "", "demo": "projects\/update-auth-password-history.md", @@ -25766,7 +26140,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 119, + "weight": 109, "cookies": false, "type": "", "demo": "projects\/update-personal-data-check.md", @@ -25845,7 +26219,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 112, + "weight": 102, "cookies": false, "type": "", "demo": "projects\/update-session-alerts.md", @@ -25924,7 +26298,7 @@ "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", - "weight": 148, + "weight": 138, "cookies": false, "type": "", "demo": "projects\/update-session-invalidation.md", @@ -26003,7 +26377,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 116, + "weight": 106, "cookies": false, "type": "", "demo": "projects\/update-auth-status.md", @@ -26483,7 +26857,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 134, + "weight": 124, "cookies": false, "type": "", "demo": "projects\/create-jwt.md", @@ -26528,7 +26902,66 @@ "description": "List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "duration": { @@ -26570,7 +27003,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 130, + "weight": 120, "cookies": false, "type": "", "demo": "projects\/list-keys.md", @@ -26639,7 +27072,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 129, + "weight": 119, "cookies": false, "type": "", "demo": "projects\/create-key.md", @@ -26689,7 +27122,66 @@ "description": "Key scopes list. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "x-nullable": true }, @@ -26734,7 +27226,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 131, + "weight": 121, "cookies": false, "type": "", "demo": "projects\/get-key.md", @@ -26802,7 +27294,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 132, + "weight": 122, "cookies": false, "type": "", "demo": "projects\/update-key.md", @@ -26862,7 +27354,66 @@ "description": "Key scopes list. Maximum of 100 events are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "x-nullable": true }, @@ -26898,7 +27449,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 133, + "weight": 123, "cookies": false, "type": "", "demo": "projects\/delete-key.md", @@ -26968,7 +27519,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 111, + "weight": 101, "cookies": false, "type": "", "demo": "projects\/update-o-auth-2.md", @@ -27109,7 +27660,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 136, + "weight": 126, "cookies": false, "type": "", "demo": "projects\/list-platforms.md", @@ -27178,7 +27729,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 135, + "weight": 125, "cookies": false, "type": "", "demo": "projects\/create-platform.md", @@ -27297,7 +27848,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 137, + "weight": 127, "cookies": false, "type": "", "demo": "projects\/get-platform.md", @@ -27365,7 +27916,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 138, + "weight": 128, "cookies": false, "type": "", "demo": "projects\/update-platform.md", @@ -27460,7 +28011,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 139, + "weight": 129, "cookies": false, "type": "", "demo": "projects\/delete-platform.md", @@ -27530,7 +28081,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 107, + "weight": 97, "cookies": false, "type": "", "demo": "projects\/update-service-status.md", @@ -27632,7 +28183,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 108, + "weight": 98, "cookies": false, "type": "", "demo": "projects\/update-service-status-all.md", @@ -27711,7 +28262,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 140, + "weight": 130, "cookies": false, "type": "", "demo": "projects\/update-smtp.md", @@ -27903,7 +28454,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 141, + "weight": 131, "cookies": false, "type": "", "demo": "projects\/create-smtp-test.md", @@ -28112,7 +28663,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 106, + "weight": 96, "cookies": false, "type": "", "demo": "projects\/update-team.md", @@ -28191,7 +28742,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 143, + "weight": 133, "cookies": false, "type": "", "demo": "projects\/get-email-template.md", @@ -28415,7 +28966,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 145, + "weight": 135, "cookies": false, "type": "", "demo": "projects\/update-email-template.md", @@ -28679,7 +29230,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 147, + "weight": 137, "cookies": false, "type": "", "demo": "projects\/delete-email-template.md", @@ -28905,7 +29456,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 142, + "weight": 132, "cookies": false, "type": "", "demo": "projects\/get-sms-template.md", @@ -29188,7 +29739,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 144, + "weight": 134, "cookies": false, "type": "", "demo": "projects\/update-sms-template.md", @@ -29494,7 +30045,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 146, + "weight": 136, "cookies": false, "type": "", "demo": "projects\/delete-sms-template.md", @@ -29779,7 +30330,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 124, + "weight": 114, "cookies": false, "type": "", "demo": "projects\/list-webhooks.md", @@ -29848,7 +30399,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 123, + "weight": 113, "cookies": false, "type": "", "demo": "projects\/create-webhook.md", @@ -29963,7 +30514,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 125, + "weight": 115, "cookies": false, "type": "", "demo": "projects\/get-webhook.md", @@ -30031,7 +30582,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 126, + "weight": 116, "cookies": false, "type": "", "demo": "projects\/update-webhook.md", @@ -30147,7 +30698,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 128, + "weight": 118, "cookies": false, "type": "", "demo": "projects\/delete-webhook.md", @@ -30217,7 +30768,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 127, + "weight": 117, "cookies": false, "type": "", "demo": "projects\/update-webhook-signature.md", @@ -31344,7 +31895,26 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [] }, @@ -31357,7 +31927,17 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "dev-tools", + "starter", + "databases", + "ai", + "messaging", + "utilities" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [] }, @@ -33456,7 +34036,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -33540,7 +34120,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -33673,7 +34253,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -33732,7 +34312,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -33862,7 +34442,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -33923,7 +34503,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -34020,7 +34600,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -34119,7 +34699,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -34191,7 +34771,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -34282,7 +34862,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -34349,7 +34929,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -34427,7 +35007,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -34655,7 +35235,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -34740,7 +35320,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 169, + "weight": 159, "cookies": false, "type": "", "demo": "storage\/get-usage.md", @@ -34812,7 +35392,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 170, + "weight": 160, "cookies": false, "type": "", "demo": "storage\/get-bucket-usage.md", @@ -35955,6 +36535,22 @@ "type": "boolean", "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -39763,7 +40359,13 @@ "description": "Array of index orders. Maximum of 100 orders are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -41692,7 +42294,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -41779,7 +42381,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -41864,7 +42466,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -41926,7 +42528,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -42000,7 +42602,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -42064,7 +42666,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 184, + "weight": 174, "cookies": false, "type": "", "demo": "teams\/list-logs.md", @@ -42148,7 +42750,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -42245,7 +42847,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -42309,7 +42911,14 @@ "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -42356,7 +42965,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -42428,7 +43037,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -42487,7 +43096,14 @@ "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -42515,7 +43131,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -42589,7 +43205,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -42686,7 +43302,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -42746,7 +43362,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -43202,7 +43818,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -43286,7 +43902,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -43376,7 +43992,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -43461,7 +44077,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -43546,7 +44162,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -43625,7 +44241,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -43686,7 +44302,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -43771,7 +44387,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -43856,7 +44472,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -43971,7 +44587,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -44074,7 +44690,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -44179,7 +44795,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 227, + "weight": 217, "cookies": false, "type": "", "demo": "users\/get-usage.md", @@ -44251,7 +44867,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -44303,7 +44919,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -44364,7 +44980,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -44444,7 +45060,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -44526,7 +45142,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -44609,7 +45225,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -44694,7 +45310,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -44790,7 +45406,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -44921,7 +45537,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -45053,7 +45669,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -45168,7 +45784,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -45281,7 +45897,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -45394,7 +46010,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -45509,7 +46125,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -45589,7 +46205,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -45669,7 +46285,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -45749,7 +46365,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -45808,7 +46424,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -45888,7 +46504,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -45958,7 +46574,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -46010,7 +46626,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -46064,7 +46680,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -46135,7 +46751,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -46215,7 +46831,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -46299,7 +46915,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -46409,7 +47025,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -46479,7 +47095,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -46568,7 +47184,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -46640,7 +47256,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -46722,7 +47338,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -46802,7 +47418,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -46882,7 +47498,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 231, + "weight": 221, "cookies": false, "type": "", "demo": "vcs\/create-repository-detection.md", @@ -46978,7 +47594,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 232, + "weight": 222, "cookies": false, "type": "", "demo": "vcs\/list-repositories.md", @@ -47037,6 +47653,19 @@ "default": "" }, "in": "query" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } ] }, @@ -47063,7 +47692,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 233, + "weight": 223, "cookies": false, "type": "", "demo": "vcs\/create-repository.md", @@ -47148,7 +47777,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 234, + "weight": 224, "cookies": false, "type": "", "demo": "vcs\/get-repository.md", @@ -47218,7 +47847,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 235, + "weight": 225, "cookies": false, "type": "", "demo": "vcs\/list-repository-branches.md", @@ -47288,7 +47917,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 230, + "weight": 220, "cookies": false, "type": "", "demo": "vcs\/get-repository-contents.md", @@ -47373,7 +48002,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 240, + "weight": 230, "cookies": false, "type": "", "demo": "vcs\/update-external-deployments.md", @@ -47462,7 +48091,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 237, + "weight": 227, "cookies": false, "type": "", "demo": "vcs\/list-installations.md", @@ -47547,7 +48176,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 238, + "weight": 228, "cookies": false, "type": "", "demo": "vcs\/get-installation.md", @@ -47598,7 +48227,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 239, + "weight": 229, "cookies": false, "type": "", "demo": "vcs\/delete-installation.md", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index a2a97c046e..1803b42b53 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -260,7 +260,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -331,7 +331,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -522,7 +522,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -593,7 +593,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -716,7 +716,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -855,7 +855,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -954,7 +954,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -978,7 +978,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1106,7 +1106,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1243,7 +1243,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1343,7 +1343,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1441,7 +1441,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1539,7 +1539,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3584,7 +3584,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3712,7 +3712,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -3846,7 +3846,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -3906,7 +3906,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4396,7 +4396,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4480,7 +4480,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4574,7 +4574,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4668,7 +4668,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -4714,7 +4714,7 @@ "required": false, "schema": { "type": "object", - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "default": {} }, "in": "query" @@ -4726,7 +4726,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280 }, "in": "query" @@ -4738,7 +4738,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720 }, "in": "query" @@ -4750,7 +4750,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1 }, "in": "query" @@ -4761,7 +4761,7 @@ "required": false, "schema": { "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -4778,7 +4778,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "" }, "in": "query" @@ -4789,7 +4789,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -4800,7 +4800,7 @@ "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "en-US", "default": "" }, "in": "query" @@ -4811,7 +4811,7 @@ "required": false, "schema": { "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5246,7 +5246,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0 }, "in": "query" @@ -5258,7 +5258,7 @@ "schema": { "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0 }, "in": "query" @@ -5270,7 +5270,7 @@ "schema": { "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0 }, "in": "query" @@ -5281,7 +5281,7 @@ "required": false, "schema": { "type": "boolean", - "x-example": false, + "x-example": "true", "default": false }, "in": "query" @@ -5293,8 +5293,33 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [] }, "in": "query" @@ -5306,7 +5331,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0 }, "in": "query" @@ -5318,7 +5343,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0 }, "in": "query" @@ -5330,7 +5355,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0 }, "in": "query" @@ -5342,7 +5367,7 @@ "schema": { "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1 }, "in": "query" @@ -5353,7 +5378,7 @@ "required": false, "schema": { "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -6533,6 +6558,22 @@ "type": "boolean", "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -11801,7 +11842,13 @@ "description": "Array of index orders. Maximum of 100 orders are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -12261,7 +12308,66 @@ "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -12665,7 +12771,66 @@ "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -14387,7 +14552,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -14441,7 +14606,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -14495,7 +14660,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -14545,7 +14710,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -14595,7 +14760,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -14645,7 +14810,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -14706,7 +14871,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -14756,7 +14921,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -14806,7 +14971,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -14869,7 +15034,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -14932,7 +15097,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -15006,7 +15171,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -15069,7 +15234,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -15158,7 +15323,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -15221,7 +15386,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -15284,7 +15449,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -15347,7 +15512,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -15410,7 +15575,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -15473,7 +15638,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -15536,7 +15701,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -15599,7 +15764,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -15662,7 +15827,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -15712,7 +15877,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -15762,7 +15927,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -15812,7 +15977,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -15866,7 +16031,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -15920,7 +16085,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -15974,7 +16139,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -16028,7 +16193,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -16082,7 +16247,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -16136,7 +16301,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -16190,7 +16355,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -16244,7 +16409,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -16332,7 +16497,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -16478,7 +16643,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -16636,7 +16801,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -16813,7 +16978,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -17010,7 +17175,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -17191,7 +17356,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -17378,7 +17543,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -17432,7 +17597,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -17495,7 +17660,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -17582,7 +17747,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -17669,7 +17834,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -17757,7 +17922,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -17936,7 +18101,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -18117,7 +18282,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -18269,7 +18434,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -18422,7 +18587,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -18540,7 +18705,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -18661,7 +18826,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -18758,7 +18923,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -18858,7 +19023,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -18965,7 +19130,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -19075,7 +19240,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -19182,7 +19347,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -19292,7 +19457,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -19523,7 +19688,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -19754,7 +19919,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -19851,7 +20016,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -19951,7 +20116,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -20048,7 +20213,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -20148,7 +20313,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -20245,7 +20410,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -20345,7 +20510,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -20442,7 +20607,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -20542,7 +20707,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -20596,7 +20761,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -20659,7 +20824,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -20746,7 +20911,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -20833,7 +20998,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -20919,7 +21084,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21003,7 +21168,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -21064,7 +21229,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -21144,7 +21309,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -21207,7 +21372,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -21294,7 +21459,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -21390,7 +21555,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -21482,7 +21647,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -21546,7 +21711,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -23911,7 +24076,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -23996,7 +24161,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -24130,7 +24295,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -24190,7 +24355,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -24321,7 +24486,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -24383,7 +24548,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -24482,7 +24647,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -24583,7 +24748,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -24657,7 +24822,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -24750,7 +24915,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -24819,7 +24984,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -24899,7 +25064,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -25129,7 +25294,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -26199,6 +26364,22 @@ "type": "boolean", "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -30041,7 +30222,13 @@ "description": "Array of index orders. Maximum of 100 orders are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -31608,7 +31795,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -31697,7 +31884,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -31784,7 +31971,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -31848,7 +32035,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -31924,7 +32111,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -31990,7 +32177,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -32089,7 +32276,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -32155,7 +32342,14 @@ "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -32202,7 +32396,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -32276,7 +32470,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -32337,7 +32531,14 @@ "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -32365,7 +32566,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -32441,7 +32642,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -32540,7 +32741,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -32602,7 +32803,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -33065,7 +33266,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -33150,7 +33351,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -33241,7 +33442,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -33327,7 +33528,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -33413,7 +33614,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -33493,7 +33694,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -33555,7 +33756,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -33641,7 +33842,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -33727,7 +33928,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -33843,7 +34044,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -33947,7 +34148,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -34053,7 +34254,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -34106,7 +34307,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -34168,7 +34369,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -34249,7 +34450,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -34332,7 +34533,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -34416,7 +34617,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -34502,7 +34703,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -34599,7 +34800,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -34733,7 +34934,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -34868,7 +35069,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -34986,7 +35187,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -35102,7 +35303,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -35218,7 +35419,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -35336,7 +35537,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -35417,7 +35618,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -35498,7 +35699,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -35579,7 +35780,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -35639,7 +35840,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -35720,7 +35921,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -35791,7 +35992,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -35844,7 +36045,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -35899,7 +36100,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -35971,7 +36172,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -36052,7 +36253,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -36137,7 +36338,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -36248,7 +36449,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -36319,7 +36520,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -36409,7 +36610,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -36482,7 +36683,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -36565,7 +36766,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -36646,7 +36847,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 1594f816ef..aaa0ca3eba 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -314,7 +314,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -385,7 +385,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -573,7 +573,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -646,7 +646,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -766,7 +766,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -903,7 +903,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -997,7 +997,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1023,7 +1023,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1154,7 +1154,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1290,7 +1290,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1387,7 +1387,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1484,7 +1484,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1581,7 +1581,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3033,7 +3033,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3117,7 +3117,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3189,7 +3189,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -4030,7 +4030,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4154,7 +4154,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4284,7 +4284,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4346,7 +4346,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4832,7 +4832,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4914,7 +4914,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -5004,7 +5004,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -5094,7 +5094,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -5135,7 +5135,7 @@ "required": false, "type": "object", "default": [], - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "in": "query" }, { @@ -5144,7 +5144,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280, "in": "query" }, @@ -5154,7 +5154,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720, "in": "query" }, @@ -5164,7 +5164,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1, "in": "query" }, @@ -5173,7 +5173,7 @@ "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", "required": false, "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -5188,7 +5188,7 @@ "description": "Custom user agent string. Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "", "in": "query" }, @@ -5197,7 +5197,7 @@ "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -5206,7 +5206,7 @@ "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "en-US", "default": "", "in": "query" }, @@ -5215,7 +5215,7 @@ "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5648,7 +5648,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0, "in": "query" }, @@ -5658,7 +5658,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0, "in": "query" }, @@ -5668,7 +5668,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0, "in": "query" }, @@ -5677,7 +5677,7 @@ "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -5688,8 +5688,33 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [], "in": "query" }, @@ -5699,7 +5724,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0, "in": "query" }, @@ -5709,7 +5734,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0, "in": "query" }, @@ -5719,7 +5744,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0, "in": "query" }, @@ -5729,7 +5754,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1, "in": "query" }, @@ -5738,7 +5763,7 @@ "description": "Output format type (jpeg, jpg, png, gif and webp).", "required": false, "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -7420,7 +7445,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -7493,7 +7518,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -7564,7 +7589,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -7615,7 +7640,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -7666,7 +7691,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -7717,7 +7742,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -7768,7 +7793,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -7819,7 +7844,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -7870,7 +7895,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -7921,7 +7946,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -7974,7 +7999,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -8058,7 +8083,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -8128,7 +8153,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -8219,7 +8244,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -8308,7 +8333,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -8377,7 +8402,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -8467,7 +8492,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -8536,7 +8561,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -8614,7 +8639,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -8820,7 +8845,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -10265,7 +10290,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -10348,7 +10373,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -10437,7 +10462,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -10498,7 +10523,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -10572,7 +10597,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -10633,7 +10658,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -10724,7 +10749,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -10788,7 +10813,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -10836,7 +10868,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -10905,7 +10937,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -10959,7 +10991,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -10990,7 +11029,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -11061,7 +11100,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -11155,7 +11194,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -11216,7 +11255,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 5d2334764e..e1e66611a6 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -361,7 +361,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -431,7 +431,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -617,7 +617,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -689,7 +689,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -808,7 +808,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -944,7 +944,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -1037,7 +1037,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1063,7 +1063,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1194,7 +1194,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1329,7 +1329,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1425,7 +1425,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1521,7 +1521,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1617,7 +1617,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3055,7 +3055,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3138,7 +3138,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3209,7 +3209,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -4045,7 +4045,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4169,7 +4169,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4299,7 +4299,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4361,7 +4361,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4847,7 +4847,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4929,7 +4929,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -5019,7 +5019,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -5109,7 +5109,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -5150,7 +5150,7 @@ "required": false, "type": "object", "default": [], - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "in": "query" }, { @@ -5159,7 +5159,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280, "in": "query" }, @@ -5169,7 +5169,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720, "in": "query" }, @@ -5179,7 +5179,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1, "in": "query" }, @@ -5188,7 +5188,7 @@ "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", "required": false, "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -5203,7 +5203,7 @@ "description": "Custom user agent string. Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "", "in": "query" }, @@ -5212,7 +5212,7 @@ "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -5221,7 +5221,7 @@ "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "en-US", "default": "", "in": "query" }, @@ -5230,7 +5230,7 @@ "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5663,7 +5663,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0, "in": "query" }, @@ -5673,7 +5673,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0, "in": "query" }, @@ -5683,7 +5683,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0, "in": "query" }, @@ -5692,7 +5692,7 @@ "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -5703,8 +5703,33 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [], "in": "query" }, @@ -5714,7 +5739,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0, "in": "query" }, @@ -5724,7 +5749,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0, "in": "query" }, @@ -5734,7 +5759,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0, "in": "query" }, @@ -5744,7 +5769,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1, "in": "query" }, @@ -5753,7 +5778,7 @@ "description": "Output format type (jpeg, jpg, png, gif and webp).", "required": false, "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -5797,7 +5822,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 253, + "weight": 243, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -5931,7 +5956,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 252, + "weight": 242, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -7184,6 +7209,24 @@ "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -12340,7 +12383,13 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -13184,7 +13233,66 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -13387,7 +13495,78 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-ml-3.11", + "python-ml-3.12", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "go-1.23", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [], "in": "query" @@ -13399,7 +13578,17 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "dev-tools", + "starter", + "databases", + "ai", + "messaging", + "utilities" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [], "in": "query" @@ -13828,7 +14017,66 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -15585,7 +15833,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -15658,7 +15906,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -15729,7 +15977,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -15778,7 +16026,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -15827,7 +16075,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -15876,7 +16124,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -15934,7 +16182,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -15983,7 +16231,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -16032,7 +16280,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -16092,7 +16340,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -16152,7 +16400,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -16221,7 +16469,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -16281,7 +16529,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -16365,7 +16613,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -16425,7 +16673,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -16485,7 +16733,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -16545,7 +16793,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -16605,7 +16853,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -16665,7 +16913,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -16725,7 +16973,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -16785,7 +17033,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -16845,7 +17093,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -16894,7 +17142,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -16943,7 +17191,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -16992,7 +17240,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -17043,7 +17291,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -17094,7 +17342,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -17145,7 +17393,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -17196,7 +17444,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -17247,7 +17495,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -17298,7 +17546,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -17349,7 +17597,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -17400,7 +17648,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -17484,7 +17732,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -17643,7 +17891,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -17809,7 +18057,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18006,7 +18254,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18218,7 +18466,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18405,7 +18653,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -18591,7 +18839,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -18646,7 +18894,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -18706,7 +18954,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -18787,7 +19035,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -18868,7 +19116,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -18952,7 +19200,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19138,7 +19386,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19321,7 +19569,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19476,7 +19724,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19627,7 +19875,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19756,7 +20004,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -19883,7 +20131,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -19987,7 +20235,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -20089,7 +20337,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -20205,7 +20453,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -20319,7 +20567,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20435,7 +20683,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20549,7 +20797,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20793,7 +21041,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -21032,7 +21280,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21136,7 +21384,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21238,7 +21486,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21342,7 +21590,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21444,7 +21692,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21548,7 +21796,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21650,7 +21898,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21754,7 +22002,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21854,7 +22102,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21909,7 +22157,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21969,7 +22217,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -22050,7 +22298,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -22131,7 +22379,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22213,7 +22461,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22301,7 +22549,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22361,7 +22609,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22442,7 +22690,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22502,7 +22750,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22583,7 +22831,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22673,7 +22921,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22760,7 +23008,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22823,7 +23071,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22893,7 +23141,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 260, + "weight": 250, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -22975,7 +23223,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 254, + "weight": 244, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -23010,7 +23258,27 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file", + "function", + "deployment", + "environment-variable" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "endpoint": { @@ -23067,7 +23335,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 262, + "weight": 252, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -23097,7 +23365,27 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file", + "function", + "deployment", + "environment-variable" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "in": "query" }, @@ -23155,7 +23443,7 @@ "x-appwrite": { "method": "createCSVExport", "group": null, - "weight": 259, + "weight": 249, "cookies": false, "type": "", "demo": "migrations\/create-csv-export.md", @@ -23280,7 +23568,7 @@ "x-appwrite": { "method": "createCSVImport", "group": null, - "weight": 258, + "weight": 248, "cookies": false, "type": "", "demo": "migrations\/create-csv-import.md", @@ -23370,7 +23658,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 255, + "weight": 245, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -23405,7 +23693,21 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "serviceAccount": { @@ -23448,7 +23750,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 263, + "weight": 253, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -23478,7 +23780,21 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "in": "query" }, @@ -23519,7 +23835,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 257, + "weight": 247, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -23554,7 +23870,22 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "subdomain": { @@ -23638,7 +23969,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 265, + "weight": 255, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -23668,7 +23999,22 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "in": "query" }, @@ -23758,7 +24104,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 256, + "weight": 246, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -23793,7 +24139,22 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "endpoint": { @@ -23870,7 +24231,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 264, + "weight": 254, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -23900,7 +24261,22 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "in": "query" }, @@ -23981,7 +24357,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 261, + "weight": 251, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -24039,7 +24415,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 266, + "weight": 256, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -24092,7 +24468,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 267, + "weight": 257, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -24150,7 +24526,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 149, + "weight": 139, "cookies": false, "type": "", "demo": "project\/get-usage.md", @@ -24232,7 +24608,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 151, + "weight": 141, "cookies": false, "type": "", "demo": "project\/list-variables.md", @@ -24280,7 +24656,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 150, + "weight": 140, "cookies": false, "type": "", "demo": "project\/create-variable.md", @@ -24361,7 +24737,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 152, + "weight": 142, "cookies": false, "type": "", "demo": "project\/get-variable.md", @@ -24419,7 +24795,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 153, + "weight": 143, "cookies": false, "type": "", "demo": "project\/update-variable.md", @@ -24504,7 +24880,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 154, + "weight": 144, "cookies": false, "type": "", "demo": "project\/delete-variable.md", @@ -24642,7 +25018,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 103, + "weight": 93, "cookies": false, "type": "", "demo": "projects\/create.md", @@ -24789,7 +25165,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 104, + "weight": 94, "cookies": false, "type": "", "demo": "projects\/get.md", @@ -24847,7 +25223,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 105, + "weight": 95, "cookies": false, "type": "", "demo": "projects\/update.md", @@ -24972,7 +25348,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 122, + "weight": 112, "cookies": false, "type": "", "demo": "projects\/delete.md", @@ -25032,7 +25408,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 109, + "weight": 99, "cookies": false, "type": "", "demo": "projects\/update-api-status.md", @@ -25186,7 +25562,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 110, + "weight": 100, "cookies": false, "type": "", "demo": "projects\/update-api-status-all.md", @@ -25322,7 +25698,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 115, + "weight": 105, "cookies": false, "type": "", "demo": "projects\/update-auth-duration.md", @@ -25400,7 +25776,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 114, + "weight": 104, "cookies": false, "type": "", "demo": "projects\/update-auth-limit.md", @@ -25478,7 +25854,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 120, + "weight": 110, "cookies": false, "type": "", "demo": "projects\/update-auth-sessions-limit.md", @@ -25556,7 +25932,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 113, + "weight": 103, "cookies": false, "type": "", "demo": "projects\/update-memberships-privacy.md", @@ -25648,7 +26024,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 121, + "weight": 111, "cookies": false, "type": "", "demo": "projects\/update-mock-numbers.md", @@ -25729,7 +26105,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 118, + "weight": 108, "cookies": false, "type": "", "demo": "projects\/update-auth-password-dictionary.md", @@ -25807,7 +26183,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 117, + "weight": 107, "cookies": false, "type": "", "demo": "projects\/update-auth-password-history.md", @@ -25885,7 +26261,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 119, + "weight": 109, "cookies": false, "type": "", "demo": "projects\/update-personal-data-check.md", @@ -25963,7 +26339,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 112, + "weight": 102, "cookies": false, "type": "", "demo": "projects\/update-session-alerts.md", @@ -26041,7 +26417,7 @@ "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", - "weight": 148, + "weight": 138, "cookies": false, "type": "", "demo": "projects\/update-session-invalidation.md", @@ -26119,7 +26495,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 116, + "weight": 106, "cookies": false, "type": "", "demo": "projects\/update-auth-status.md", @@ -26587,7 +26963,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 134, + "weight": 124, "cookies": false, "type": "", "demo": "projects\/create-jwt.md", @@ -26630,7 +27006,66 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "duration": { @@ -26672,7 +27107,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 130, + "weight": 120, "cookies": false, "type": "", "demo": "projects\/list-keys.md", @@ -26739,7 +27174,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 129, + "weight": 119, "cookies": false, "type": "", "demo": "projects\/create-key.md", @@ -26789,7 +27224,66 @@ "x-example": null, "x-nullable": true, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "expire": { @@ -26833,7 +27327,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 131, + "weight": 121, "cookies": false, "type": "", "demo": "projects\/get-key.md", @@ -26899,7 +27393,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 132, + "weight": 122, "cookies": false, "type": "", "demo": "projects\/update-key.md", @@ -26957,7 +27451,66 @@ "x-example": null, "x-nullable": true, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "expire": { @@ -26996,7 +27549,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 133, + "weight": 123, "cookies": false, "type": "", "demo": "projects\/delete-key.md", @@ -27064,7 +27617,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 111, + "weight": 101, "cookies": false, "type": "", "demo": "projects\/update-o-auth-2.md", @@ -27205,7 +27758,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 136, + "weight": 126, "cookies": false, "type": "", "demo": "projects\/list-platforms.md", @@ -27272,7 +27825,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 135, + "weight": 125, "cookies": false, "type": "", "demo": "projects\/create-platform.md", @@ -27392,7 +27945,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 137, + "weight": 127, "cookies": false, "type": "", "demo": "projects\/get-platform.md", @@ -27458,7 +28011,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 138, + "weight": 128, "cookies": false, "type": "", "demo": "projects\/update-platform.md", @@ -27555,7 +28108,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 139, + "weight": 129, "cookies": false, "type": "", "demo": "projects\/delete-platform.md", @@ -27623,7 +28176,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 107, + "weight": 97, "cookies": false, "type": "", "demo": "projects\/update-service-status.md", @@ -27725,7 +28278,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 108, + "weight": 98, "cookies": false, "type": "", "demo": "projects\/update-service-status-all.md", @@ -27803,7 +28356,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 140, + "weight": 130, "cookies": false, "type": "", "demo": "projects\/update-smtp.md", @@ -28006,7 +28559,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 141, + "weight": 131, "cookies": false, "type": "", "demo": "projects\/create-smtp-test.md", @@ -28222,7 +28775,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 106, + "weight": 96, "cookies": false, "type": "", "demo": "projects\/update-team.md", @@ -28298,7 +28851,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 143, + "weight": 133, "cookies": false, "type": "", "demo": "projects\/get-email-template.md", @@ -28518,7 +29071,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 145, + "weight": 135, "cookies": false, "type": "", "demo": "projects\/update-email-template.md", @@ -28781,7 +29334,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 147, + "weight": 137, "cookies": false, "type": "", "demo": "projects\/delete-email-template.md", @@ -29001,7 +29554,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 142, + "weight": 132, "cookies": false, "type": "", "demo": "projects\/get-sms-template.md", @@ -29280,7 +29833,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 144, + "weight": 134, "cookies": false, "type": "", "demo": "projects\/update-sms-template.md", @@ -29581,7 +30134,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 146, + "weight": 136, "cookies": false, "type": "", "demo": "projects\/delete-sms-template.md", @@ -29860,7 +30413,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 124, + "weight": 114, "cookies": false, "type": "", "demo": "projects\/list-webhooks.md", @@ -29927,7 +30480,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 123, + "weight": 113, "cookies": false, "type": "", "demo": "projects\/create-webhook.md", @@ -30045,7 +30598,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 125, + "weight": 115, "cookies": false, "type": "", "demo": "projects\/get-webhook.md", @@ -30111,7 +30664,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 126, + "weight": 116, "cookies": false, "type": "", "demo": "projects\/update-webhook.md", @@ -30232,7 +30785,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 128, + "weight": 118, "cookies": false, "type": "", "demo": "projects\/delete-webhook.md", @@ -30300,7 +30853,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 127, + "weight": 117, "cookies": false, "type": "", "demo": "projects\/update-webhook-signature.md", @@ -31453,7 +32006,26 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [], "in": "query" @@ -31465,7 +32037,17 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "dev-tools", + "starter", + "databases", + "ai", + "messaging", + "utilities" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [], "in": "query" @@ -33539,7 +34121,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -33620,7 +34202,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -33764,7 +34346,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -33823,7 +34405,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -33963,7 +34545,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -34022,7 +34604,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -34113,7 +34695,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -34202,7 +34784,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -34271,7 +34853,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -34361,7 +34943,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -34430,7 +35012,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -34508,7 +35090,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -34714,7 +35296,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -34792,7 +35374,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 169, + "weight": 159, "cookies": false, "type": "", "demo": "storage\/get-usage.md", @@ -34862,7 +35444,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 170, + "weight": 160, "cookies": false, "type": "", "demo": "storage\/get-bucket-usage.md", @@ -35991,6 +36573,24 @@ "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -39703,7 +40303,13 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -41553,7 +42159,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -41636,7 +42242,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -41725,7 +42331,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -41786,7 +42392,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -41860,7 +42466,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -41921,7 +42527,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 184, + "weight": 174, "cookies": false, "type": "", "demo": "teams\/list-logs.md", @@ -42000,7 +42606,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -42091,7 +42697,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -42155,7 +42761,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -42203,7 +42816,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -42272,7 +42885,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -42326,7 +42939,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -42357,7 +42977,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -42428,7 +43048,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -42521,7 +43141,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -42581,7 +43201,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -43023,7 +43643,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -43104,7 +43724,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -43201,7 +43821,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -43292,7 +43912,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -43381,7 +44001,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -43459,7 +44079,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -43520,7 +44140,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -43611,7 +44231,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -43702,7 +44322,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -43828,7 +44448,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -43940,7 +44560,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -44050,7 +44670,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 227, + "weight": 217, "cookies": false, "type": "", "demo": "users\/get-usage.md", @@ -44120,7 +44740,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -44174,7 +44794,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -44235,7 +44855,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -44314,7 +44934,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -44396,7 +45016,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -44476,7 +45096,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -44556,7 +45176,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -44647,7 +45267,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -44779,7 +45399,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -44907,7 +45527,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -45020,7 +45640,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -45133,7 +45753,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -45246,7 +45866,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -45361,7 +45981,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -45440,7 +46060,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -45519,7 +46139,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -45596,7 +46216,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -45655,7 +46275,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -45732,7 +46352,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -45800,7 +46420,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -45854,7 +46474,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -45910,7 +46530,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -45979,7 +46599,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -46056,7 +46676,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -46137,7 +46757,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -46248,7 +46868,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -46316,7 +46936,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -46406,7 +47026,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -46476,7 +47096,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -46558,7 +47178,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -46637,7 +47257,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -46716,7 +47336,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 231, + "weight": 221, "cookies": false, "type": "", "demo": "vcs\/create-repository-detection.md", @@ -46811,7 +47431,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 232, + "weight": 222, "cookies": false, "type": "", "demo": "vcs\/list-repositories.md", @@ -46864,6 +47484,18 @@ "x-example": "", "default": "", "in": "query" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" } ] }, @@ -46892,7 +47524,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 233, + "weight": 223, "cookies": false, "type": "", "demo": "vcs\/create-repository.md", @@ -46975,7 +47607,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 234, + "weight": 224, "cookies": false, "type": "", "demo": "vcs\/get-repository.md", @@ -47041,7 +47673,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 235, + "weight": 225, "cookies": false, "type": "", "demo": "vcs\/list-repository-branches.md", @@ -47107,7 +47739,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 230, + "weight": 220, "cookies": false, "type": "", "demo": "vcs\/get-repository-contents.md", @@ -47190,7 +47822,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 240, + "weight": 230, "cookies": false, "type": "", "demo": "vcs\/update-external-deployments.md", @@ -47274,7 +47906,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 237, + "weight": 227, "cookies": false, "type": "", "demo": "vcs\/list-installations.md", @@ -47354,7 +47986,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 238, + "weight": 228, "cookies": false, "type": "", "demo": "vcs\/get-installation.md", @@ -47407,7 +48039,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 239, + "weight": 229, "cookies": false, "type": "", "demo": "vcs\/delete-installation.md", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index b37aaac8e2..cda8c7682f 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -325,7 +325,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -397,7 +397,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -587,7 +587,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -661,7 +661,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -784,7 +784,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -924,7 +924,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -1021,7 +1021,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1047,7 +1047,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1178,7 +1178,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1317,7 +1317,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1417,7 +1417,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1517,7 +1517,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1617,7 +1617,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3741,7 +3741,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3867,7 +3867,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -3999,7 +3999,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4063,7 +4063,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4551,7 +4551,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4635,7 +4635,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4727,7 +4727,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4819,7 +4819,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -4862,7 +4862,7 @@ "required": false, "type": "object", "default": [], - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "in": "query" }, { @@ -4871,7 +4871,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280, "in": "query" }, @@ -4881,7 +4881,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720, "in": "query" }, @@ -4891,7 +4891,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1, "in": "query" }, @@ -4900,7 +4900,7 @@ "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", "required": false, "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -4915,7 +4915,7 @@ "description": "Custom user agent string. Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "", "in": "query" }, @@ -4924,7 +4924,7 @@ "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -4933,7 +4933,7 @@ "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "en-US", "default": "", "in": "query" }, @@ -4942,7 +4942,7 @@ "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5375,7 +5375,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0, "in": "query" }, @@ -5385,7 +5385,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0, "in": "query" }, @@ -5395,7 +5395,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0, "in": "query" }, @@ -5404,7 +5404,7 @@ "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -5415,8 +5415,33 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [], "in": "query" }, @@ -5426,7 +5451,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0, "in": "query" }, @@ -5436,7 +5461,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0, "in": "query" }, @@ -5446,7 +5471,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0, "in": "query" }, @@ -5456,7 +5481,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1, "in": "query" }, @@ -5465,7 +5490,7 @@ "description": "Output format type (jpeg, jpg, png, gif and webp).", "required": false, "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -6636,6 +6661,24 @@ "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -11759,7 +11802,13 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -12221,7 +12270,66 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -12638,7 +12746,66 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -14340,7 +14507,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -14415,7 +14582,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -14488,7 +14655,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -14538,7 +14705,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -14588,7 +14755,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -14638,7 +14805,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -14697,7 +14864,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -14747,7 +14914,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -14797,7 +14964,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -14858,7 +15025,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -14919,7 +15086,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -14989,7 +15156,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -15050,7 +15217,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -15135,7 +15302,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -15196,7 +15363,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -15257,7 +15424,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -15318,7 +15485,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -15379,7 +15546,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -15440,7 +15607,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -15501,7 +15668,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -15562,7 +15729,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -15623,7 +15790,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -15673,7 +15840,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -15723,7 +15890,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -15773,7 +15940,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -15826,7 +15993,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -15879,7 +16046,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -15932,7 +16099,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -15985,7 +16152,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -16038,7 +16205,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -16091,7 +16258,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -16144,7 +16311,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -16197,7 +16364,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -16282,7 +16449,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -16442,7 +16609,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -16609,7 +16776,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -16807,7 +16974,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -17020,7 +17187,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -17210,7 +17377,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -17399,7 +17566,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -17455,7 +17622,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -17516,7 +17683,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -17598,7 +17765,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -17680,7 +17847,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -17765,7 +17932,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -17954,7 +18121,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -18140,7 +18307,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -18298,7 +18465,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -18452,7 +18619,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -18582,7 +18749,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -18710,7 +18877,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -18815,7 +18982,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -18918,7 +19085,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -19035,7 +19202,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -19150,7 +19317,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -19267,7 +19434,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -19382,7 +19549,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -19629,7 +19796,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -19871,7 +20038,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -19976,7 +20143,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -20079,7 +20246,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -20184,7 +20351,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -20287,7 +20454,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -20392,7 +20559,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -20495,7 +20662,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -20600,7 +20767,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -20701,7 +20868,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -20757,7 +20924,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -20818,7 +20985,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -20900,7 +21067,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -20982,7 +21149,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -21065,7 +21232,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21154,7 +21321,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -21215,7 +21382,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -21297,7 +21464,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -21358,7 +21525,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -21440,7 +21607,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -21531,7 +21698,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -21620,7 +21787,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -21684,7 +21851,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24047,7 +24214,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -24129,7 +24296,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -24274,7 +24441,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -24334,7 +24501,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -24475,7 +24642,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -24535,7 +24702,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -24628,7 +24795,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -24719,7 +24886,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -24790,7 +24957,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -24882,7 +25049,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -24953,7 +25120,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -25033,7 +25200,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -25241,7 +25408,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -26296,6 +26463,24 @@ "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -30042,7 +30227,13 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -31552,7 +31743,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -31637,7 +31828,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -31728,7 +31919,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -31791,7 +31982,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -31867,7 +32058,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -31930,7 +32121,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -32023,7 +32214,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -32089,7 +32280,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -32137,7 +32335,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -32208,7 +32406,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -32264,7 +32462,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -32295,7 +32500,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -32368,7 +32573,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -32463,7 +32668,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -32525,7 +32730,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -32974,7 +33179,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -33056,7 +33261,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -33154,7 +33359,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -33246,7 +33451,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -33336,7 +33541,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -33415,7 +33620,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -33477,7 +33682,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -33569,7 +33774,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -33661,7 +33866,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -33788,7 +33993,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -33901,7 +34106,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -34012,7 +34217,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -34067,7 +34272,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -34129,7 +34334,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -34209,7 +34414,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -34292,7 +34497,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -34373,7 +34578,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -34454,7 +34659,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -34546,7 +34751,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -34681,7 +34886,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -34812,7 +35017,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -34928,7 +35133,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -35044,7 +35249,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -35160,7 +35365,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -35278,7 +35483,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -35358,7 +35563,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -35438,7 +35643,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -35516,7 +35721,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -35576,7 +35781,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -35654,7 +35859,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -35723,7 +35928,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -35778,7 +35983,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -35835,7 +36040,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -35905,7 +36110,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -35983,7 +36188,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -36065,7 +36270,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -36177,7 +36382,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -36246,7 +36451,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -36337,7 +36542,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -36408,7 +36613,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -36491,7 +36696,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -36571,7 +36776,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 1594f816ef..aaa0ca3eba 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -314,7 +314,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -385,7 +385,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -573,7 +573,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -646,7 +646,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -766,7 +766,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -903,7 +903,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -997,7 +997,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1023,7 +1023,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1154,7 +1154,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1290,7 +1290,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1387,7 +1387,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1484,7 +1484,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1581,7 +1581,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3033,7 +3033,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3117,7 +3117,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3189,7 +3189,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -4030,7 +4030,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4154,7 +4154,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4284,7 +4284,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4346,7 +4346,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4832,7 +4832,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4914,7 +4914,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -5004,7 +5004,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -5094,7 +5094,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -5135,7 +5135,7 @@ "required": false, "type": "object", "default": [], - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "in": "query" }, { @@ -5144,7 +5144,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280, "in": "query" }, @@ -5154,7 +5154,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720, "in": "query" }, @@ -5164,7 +5164,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1, "in": "query" }, @@ -5173,7 +5173,7 @@ "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", "required": false, "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -5188,7 +5188,7 @@ "description": "Custom user agent string. Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "", "in": "query" }, @@ -5197,7 +5197,7 @@ "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -5206,7 +5206,7 @@ "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "en-US", "default": "", "in": "query" }, @@ -5215,7 +5215,7 @@ "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5648,7 +5648,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0, "in": "query" }, @@ -5658,7 +5658,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0, "in": "query" }, @@ -5668,7 +5668,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0, "in": "query" }, @@ -5677,7 +5677,7 @@ "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -5688,8 +5688,33 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [], "in": "query" }, @@ -5699,7 +5724,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0, "in": "query" }, @@ -5709,7 +5734,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0, "in": "query" }, @@ -5719,7 +5744,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0, "in": "query" }, @@ -5729,7 +5754,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1, "in": "query" }, @@ -5738,7 +5763,7 @@ "description": "Output format type (jpeg, jpg, png, gif and webp).", "required": false, "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -7420,7 +7445,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -7493,7 +7518,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -7564,7 +7589,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -7615,7 +7640,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -7666,7 +7691,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -7717,7 +7742,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -7768,7 +7793,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -7819,7 +7844,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -7870,7 +7895,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -7921,7 +7946,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -7974,7 +7999,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -8058,7 +8083,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -8128,7 +8153,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -8219,7 +8244,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -8308,7 +8333,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -8377,7 +8402,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -8467,7 +8492,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -8536,7 +8561,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -8614,7 +8639,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -8820,7 +8845,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -10265,7 +10290,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -10348,7 +10373,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -10437,7 +10462,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -10498,7 +10523,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -10572,7 +10597,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -10633,7 +10658,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -10724,7 +10749,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -10788,7 +10813,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -10836,7 +10868,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -10905,7 +10937,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -10959,7 +10991,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -10990,7 +11029,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -11061,7 +11100,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -11155,7 +11194,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -11216,7 +11255,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 5d2334764e..e1e66611a6 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -361,7 +361,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -431,7 +431,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -617,7 +617,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -689,7 +689,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -808,7 +808,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -944,7 +944,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -1037,7 +1037,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1063,7 +1063,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1194,7 +1194,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1329,7 +1329,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1425,7 +1425,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1521,7 +1521,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1617,7 +1617,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3055,7 +3055,7 @@ "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", - "weight": 55, + "weight": 45, "cookies": false, "type": "", "demo": "account\/create-push-target.md", @@ -3138,7 +3138,7 @@ "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", - "weight": 56, + "weight": 46, "cookies": false, "type": "", "demo": "account\/update-push-target.md", @@ -3209,7 +3209,7 @@ "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", - "weight": 57, + "weight": 47, "cookies": false, "type": "", "demo": "account\/delete-push-target.md", @@ -4045,7 +4045,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4169,7 +4169,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4299,7 +4299,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4361,7 +4361,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4847,7 +4847,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4929,7 +4929,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -5019,7 +5019,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -5109,7 +5109,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -5150,7 +5150,7 @@ "required": false, "type": "object", "default": [], - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "in": "query" }, { @@ -5159,7 +5159,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280, "in": "query" }, @@ -5169,7 +5169,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720, "in": "query" }, @@ -5179,7 +5179,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1, "in": "query" }, @@ -5188,7 +5188,7 @@ "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", "required": false, "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -5203,7 +5203,7 @@ "description": "Custom user agent string. Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "", "in": "query" }, @@ -5212,7 +5212,7 @@ "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -5221,7 +5221,7 @@ "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "en-US", "default": "", "in": "query" }, @@ -5230,7 +5230,7 @@ "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5663,7 +5663,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0, "in": "query" }, @@ -5673,7 +5673,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0, "in": "query" }, @@ -5683,7 +5683,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0, "in": "query" }, @@ -5692,7 +5692,7 @@ "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -5703,8 +5703,33 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [], "in": "query" }, @@ -5714,7 +5739,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0, "in": "query" }, @@ -5724,7 +5749,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0, "in": "query" }, @@ -5734,7 +5759,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0, "in": "query" }, @@ -5744,7 +5769,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1, "in": "query" }, @@ -5753,7 +5778,7 @@ "description": "Output format type (jpeg, jpg, png, gif and webp).", "required": false, "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -5797,7 +5822,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 253, + "weight": 243, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -5931,7 +5956,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 252, + "weight": 242, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -7184,6 +7209,24 @@ "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -12340,7 +12383,13 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -13184,7 +13233,66 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -13387,7 +13495,78 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-ml-3.11", + "python-ml-3.12", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "go-1.23", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [], "in": "query" @@ -13399,7 +13578,17 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "dev-tools", + "starter", + "databases", + "ai", + "messaging", + "utilities" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [], "in": "query" @@ -13828,7 +14017,66 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -15585,7 +15833,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -15658,7 +15906,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -15729,7 +15977,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -15778,7 +16026,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -15827,7 +16075,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -15876,7 +16124,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -15934,7 +16182,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -15983,7 +16231,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -16032,7 +16280,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -16092,7 +16340,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -16152,7 +16400,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -16221,7 +16469,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -16281,7 +16529,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -16365,7 +16613,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -16425,7 +16673,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -16485,7 +16733,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -16545,7 +16793,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -16605,7 +16853,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -16665,7 +16913,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -16725,7 +16973,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -16785,7 +17033,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -16845,7 +17093,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -16894,7 +17142,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -16943,7 +17191,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -16992,7 +17240,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -17043,7 +17291,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -17094,7 +17342,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -17145,7 +17393,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -17196,7 +17444,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -17247,7 +17495,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -17298,7 +17546,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -17349,7 +17597,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -17400,7 +17648,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -17484,7 +17732,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -17643,7 +17891,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -17809,7 +18057,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18006,7 +18254,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18218,7 +18466,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -18405,7 +18653,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -18591,7 +18839,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -18646,7 +18894,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -18706,7 +18954,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -18787,7 +19035,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -18868,7 +19116,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -18952,7 +19200,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19138,7 +19386,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19321,7 +19569,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19476,7 +19724,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19627,7 +19875,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19756,7 +20004,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -19883,7 +20131,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -19987,7 +20235,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -20089,7 +20337,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -20205,7 +20453,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -20319,7 +20567,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20435,7 +20683,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20549,7 +20797,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20793,7 +21041,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -21032,7 +21280,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21136,7 +21384,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21238,7 +21486,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21342,7 +21590,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21444,7 +21692,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21548,7 +21796,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21650,7 +21898,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21754,7 +22002,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21854,7 +22102,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21909,7 +22157,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21969,7 +22217,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -22050,7 +22298,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -22131,7 +22379,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22213,7 +22461,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22301,7 +22549,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22361,7 +22609,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22442,7 +22690,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22502,7 +22750,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22583,7 +22831,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22673,7 +22921,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22760,7 +23008,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22823,7 +23071,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22893,7 +23141,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 260, + "weight": 250, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -22975,7 +23223,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 254, + "weight": 244, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -23010,7 +23258,27 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file", + "function", + "deployment", + "environment-variable" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "endpoint": { @@ -23067,7 +23335,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 262, + "weight": 252, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -23097,7 +23365,27 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "team", + "membership", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file", + "function", + "deployment", + "environment-variable" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "in": "query" }, @@ -23155,7 +23443,7 @@ "x-appwrite": { "method": "createCSVExport", "group": null, - "weight": 259, + "weight": 249, "cookies": false, "type": "", "demo": "migrations\/create-csv-export.md", @@ -23280,7 +23568,7 @@ "x-appwrite": { "method": "createCSVImport", "group": null, - "weight": 258, + "weight": 248, "cookies": false, "type": "", "demo": "migrations\/create-csv-import.md", @@ -23370,7 +23658,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 255, + "weight": 245, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -23405,7 +23693,21 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "serviceAccount": { @@ -23448,7 +23750,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 263, + "weight": 253, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -23478,7 +23780,21 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "in": "query" }, @@ -23519,7 +23835,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 257, + "weight": 247, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -23554,7 +23870,22 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "subdomain": { @@ -23638,7 +23969,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 265, + "weight": 255, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -23668,7 +23999,22 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "in": "query" }, @@ -23758,7 +24104,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 256, + "weight": 246, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -23793,7 +24139,22 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "endpoint": { @@ -23870,7 +24231,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 264, + "weight": 254, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -23900,7 +24261,22 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "in": "query" }, @@ -23981,7 +24357,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 261, + "weight": 251, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -24039,7 +24415,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 266, + "weight": 256, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -24092,7 +24468,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 267, + "weight": 257, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -24150,7 +24526,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 149, + "weight": 139, "cookies": false, "type": "", "demo": "project\/get-usage.md", @@ -24232,7 +24608,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 151, + "weight": 141, "cookies": false, "type": "", "demo": "project\/list-variables.md", @@ -24280,7 +24656,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 150, + "weight": 140, "cookies": false, "type": "", "demo": "project\/create-variable.md", @@ -24361,7 +24737,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 152, + "weight": 142, "cookies": false, "type": "", "demo": "project\/get-variable.md", @@ -24419,7 +24795,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 153, + "weight": 143, "cookies": false, "type": "", "demo": "project\/update-variable.md", @@ -24504,7 +24880,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 154, + "weight": 144, "cookies": false, "type": "", "demo": "project\/delete-variable.md", @@ -24642,7 +25018,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 103, + "weight": 93, "cookies": false, "type": "", "demo": "projects\/create.md", @@ -24789,7 +25165,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 104, + "weight": 94, "cookies": false, "type": "", "demo": "projects\/get.md", @@ -24847,7 +25223,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 105, + "weight": 95, "cookies": false, "type": "", "demo": "projects\/update.md", @@ -24972,7 +25348,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 122, + "weight": 112, "cookies": false, "type": "", "demo": "projects\/delete.md", @@ -25032,7 +25408,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 109, + "weight": 99, "cookies": false, "type": "", "demo": "projects\/update-api-status.md", @@ -25186,7 +25562,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 110, + "weight": 100, "cookies": false, "type": "", "demo": "projects\/update-api-status-all.md", @@ -25322,7 +25698,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 115, + "weight": 105, "cookies": false, "type": "", "demo": "projects\/update-auth-duration.md", @@ -25400,7 +25776,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 114, + "weight": 104, "cookies": false, "type": "", "demo": "projects\/update-auth-limit.md", @@ -25478,7 +25854,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 120, + "weight": 110, "cookies": false, "type": "", "demo": "projects\/update-auth-sessions-limit.md", @@ -25556,7 +25932,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 113, + "weight": 103, "cookies": false, "type": "", "demo": "projects\/update-memberships-privacy.md", @@ -25648,7 +26024,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 121, + "weight": 111, "cookies": false, "type": "", "demo": "projects\/update-mock-numbers.md", @@ -25729,7 +26105,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 118, + "weight": 108, "cookies": false, "type": "", "demo": "projects\/update-auth-password-dictionary.md", @@ -25807,7 +26183,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 117, + "weight": 107, "cookies": false, "type": "", "demo": "projects\/update-auth-password-history.md", @@ -25885,7 +26261,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 119, + "weight": 109, "cookies": false, "type": "", "demo": "projects\/update-personal-data-check.md", @@ -25963,7 +26339,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 112, + "weight": 102, "cookies": false, "type": "", "demo": "projects\/update-session-alerts.md", @@ -26041,7 +26417,7 @@ "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", - "weight": 148, + "weight": 138, "cookies": false, "type": "", "demo": "projects\/update-session-invalidation.md", @@ -26119,7 +26495,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 116, + "weight": 106, "cookies": false, "type": "", "demo": "projects\/update-auth-status.md", @@ -26587,7 +26963,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 134, + "weight": 124, "cookies": false, "type": "", "demo": "projects\/create-jwt.md", @@ -26630,7 +27006,66 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "duration": { @@ -26672,7 +27107,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 130, + "weight": 120, "cookies": false, "type": "", "demo": "projects\/list-keys.md", @@ -26739,7 +27174,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 129, + "weight": 119, "cookies": false, "type": "", "demo": "projects\/create-key.md", @@ -26789,7 +27224,66 @@ "x-example": null, "x-nullable": true, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "expire": { @@ -26833,7 +27327,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 131, + "weight": 121, "cookies": false, "type": "", "demo": "projects\/get-key.md", @@ -26899,7 +27393,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 132, + "weight": 122, "cookies": false, "type": "", "demo": "projects\/update-key.md", @@ -26957,7 +27451,66 @@ "x-example": null, "x-nullable": true, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "expire": { @@ -26996,7 +27549,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 133, + "weight": 123, "cookies": false, "type": "", "demo": "projects\/delete-key.md", @@ -27064,7 +27617,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 111, + "weight": 101, "cookies": false, "type": "", "demo": "projects\/update-o-auth-2.md", @@ -27205,7 +27758,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 136, + "weight": 126, "cookies": false, "type": "", "demo": "projects\/list-platforms.md", @@ -27272,7 +27825,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 135, + "weight": 125, "cookies": false, "type": "", "demo": "projects\/create-platform.md", @@ -27392,7 +27945,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 137, + "weight": 127, "cookies": false, "type": "", "demo": "projects\/get-platform.md", @@ -27458,7 +28011,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 138, + "weight": 128, "cookies": false, "type": "", "demo": "projects\/update-platform.md", @@ -27555,7 +28108,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 139, + "weight": 129, "cookies": false, "type": "", "demo": "projects\/delete-platform.md", @@ -27623,7 +28176,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 107, + "weight": 97, "cookies": false, "type": "", "demo": "projects\/update-service-status.md", @@ -27725,7 +28278,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 108, + "weight": 98, "cookies": false, "type": "", "demo": "projects\/update-service-status-all.md", @@ -27803,7 +28356,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 140, + "weight": 130, "cookies": false, "type": "", "demo": "projects\/update-smtp.md", @@ -28006,7 +28559,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 141, + "weight": 131, "cookies": false, "type": "", "demo": "projects\/create-smtp-test.md", @@ -28222,7 +28775,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 106, + "weight": 96, "cookies": false, "type": "", "demo": "projects\/update-team.md", @@ -28298,7 +28851,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 143, + "weight": 133, "cookies": false, "type": "", "demo": "projects\/get-email-template.md", @@ -28518,7 +29071,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 145, + "weight": 135, "cookies": false, "type": "", "demo": "projects\/update-email-template.md", @@ -28781,7 +29334,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 147, + "weight": 137, "cookies": false, "type": "", "demo": "projects\/delete-email-template.md", @@ -29001,7 +29554,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 142, + "weight": 132, "cookies": false, "type": "", "demo": "projects\/get-sms-template.md", @@ -29280,7 +29833,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 144, + "weight": 134, "cookies": false, "type": "", "demo": "projects\/update-sms-template.md", @@ -29581,7 +30134,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 146, + "weight": 136, "cookies": false, "type": "", "demo": "projects\/delete-sms-template.md", @@ -29860,7 +30413,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 124, + "weight": 114, "cookies": false, "type": "", "demo": "projects\/list-webhooks.md", @@ -29927,7 +30480,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 123, + "weight": 113, "cookies": false, "type": "", "demo": "projects\/create-webhook.md", @@ -30045,7 +30598,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 125, + "weight": 115, "cookies": false, "type": "", "demo": "projects\/get-webhook.md", @@ -30111,7 +30664,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 126, + "weight": 116, "cookies": false, "type": "", "demo": "projects\/update-webhook.md", @@ -30232,7 +30785,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 128, + "weight": 118, "cookies": false, "type": "", "demo": "projects\/delete-webhook.md", @@ -30300,7 +30853,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 127, + "weight": 117, "cookies": false, "type": "", "demo": "projects\/update-webhook-signature.md", @@ -31453,7 +32006,26 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [], "in": "query" @@ -31465,7 +32037,17 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "dev-tools", + "starter", + "databases", + "ai", + "messaging", + "utilities" + ], + "x-enum-name": null, + "x-enum-keys": [] }, "default": [], "in": "query" @@ -33539,7 +34121,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -33620,7 +34202,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -33764,7 +34346,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -33823,7 +34405,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -33963,7 +34545,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -34022,7 +34604,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -34113,7 +34695,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -34202,7 +34784,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -34271,7 +34853,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -34361,7 +34943,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -34430,7 +35012,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -34508,7 +35090,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -34714,7 +35296,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -34792,7 +35374,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 169, + "weight": 159, "cookies": false, "type": "", "demo": "storage\/get-usage.md", @@ -34862,7 +35444,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 170, + "weight": 160, "cookies": false, "type": "", "demo": "storage\/get-bucket-usage.md", @@ -35991,6 +36573,24 @@ "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -39703,7 +40303,13 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -41553,7 +42159,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -41636,7 +42242,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -41725,7 +42331,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -41786,7 +42392,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -41860,7 +42466,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -41921,7 +42527,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 184, + "weight": 174, "cookies": false, "type": "", "demo": "teams\/list-logs.md", @@ -42000,7 +42606,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -42091,7 +42697,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -42155,7 +42761,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -42203,7 +42816,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -42272,7 +42885,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -42326,7 +42939,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -42357,7 +42977,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -42428,7 +43048,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -42521,7 +43141,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -42581,7 +43201,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -43023,7 +43643,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -43104,7 +43724,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -43201,7 +43821,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -43292,7 +43912,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -43381,7 +44001,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -43459,7 +44079,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -43520,7 +44140,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -43611,7 +44231,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -43702,7 +44322,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -43828,7 +44448,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -43940,7 +44560,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -44050,7 +44670,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 227, + "weight": 217, "cookies": false, "type": "", "demo": "users\/get-usage.md", @@ -44120,7 +44740,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -44174,7 +44794,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -44235,7 +44855,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -44314,7 +44934,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -44396,7 +45016,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -44476,7 +45096,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -44556,7 +45176,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -44647,7 +45267,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -44779,7 +45399,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -44907,7 +45527,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -45020,7 +45640,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -45133,7 +45753,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -45246,7 +45866,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -45361,7 +45981,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -45440,7 +46060,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -45519,7 +46139,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -45596,7 +46216,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -45655,7 +46275,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -45732,7 +46352,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -45800,7 +46420,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -45854,7 +46474,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -45910,7 +46530,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -45979,7 +46599,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -46056,7 +46676,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -46137,7 +46757,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -46248,7 +46868,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -46316,7 +46936,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -46406,7 +47026,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -46476,7 +47096,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -46558,7 +47178,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -46637,7 +47257,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -46716,7 +47336,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 231, + "weight": 221, "cookies": false, "type": "", "demo": "vcs\/create-repository-detection.md", @@ -46811,7 +47431,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 232, + "weight": 222, "cookies": false, "type": "", "demo": "vcs\/list-repositories.md", @@ -46864,6 +47484,18 @@ "x-example": "", "default": "", "in": "query" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" } ] }, @@ -46892,7 +47524,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 233, + "weight": 223, "cookies": false, "type": "", "demo": "vcs\/create-repository.md", @@ -46975,7 +47607,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 234, + "weight": 224, "cookies": false, "type": "", "demo": "vcs\/get-repository.md", @@ -47041,7 +47673,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 235, + "weight": 225, "cookies": false, "type": "", "demo": "vcs\/list-repository-branches.md", @@ -47107,7 +47739,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 230, + "weight": 220, "cookies": false, "type": "", "demo": "vcs\/get-repository-contents.md", @@ -47190,7 +47822,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 240, + "weight": 230, "cookies": false, "type": "", "demo": "vcs\/update-external-deployments.md", @@ -47274,7 +47906,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 237, + "weight": 227, "cookies": false, "type": "", "demo": "vcs\/list-installations.md", @@ -47354,7 +47986,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 238, + "weight": 228, "cookies": false, "type": "", "demo": "vcs\/get-installation.md", @@ -47407,7 +48039,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 239, + "weight": 229, "cookies": false, "type": "", "demo": "vcs\/delete-installation.md", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index b37aaac8e2..cda8c7682f 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -325,7 +325,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 58, + "weight": 48, "cookies": false, "type": "", "demo": "account\/list-identities.md", @@ -397,7 +397,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 59, + "weight": 49, "cookies": false, "type": "", "demo": "account\/delete-identity.md", @@ -587,7 +587,7 @@ "x-appwrite": { "method": "updateMFA", "group": "mfa", - "weight": 45, + "weight": 306, "cookies": false, "type": "", "demo": "account\/update-mfa.md", @@ -661,7 +661,7 @@ "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", - "weight": 47, + "weight": 308, "cookies": false, "type": "", "demo": "account\/create-mfa-authenticator.md", @@ -784,7 +784,7 @@ "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", - "weight": 48, + "weight": 309, "cookies": false, "type": "", "demo": "account\/update-mfa-authenticator.md", @@ -924,7 +924,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 52, + "weight": 310, "cookies": false, "type": "", "demo": "account\/delete-mfa-authenticator.md", @@ -1021,7 +1021,7 @@ ] } }, - "\/account\/mfa\/challenge": { + "\/account\/mfa\/challenges": { "post": { "summary": "Create MFA challenge", "operationId": "accountCreateMfaChallenge", @@ -1047,7 +1047,7 @@ "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", - "weight": 53, + "weight": 314, "cookies": false, "type": "", "demo": "account\/create-mfa-challenge.md", @@ -1178,7 +1178,7 @@ "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", - "weight": 54, + "weight": 315, "cookies": false, "type": "", "demo": "account\/update-mfa-challenge.md", @@ -1317,7 +1317,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 46, + "weight": 307, "cookies": false, "type": "", "demo": "account\/list-mfa-factors.md", @@ -1417,7 +1417,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 51, + "weight": 313, "cookies": false, "type": "", "demo": "account\/get-mfa-recovery-codes.md", @@ -1517,7 +1517,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 49, + "weight": 311, "cookies": false, "type": "", "demo": "account\/create-mfa-recovery-codes.md", @@ -1617,7 +1617,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 50, + "weight": 312, "cookies": false, "type": "", "demo": "account\/update-mfa-recovery-codes.md", @@ -3741,7 +3741,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 51, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3867,7 +3867,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 50, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -3999,7 +3999,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 54, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4063,7 +4063,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 52, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4551,7 +4551,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 53, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4635,7 +4635,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 56, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4727,7 +4727,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 55, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4819,7 +4819,7 @@ "x-appwrite": { "method": "getScreenshot", "group": null, - "weight": 67, + "weight": 57, "cookies": false, "type": "location", "demo": "avatars\/get-screenshot.md", @@ -4862,7 +4862,7 @@ "required": false, "type": "object", "default": [], - "x-example": "{}", + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", "in": "query" }, { @@ -4871,7 +4871,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1920", "default": 1280, "in": "query" }, @@ -4881,7 +4881,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 1, + "x-example": "1080", "default": 720, "in": "query" }, @@ -4891,7 +4891,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0.1, + "x-example": "2", "default": 1, "in": "query" }, @@ -4900,7 +4900,7 @@ "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", "required": false, "type": "string", - "x-example": "light", + "x-example": "dark", "enum": [ "light", "dark" @@ -4915,7 +4915,7 @@ "description": "Custom user agent string. Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", "default": "", "in": "query" }, @@ -4924,7 +4924,7 @@ "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -4933,7 +4933,7 @@ "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "", + "x-example": "en-US", "default": "", "in": "query" }, @@ -4942,7 +4942,7 @@ "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", "required": false, "type": "string", - "x-example": "africa\/abidjan", + "x-example": "america\/new_york", "enum": [ "africa\/abidjan", "africa\/accra", @@ -5375,7 +5375,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -90, + "x-example": "37.7749", "default": 0, "in": "query" }, @@ -5385,7 +5385,7 @@ "required": false, "type": "number", "format": "float", - "x-example": -180, + "x-example": "-122.4194", "default": 0, "in": "query" }, @@ -5395,7 +5395,7 @@ "required": false, "type": "number", "format": "float", - "x-example": 0, + "x-example": "100", "default": 0, "in": "query" }, @@ -5404,7 +5404,7 @@ "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", "required": false, "type": "boolean", - "x-example": false, + "x-example": "true", "default": false, "in": "query" }, @@ -5415,8 +5415,33 @@ "type": "array", "collectionFormat": "multi", "items": { - "type": "string" + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [] }, + "x-example": "[\"geolocation\",\"notifications\"]", "default": [], "in": "query" }, @@ -5426,7 +5451,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "3", "default": 0, "in": "query" }, @@ -5436,7 +5461,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "800", "default": 0, "in": "query" }, @@ -5446,7 +5471,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": 0, + "x-example": "600", "default": 0, "in": "query" }, @@ -5456,7 +5481,7 @@ "required": false, "type": "integer", "format": "int32", - "x-example": -1, + "x-example": "85", "default": -1, "in": "query" }, @@ -5465,7 +5490,7 @@ "description": "Output format type (jpeg, jpg, png, gif and webp).", "required": false, "type": "string", - "x-example": "jpg", + "x-example": "jpeg", "enum": [ "jpg", "jpeg", @@ -6636,6 +6661,24 @@ "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -11759,7 +11802,13 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -12221,7 +12270,66 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -12638,7 +12746,66 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "tables.read", + "tables.write", + "attributes.read", + "attributes.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "rows.read", + "rows.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "execution.read", + "execution.write", + "locale.read", + "avatars.read", + "health.read", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "rules.read", + "rules.write", + "migrations.read", + "migrations.write", + "vcs.read", + "vcs.write", + "assistant.read", + "tokens.read", + "tokens.write" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "installationId": { @@ -14340,7 +14507,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 251, + "weight": 241, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -14415,7 +14582,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 250, + "weight": 240, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -14488,7 +14655,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 79, + "weight": 69, "cookies": false, "type": "", "demo": "health\/get.md", @@ -14538,7 +14705,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 100, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -14588,7 +14755,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 82, + "weight": 72, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -14638,7 +14805,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 87, + "weight": 77, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -14697,7 +14864,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 81, + "weight": 71, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -14747,7 +14914,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 83, + "weight": 73, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -14797,7 +14964,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 89, + "weight": 79, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -14858,7 +15025,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 88, + "weight": 78, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -14919,7 +15086,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 90, + "weight": 80, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -14989,7 +15156,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 91, + "weight": 81, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -15050,7 +15217,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 101, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -15135,7 +15302,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 95, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -15196,7 +15363,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 86, + "weight": 76, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -15257,7 +15424,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 92, + "weight": 82, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -15318,7 +15485,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 93, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -15379,7 +15546,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 94, + "weight": 84, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -15440,7 +15607,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 96, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -15501,7 +15668,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 97, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -15562,7 +15729,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 85, + "weight": 75, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -15623,7 +15790,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 99, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -15673,7 +15840,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 98, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -15723,7 +15890,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 84, + "weight": 74, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -15773,7 +15940,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 71, + "weight": 61, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -15826,7 +15993,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 72, + "weight": 62, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -15879,7 +16046,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 76, + "weight": 66, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -15932,7 +16099,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 73, + "weight": 63, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -15985,7 +16152,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 74, + "weight": 64, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -16038,7 +16205,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 75, + "weight": 65, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -16091,7 +16258,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 77, + "weight": 67, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -16144,7 +16311,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 78, + "weight": 68, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -16197,7 +16364,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -16282,7 +16449,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -16442,7 +16609,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -16609,7 +16776,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -16807,7 +16974,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -17020,7 +17187,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -17210,7 +17377,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -17399,7 +17566,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -17455,7 +17622,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -17516,7 +17683,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -17598,7 +17765,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -17680,7 +17847,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 279, + "weight": 269, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -17765,7 +17932,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 278, + "weight": 268, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -17954,7 +18121,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -18140,7 +18307,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 277, + "weight": 267, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -18298,7 +18465,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -18452,7 +18619,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 268, + "weight": 258, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -18582,7 +18749,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 282, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -18710,7 +18877,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 272, + "weight": 262, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -18815,7 +18982,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -18918,7 +19085,7 @@ "x-appwrite": { "method": "createResendProvider", "group": "providers", - "weight": 270, + "weight": 260, "cookies": false, "type": "", "demo": "messaging\/create-resend-provider.md", @@ -19035,7 +19202,7 @@ "x-appwrite": { "method": "updateResendProvider", "group": "providers", - "weight": 284, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/update-resend-provider.md", @@ -19150,7 +19317,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 269, + "weight": 259, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -19267,7 +19434,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 283, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -19382,7 +19549,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 271, + "weight": 261, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -19629,7 +19796,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -19871,7 +20038,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 273, + "weight": 263, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -19976,7 +20143,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -20079,7 +20246,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 274, + "weight": 264, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -20184,7 +20351,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -20287,7 +20454,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 275, + "weight": 265, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -20392,7 +20559,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -20495,7 +20662,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 276, + "weight": 266, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -20600,7 +20767,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -20701,7 +20868,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 281, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -20757,7 +20924,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -20818,7 +20985,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 280, + "weight": 270, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -20900,7 +21067,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -20982,7 +21149,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -21065,7 +21232,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21154,7 +21321,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -21215,7 +21382,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -21297,7 +21464,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -21358,7 +21525,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -21440,7 +21607,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -21531,7 +21698,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -21620,7 +21787,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -21684,7 +21851,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24047,7 +24214,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 156, + "weight": 146, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -24129,7 +24296,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 155, + "weight": 145, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -24274,7 +24441,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 157, + "weight": 147, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -24334,7 +24501,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 158, + "weight": 148, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -24475,7 +24642,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 159, + "weight": 149, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -24535,7 +24702,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 161, + "weight": 151, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -24628,7 +24795,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 160, + "weight": 150, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -24719,7 +24886,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 162, + "weight": 152, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -24790,7 +24957,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 167, + "weight": 157, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -24882,7 +25049,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 168, + "weight": 158, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -24953,7 +25120,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 164, + "weight": 154, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -25033,7 +25200,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 163, + "weight": 153, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -25241,7 +25408,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 165, + "weight": 155, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -26296,6 +26463,24 @@ "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ @@ -30042,7 +30227,13 @@ "default": [], "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [] } }, "lengths": { @@ -31552,7 +31743,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 172, + "weight": 162, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -31637,7 +31828,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 171, + "weight": 161, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -31728,7 +31919,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 173, + "weight": 163, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -31791,7 +31982,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 175, + "weight": 165, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -31867,7 +32058,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 177, + "weight": 167, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -31930,7 +32121,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 179, + "weight": 169, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -32023,7 +32214,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 178, + "weight": 168, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -32089,7 +32280,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "url": { @@ -32137,7 +32335,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 180, + "weight": 170, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -32208,7 +32406,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 181, + "weight": 171, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -32264,7 +32462,14 @@ "default": null, "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "developer", + "owner" + ], + "x-enum-name": null, + "x-enum-keys": [] } } }, @@ -32295,7 +32500,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 183, + "weight": 173, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -32368,7 +32573,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 182, + "weight": 172, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -32463,7 +32668,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 174, + "weight": 164, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -32525,7 +32730,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 176, + "weight": 166, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -32974,7 +33179,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 194, + "weight": 184, "cookies": false, "type": "", "demo": "users\/list.md", @@ -33056,7 +33261,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 185, + "weight": 175, "cookies": false, "type": "", "demo": "users\/create.md", @@ -33154,7 +33359,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 188, + "weight": 178, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -33246,7 +33451,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 186, + "weight": 176, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -33336,7 +33541,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 202, + "weight": 192, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -33415,7 +33620,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 225, + "weight": 215, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -33477,7 +33682,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 187, + "weight": 177, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -33569,7 +33774,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 190, + "weight": 180, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -33661,7 +33866,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 191, + "weight": 181, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -33788,7 +33993,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 192, + "weight": 182, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -33901,7 +34106,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 189, + "weight": 179, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -34012,7 +34217,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 195, + "weight": 185, "cookies": false, "type": "", "demo": "users\/get.md", @@ -34067,7 +34272,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 223, + "weight": 213, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -34129,7 +34334,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 208, + "weight": 198, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -34209,7 +34414,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 226, + "weight": 216, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -34292,7 +34497,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 204, + "weight": 194, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -34373,7 +34578,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 200, + "weight": 190, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -34454,7 +34659,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 199, + "weight": 189, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -34546,7 +34751,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 213, + "weight": 203, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -34681,7 +34886,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 218, + "weight": 208, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -34812,7 +35017,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 214, + "weight": 204, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -34928,7 +35133,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -35044,7 +35249,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 217, + "weight": 207, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -35160,7 +35365,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 206, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -35278,7 +35483,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 206, + "weight": 196, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -35358,7 +35563,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 207, + "weight": 197, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -35438,7 +35643,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 209, + "weight": 199, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -35516,7 +35721,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 196, + "weight": 186, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -35576,7 +35781,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 211, + "weight": 201, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -35654,7 +35859,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 198, + "weight": 188, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -35723,7 +35928,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 219, + "weight": 209, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -35778,7 +35983,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 222, + "weight": 212, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -35835,7 +36040,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 221, + "weight": 211, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -35905,7 +36110,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 203, + "weight": 193, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -35983,7 +36188,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 201, + "weight": 191, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -36065,7 +36270,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 193, + "weight": 183, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -36177,7 +36382,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 197, + "weight": 187, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -36246,7 +36451,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 212, + "weight": 202, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -36337,7 +36542,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 224, + "weight": 214, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -36408,7 +36613,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 220, + "weight": 210, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -36491,7 +36696,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 210, + "weight": 200, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -36571,7 +36776,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 205, + "weight": 195, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", diff --git a/app/config/template-runtimes.php b/app/config/template-runtimes.php index 04eaba2c44..4a58bf00b5 100644 --- a/app/config/template-runtimes.php +++ b/app/config/template-runtimes.php @@ -1,43 +1,12 @@ [ - 'name' => 'node', - 'versions' => ['22', '21.0', '20.0', '19.0', '18.0', '16.0', '14.5'] - ], - 'PYTHON' => [ - 'name' => 'python', - 'versions' => ['3.12', '3.11', '3.10', '3.9', '3.8'] - ], - 'DART' => [ - 'name' => 'dart', - 'versions' => ['3.9', '3.8', '3.5', '3.3', '3.1', '3.0', '2.19', '2.18', '2.17', '2.16'] - ], - 'GO' => [ - 'name' => 'go', - 'versions' => ['1.23'] - ], - 'PHP' => [ - 'name' => 'php', - 'versions' => ['8.3', '8.2', '8.1', '8.0'] - ], - 'DENO' => [ - 'name' => 'deno', - 'versions' => ['2.0', '1.46', '1.40', '1.35', '1.24', '1.21'] - ], - 'BUN' => [ - 'name' => 'bun', - 'versions' => ['1.1', '1.0'] - ], - 'RUBY' => [ - 'name' => 'ruby', - 'versions' => ['3.3', '3.2', '3.1', '3.0'] - ], - 'FLUTTER' => [ - 'name' => 'flutter', - 'versions' => ['3.35', '3.32', '3.24'] - ], -]; +$runtimes = Config::getParam('runtimes'); + +$mappedRuntimes = \array_reduce($runtimes, function ($acc, $runtime) { + $acc[strtoupper($runtime['key'])][] = $runtime['key'] . '-' . $runtime['version']; + return $acc; +}, []); + +return $mappedRuntimes; diff --git a/app/config/templates/function.php b/app/config/templates/function.php index 16838341a9..e10cd4648c 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -1,20 +1,22 @@ $runtime['name'] . '-' . $version, + 'name' => $runtime, 'commands' => $commands, 'entrypoint' => $entrypoint, 'providerRootDirectory' => $providerRootDirectory ]; - }, array_filter($runtime['versions'], function ($version) use ($versionsDenyList) { - return !in_array($version, $versionsDenyList); + }, array_filter($runtimes, function ($runtime) use ($allowList) { + return in_array($runtime, $allowList); })); } @@ -32,24 +34,26 @@ return [ 'timeout' => 15, 'useCases' => ['starter'], 'runtimes' => [ - ...getRuntimes($templateRuntimes['NODE'], 'npm install', 'src/main.js', 'node/starter'), + ...getRuntimes($templateRuntimes['NODE'], 'npm install', 'src/main.js', 'node/starter', $allowList), ...getRuntimes( $templateRuntimes['PYTHON'], 'pip install -r requirements.txt', 'src/main.py', - 'python/starter' + 'python/starter', + $allowList ), - ...getRuntimes($templateRuntimes['DART'], 'dart pub get', 'lib/main.dart', 'dart/starter'), - ...getRuntimes($templateRuntimes['GO'], '', 'main.go', 'go/starter'), + ...getRuntimes($templateRuntimes['DART'], 'dart pub get', 'lib/main.dart', 'dart/starter', $allowList), + ...getRuntimes($templateRuntimes['GO'], '', 'main.go', 'go/starter', $allowList), ...getRuntimes( $templateRuntimes['PHP'], 'composer install', 'src/index.php', - 'php/starter' + 'php/starter', + $allowList ), - ...getRuntimes($templateRuntimes['DENO'], 'deno cache src/main.ts', 'src/main.ts', 'deno/starter'), - ...getRuntimes($templateRuntimes['BUN'], 'bun install', 'src/main.ts', 'bun/starter'), - ...getRuntimes($templateRuntimes['RUBY'], 'bundle install', 'lib/main.rb', 'ruby/starter'), + ...getRuntimes($templateRuntimes['DENO'], 'deno cache src/main.ts', 'src/main.ts', 'deno/starter', $allowList), + ...getRuntimes($templateRuntimes['BUN'], 'bun install', 'src/main.ts', 'bun/starter', $allowList), + ...getRuntimes($templateRuntimes['RUBY'], 'bundle install', 'lib/main.rb', 'ruby/starter', $allowList), ], 'instructions' => 'For documentation and instructions check out file.', 'vcsProvider' => 'github', @@ -75,7 +79,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/query-upstash-vector' + 'node/query-upstash-vector', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -120,7 +125,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/query-redis-labs' + 'node/query-redis-labs', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -164,7 +170,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/query-neo4j-auradb' + 'node/query-neo4j-auradb', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -217,7 +224,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/query-mongo-atlas' + 'node/query-mongo-atlas', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -255,7 +263,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/query-neon-postgres' + 'node/query-neon-postgres', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -323,25 +332,29 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/prompt-chatgpt' + 'node/prompt-chatgpt', + $allowList ), ...getRuntimes( $templateRuntimes['PYTHON'], 'pip install -r requirements.txt', 'src/main.py', - 'python/prompt_chatgpt' + 'python/prompt_chatgpt', + $allowList ), ...getRuntimes( $templateRuntimes['PHP'], 'composer install', 'src/index.php', - 'php/prompt-chatgpt' + 'php/prompt-chatgpt', + $allowList ), ...getRuntimes( $templateRuntimes['DART'], 'dart pub get', 'lib/main.dart', - 'dart/prompt_chatgpt' + 'dart/prompt_chatgpt', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -385,19 +398,22 @@ return [ $templateRuntimes['NODE'], 'npm install && npm run setup', 'src/main.js', - 'node/discord-command-bot' + 'node/discord-command-bot', + $allowList ), ...getRuntimes( $templateRuntimes['PYTHON'], 'pip install -r requirements.txt && python src/setup.py', 'src/main.py', - 'python/discord_command_bot' + 'python/discord_command_bot', + $allowList ), ...getRuntimes( $templateRuntimes['GO'], '', 'main.go', - 'go/discord-command-bot' + 'go/discord-command-bot', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -449,7 +465,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/analyze-with-perspectiveapi' + 'node/analyze-with-perspectiveapi', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -486,19 +503,22 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/censor-with-redact' + 'node/censor-with-redact', + $allowList ), ...getRuntimes( $templateRuntimes['PYTHON'], 'pip install -r requirements.txt', 'src/main.py', - 'python/censor_with_redact' + 'python/censor_with_redact', + $allowList ), ...getRuntimes( $templateRuntimes['DART'], 'dart pub get', 'lib/main.dart', - 'dart/censor_with_redact' + 'dart/censor_with_redact', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -530,7 +550,7 @@ return [ 'timeout' => 15, 'useCases' => ['utilities'], 'runtimes' => [ - ...getRuntimes($templateRuntimes['NODE'], 'npm install', 'src/main.js', 'node/generate-pdf') + ...getRuntimes($templateRuntimes['NODE'], 'npm install', 'src/main.js', 'node/generate-pdf', $allowList) ], 'instructions' => 'For documentation and instructions check out file.', 'vcsProvider' => 'github', @@ -557,7 +577,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/github-issue-bot' + 'node/github-issue-bot', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -601,7 +622,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/url-shortener' + 'node/url-shortener', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -653,19 +675,22 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/sync-with-algolia' + 'node/sync-with-algolia', + $allowList ), ...getRuntimes( $templateRuntimes['PYTHON'], 'pip install -r requirements.txt', 'src/main.py', - 'python/sync_with_algolia' + 'python/sync_with_algolia', + $allowList ), ...getRuntimes( $templateRuntimes['PHP'], 'composer install', 'src/index.php', - 'php/sync-with-algolia' + 'php/sync-with-algolia', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -735,31 +760,36 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/sync-with-meilisearch' + 'node/sync-with-meilisearch', + $allowList ), ...getRuntimes( $templateRuntimes['PYTHON'], 'pip install -r requirements.txt', 'src/main.py', - 'python/sync-with-meilisearch' + 'python/sync-with-meilisearch', + $allowList ), ...getRuntimes( $templateRuntimes['PHP'], 'composer install', 'src/index.php', - 'php/sync-with-meilisearch' + 'php/sync-with-meilisearch', + $allowList ), ...getRuntimes( $templateRuntimes['BUN'], 'bun install', 'src/main.ts', - 'bun/sync-with-meilisearch' + 'bun/sync-with-meilisearch', + $allowList ), ...getRuntimes( $templateRuntimes['RUBY'], 'bundle install', 'lib/main.rb', - 'ruby/sync-with-meilisearch' + 'ruby/sync-with-meilisearch', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -829,37 +859,43 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/whatsapp-with-vonage' + 'node/whatsapp-with-vonage', + $allowList ), ...getRuntimes( $templateRuntimes['PYTHON'], 'pip install -r requirements.txt', 'src/main.py', - 'python/whatsapp_with_vonage' + 'python/whatsapp_with_vonage', + $allowList ), ...getRuntimes( $templateRuntimes['DART'], 'dart pub get', 'lib/main.dart', - 'dart/whatsapp-with-vonage' + 'dart/whatsapp-with-vonage', + $allowList ), ...getRuntimes( $templateRuntimes['PHP'], 'composer install', 'src/index.php', - 'php/whatsapp-with-vonage' + 'php/whatsapp-with-vonage', + $allowList ), ...getRuntimes( $templateRuntimes['BUN'], 'bun install', 'src/main.ts', - 'bun/whatsapp-with-vonage' + 'bun/whatsapp-with-vonage', + $allowList ), ...getRuntimes( $templateRuntimes['RUBY'], 'bundle install', 'lib/main.rb', - 'ruby/whatsapp-with-vonage' + 'ruby/whatsapp-with-vonage', + $allowList ), ], 'instructions' => 'For documentation and instructions check out file.', @@ -916,7 +952,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/push-notification-with-fcm' + 'node/push-notification-with-fcm', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -973,19 +1010,22 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/email-contact-form' + 'node/email-contact-form', + $allowList ), ...getRuntimes( $templateRuntimes['PYTHON'], 'pip install -r requirements.txt', 'src/main.py', - 'python/email_contact_form' + 'python/email_contact_form', + $allowList ), ...getRuntimes( $templateRuntimes['PHP'], 'composer install', 'src/index.php', - 'php/email-contact-form' + 'php/email-contact-form', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1057,7 +1097,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/subscriptions-with-stripe' + 'node/subscriptions-with-stripe', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1099,7 +1140,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/payments-with-stripe' + 'node/payments-with-stripe', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1157,7 +1199,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/text-generation-with-huggingface' + 'node/text-generation-with-huggingface', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1192,7 +1235,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/language-translation-with-huggingface' + 'node/language-translation-with-huggingface', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1227,7 +1271,8 @@ return [ $templateRuntimes['NODE'], 'npm install && npm run setup', 'src/main.js', - 'node/image-classification-with-huggingface' + 'node/image-classification-with-huggingface', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1286,7 +1331,8 @@ return [ $templateRuntimes['NODE'], 'npm install && npm run setup', 'src/main.js', - 'node/object-detection-with-huggingface' + 'node/object-detection-with-huggingface', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1345,7 +1391,8 @@ return [ $templateRuntimes['NODE'], 'npm install && npm run setup', 'src/main.js', - 'node/speech-recognition-with-huggingface' + 'node/speech-recognition-with-huggingface', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1407,7 +1454,8 @@ return [ $templateRuntimes['NODE'], 'npm install && npm run setup', 'src/main.js', - 'node/text-to-speech-with-huggingface' + 'node/text-to-speech-with-huggingface', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1466,7 +1514,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/generate-with-replicate' + 'node/generate-with-replicate', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1502,7 +1551,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/generate-with-together-ai' + 'node/generate-with-together-ai', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1545,7 +1595,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/chat-with-perplexity-ai' + 'node/chat-with-perplexity-ai', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1587,7 +1638,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/generate-with-replicate' + 'node/generate-with-replicate', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1623,7 +1675,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/sync-with-pinecone' + 'node/sync-with-pinecone', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1687,7 +1740,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/rag-with-langchain' + 'node/rag-with-langchain', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1751,7 +1805,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/speak-with-elevenlabs' + 'node/speak-with-elevenlabs', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1807,7 +1862,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/speak-with-lmnt' + 'node/speak-with-lmnt', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1849,7 +1905,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/chat-with-anyscale' + 'node/chat-with-anyscale', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1891,7 +1948,8 @@ return [ $templateRuntimes['NODE'], 'npm install && npm run setup', 'src/main.js', - 'node/music-generation-with-huggingface' + 'node/music-generation-with-huggingface', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1934,7 +1992,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/generate-with-fal-ai' + 'node/generate-with-fal-ai', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -1970,7 +2029,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/subscriptions-with-lemon-squeezy' + 'node/subscriptions-with-lemon-squeezy', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -2026,7 +2086,8 @@ return [ $templateRuntimes['NODE'], 'npm install', 'src/main.js', - 'node/payments-with-lemon-squeezy' + 'node/payments-with-lemon-squeezy', + $allowList ) ], 'instructions' => 'For documentation and instructions check out file.', @@ -2094,7 +2155,7 @@ return [ 'timeout' => 15, 'useCases' => ['auth'], 'runtimes' => [ - ...getRuntimes($templateRuntimes['DART'], 'dart pub get', 'lib/main.dart', 'dart/sign_in_with_apple') + ...getRuntimes($templateRuntimes['DART'], 'dart pub get', 'lib/main.dart', 'dart/sign_in_with_apple', $allowList) ], 'instructions' => 'For documentation and instructions, check out file.', 'vcsProvider' => 'github', diff --git a/app/config/variables.php b/app/config/variables.php index 30686e2d75..17fd6217a5 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -362,7 +362,7 @@ return [ ], [ 'name' => '_APP_DB_ADAPTER', - 'description' => 'To switch between mariadb and mongoDB', + 'description' => 'Which database engine to use. Possible options are "mariadb" or "mongodb"', 'introduction' => '1.8.0', 'default' => 'mongoDB', 'required' => true, diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 80a8129494..67dd1256f2 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -888,7 +888,11 @@ App::patch('/v1/account/sessions/:sessionId') // Refresh OAuth access token $provider = $session->getAttribute('provider', ''); $refreshToken = $session->getAttribute('providerRefreshToken', ''); - $className = 'Appwrite\\Auth\\OAuth2\\' . \ucfirst($provider); + $oAuthProviders = Config::getParam('oAuthProviders'); + $className = $oAuthProviders[$provider]['class']; + if (!\class_exists($className)) { + throw new Exception(Exception::PROJECT_PROVIDER_UNSUPPORTED); + } if (!empty($provider) && \class_exists($className)) { $appId = $project->getAttribute('oAuthProviders', [])[$provider . 'Appid'] ?? ''; @@ -1466,8 +1470,8 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') $appSecret = $project->getAttribute('oAuthProviders', [])[$provider . 'Secret'] ?? '{}'; $providerEnabled = $project->getAttribute('oAuthProviders', [])[$provider . 'Enabled'] ?? false; - $className = 'Appwrite\\Auth\\OAuth2\\' . \ucfirst($provider); - + $oAuthProviders = Config::getParam('oAuthProviders'); + $className = $oAuthProviders[$provider]['class']; if (!\class_exists($className)) { throw new Exception(Exception::PROJECT_PROVIDER_UNSUPPORTED); } @@ -1981,8 +1985,8 @@ App::get('/v1/account/tokens/oauth2/:provider') throw new Exception(Exception::PROJECT_PROVIDER_DISABLED, 'This provider is disabled. Please configure the provider app ID and app secret key from your ' . APP_NAME . ' console to continue.'); } - $className = 'Appwrite\\Auth\\OAuth2\\' . \ucfirst($provider); - + $oAuthProviders = Config::getParam('oAuthProviders'); + $className = $oAuthProviders[$provider]['class']; if (!\class_exists($className)) { throw new Exception(Exception::PROJECT_PROVIDER_UNSUPPORTED); } diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 27f1ff14f0..d82721c3ee 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -96,8 +96,8 @@ $getUserGitHub = function (string $userId, Document $project, Database $dbForPro $appId = $project->getAttribute('oAuthProviders', [])[$provider . 'Appid'] ?? ''; $appSecret = $project->getAttribute('oAuthProviders', [])[$provider . 'Secret'] ?? '{}'; - $className = 'Appwrite\\Auth\\OAuth2\\' . \ucfirst($provider); - + $oAuthProviders = Config::getParam('oAuthProviders'); + $className = $oAuthProviders[$provider]['class']; if (!\class_exists($className)) { throw new Exception(Exception::PROJECT_PROVIDER_UNSUPPORTED); } @@ -662,26 +662,26 @@ App::get('/v1/avatars/screenshots') ], contentType: ContentType::IMAGE_PNG )) - ->param('url', '', new URL(['http', 'https']), 'Website URL which you want to capture.') - ->param('headers', [], new Assoc(), 'HTTP headers to send with the browser request. Defaults to empty.', true) - ->param('viewportWidth', 1280, new Range(1, 1920), 'Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.', true) - ->param('viewportHeight', 720, new Range(1, 1080), 'Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.', true) - ->param('scale', 1, new Range(0.1, 3, Range::TYPE_FLOAT), 'Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.', true) - ->param('theme', 'light', new WhiteList(['light', 'dark']), 'Browser theme. Pass "light" or "dark". Defaults to "light".', true) - ->param('userAgent', '', new Text(512), 'Custom user agent string. Defaults to browser default.', true) - ->param('fullpage', false, new Boolean(true), 'Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.', true) - ->param('locale', '', new Text(10), 'Browser locale (e.g., "en-US", "fr-FR"). Defaults to browser default.', true) - ->param('timezone', '', new WhiteList(timezone_identifiers_list()), 'IANA timezone identifier (e.g., "America/New_York", "Europe/London"). Defaults to browser default.', true) - ->param('latitude', 0, new Range(-90, 90, Range::TYPE_FLOAT), 'Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.', true) - ->param('longitude', 0, new Range(-180, 180, Range::TYPE_FLOAT), 'Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.', true) - ->param('accuracy', 0, new Range(0, 100000, Range::TYPE_FLOAT), 'Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.', true) - ->param('touch', false, new Boolean(true), 'Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.', true) - ->param('permissions', [], new ArrayList(new WhiteList(['geolocation', 'camera', 'microphone', 'notifications', 'midi', 'push', 'clipboard-read', 'clipboard-write', 'payment-handler', 'usb', 'bluetooth', 'accelerometer', 'gyroscope', 'magnetometer', 'ambient-light-sensor', 'background-sync', 'persistent-storage', 'screen-wake-lock', 'web-share', 'xr-spatial-tracking'])), 'Browser permissions to grant. Pass an array of permission names like ["geolocation", "camera", "microphone"]. Defaults to empty.', true) - ->param('sleep', 0, new Range(0, 10), 'Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.', true) - ->param('width', 0, new Range(0, 2000), 'Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).', true) - ->param('height', 0, new Range(0, 2000), 'Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).', true) - ->param('quality', -1, new Range(-1, 100), 'Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.', true) - ->param('output', '', new WhiteList(\array_keys(Config::getParam('storage-outputs')), true), 'Output format type (jpeg, jpg, png, gif and webp).', true) + ->param('url', '', new URL(['http', 'https']), 'Website URL which you want to capture.', example: 'https://example.com') + ->param('headers', [], new Assoc(), 'HTTP headers to send with the browser request. Defaults to empty.', true, example: '{"Authorization":"Bearer token123","X-Custom-Header":"value"}') + ->param('viewportWidth', 1280, new Range(1, 1920), 'Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.', true, example: '1920') + ->param('viewportHeight', 720, new Range(1, 1080), 'Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.', true, example: '1080') + ->param('scale', 1, new Range(0.1, 3, Range::TYPE_FLOAT), 'Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.', true, example: '2') + ->param('theme', 'light', new WhiteList(['light', 'dark']), 'Browser theme. Pass "light" or "dark". Defaults to "light".', true, example: 'dark') + ->param('userAgent', '', new Text(512), 'Custom user agent string. Defaults to browser default.', true, example: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15') + ->param('fullpage', false, new Boolean(true), 'Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.', true, example: 'true') + ->param('locale', '', new Text(10), 'Browser locale (e.g., "en-US", "fr-FR"). Defaults to browser default.', true, example: 'en-US') + ->param('timezone', '', new WhiteList(timezone_identifiers_list()), 'IANA timezone identifier (e.g., "America/New_York", "Europe/London"). Defaults to browser default.', true, example: 'america/new_york') + ->param('latitude', 0, new Range(-90, 90, Range::TYPE_FLOAT), 'Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.', true, example: '37.7749') + ->param('longitude', 0, new Range(-180, 180, Range::TYPE_FLOAT), 'Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.', true, example: '-122.4194') + ->param('accuracy', 0, new Range(0, 100000, Range::TYPE_FLOAT), 'Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.', true, example: '100') + ->param('touch', false, new Boolean(true), 'Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.', true, example: 'true') + ->param('permissions', [], new ArrayList(new WhiteList(['geolocation', 'camera', 'microphone', 'notifications', 'midi', 'push', 'clipboard-read', 'clipboard-write', 'payment-handler', 'usb', 'bluetooth', 'accelerometer', 'gyroscope', 'magnetometer', 'ambient-light-sensor', 'background-sync', 'persistent-storage', 'screen-wake-lock', 'web-share', 'xr-spatial-tracking'])), 'Browser permissions to grant. Pass an array of permission names like ["geolocation", "camera", "microphone"]. Defaults to empty.', true, example: '["geolocation","notifications"]') + ->param('sleep', 0, new Range(0, 10), 'Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.', true, example: '3') + ->param('width', 0, new Range(0, 2000), 'Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).', true, example: '800') + ->param('height', 0, new Range(0, 2000), 'Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).', true, example: '600') + ->param('quality', -1, new Range(-1, 100), 'Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.', true, example: '85') + ->param('output', '', new WhiteList(\array_keys(Config::getParam('storage-outputs')), true), 'Output format type (jpeg, jpg, png, gif and webp).', true, example: 'jpeg') ->inject('response') ->inject('queueForStatsUsage') ->action(function (string $url, array $headers, int $viewportWidth, int $viewportHeight, float $scale, string $theme, string $userAgent, bool $fullpage, string $locale, string $timezone, float $latitude, float $longitude, float $accuracy, bool $touch, array $permissions, int $sleep, int $width, int $height, int $quality, string $output, Response $response, StatsUsage $queueForStatsUsage) { diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 5314278e72..14ed30820d 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -46,9 +46,9 @@ include_once __DIR__ . '/../shared/api.php'; function getDatabaseTransferResourceServices(string $databaseType) { return match($databaseType) { - DATABASE_LEGACY_TYPE, - DATABASE_TABLESDB_TYPE => Transfer::GROUP_DATABASES_TABLES_DB, - DATABASE_VECTORDB_TYPE => Transfer::GROUP_DATABASES_VECTOR_DB + DATABASE_TYPE_LEGACY, + DATABASE_TYPE_TABLESDB => Transfer::GROUP_DATABASES_TABLES_DB, + DATABASE_TYPE_VECTORDB => Transfer::GROUP_DATABASES_VECTOR_DB }; } diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 55d6fb8003..2d17ccbafb 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -61,15 +61,20 @@ App::get('/v1/project/usage') METRIC_EXECUTIONS_MB_SECONDS, METRIC_BUILDS_MB_SECONDS, METRIC_DOCUMENTS, + METRIC_DOCUMENTS_DOCUMENTSDB, METRIC_DATABASES, + METRIC_DATABASES_DOCUMENTSDB, METRIC_USERS, METRIC_BUCKETS, METRIC_FILES_STORAGE, METRIC_DATABASES_STORAGE, + METRIC_DATABASES_STORAGE_DOCUMENTSDB, METRIC_DEPLOYMENTS_STORAGE, METRIC_BUILDS_STORAGE, METRIC_DATABASES_OPERATIONS_READS, + METRIC_DATABASES_OPERATIONS_READS_DOCUMENTSDB, METRIC_DATABASES_OPERATIONS_WRITES, + METRIC_DATABASES_OPERATIONS_WRITES_DOCUMENTSDB, METRIC_FILES_IMAGES_TRANSFORMED, METRIC_EMBEDDINGS_TEXT, METRIC_EMBEDDINGS_TEXT_TOTAL_TOKENS, @@ -83,10 +88,13 @@ App::get('/v1/project/usage') METRIC_USERS, METRIC_EXECUTIONS, METRIC_DATABASES_STORAGE, + METRIC_DATABASES_STORAGE_DOCUMENTSDB, METRIC_EXECUTIONS_MB_SECONDS, METRIC_BUILDS_MB_SECONDS, METRIC_DATABASES_OPERATIONS_READS, + METRIC_DATABASES_OPERATIONS_READS_DOCUMENTSDB, METRIC_DATABASES_OPERATIONS_WRITES, + METRIC_DATABASES_OPERATIONS_WRITES_DOCUMENTSDB, METRIC_FILES_IMAGES_TRANSFORMED, METRIC_EMBEDDINGS_TEXT, METRIC_EMBEDDINGS_TEXT_TOTAL_TOKENS, @@ -364,8 +372,11 @@ App::get('/v1/project/usage') 'buildsMbSecondsTotal' => $total[METRIC_BUILDS_MB_SECONDS], 'documentsTotal' => $total[METRIC_DOCUMENTS], 'rowsTotal' => $total[METRIC_DOCUMENTS], + 'documentsdbDocumentsTotal' => $total[METRIC_DOCUMENTS_DOCUMENTSDB], 'databasesTotal' => $total[METRIC_DATABASES], + 'documentsdbTotal' => $total[METRIC_DATABASES_DOCUMENTSDB], 'databasesStorageTotal' => $total[METRIC_DATABASES_STORAGE], + 'documentsdbDatabasesStorageTotal' => $total[METRIC_DATABASES_STORAGE_DOCUMENTSDB], 'usersTotal' => $total[METRIC_USERS], 'bucketsTotal' => $total[METRIC_BUCKETS], 'filesStorageTotal' => $total[METRIC_FILES_STORAGE], @@ -374,10 +385,15 @@ App::get('/v1/project/usage') 'deploymentsStorageTotal' => $total[METRIC_DEPLOYMENTS_STORAGE], 'databasesReadsTotal' => $total[METRIC_DATABASES_OPERATIONS_READS], 'databasesWritesTotal' => $total[METRIC_DATABASES_OPERATIONS_WRITES], + 'documentsdbDatabasesReadsTotal' => $total[METRIC_DATABASES_OPERATIONS_READS_DOCUMENTSDB], + 'documentsdbDatabasesWritesTotal' => $total[METRIC_DATABASES_OPERATIONS_WRITES_DOCUMENTSDB], 'executionsBreakdown' => $executionsBreakdown, 'bucketsBreakdown' => $bucketsBreakdown, 'databasesReads' => $usage[METRIC_DATABASES_OPERATIONS_READS], 'databasesWrites' => $usage[METRIC_DATABASES_OPERATIONS_WRITES], + 'documentsdbDatabasesReads' => $usage[METRIC_DATABASES_OPERATIONS_READS_DOCUMENTSDB], + 'documentsdbDatabasesWrites' => $usage[METRIC_DATABASES_OPERATIONS_WRITES_DOCUMENTSDB], + 'documentsdbDatabasesStorage' => $usage[METRIC_DATABASES_STORAGE_DOCUMENTSDB], 'databasesStorageBreakdown' => $databasesStorageBreakdown, 'executionsMbSecondsBreakdown' => $executionsMbSecondsBreakdown, 'buildsMbSecondsBreakdown' => $buildsMbSecondsBreakdown, diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 02fee04eac..30fcca8de0 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -50,107 +50,6 @@ use Utopia\Validator\Text; use Utopia\Validator\URL; use Utopia\Validator\WhiteList; -// for returning dsn of multitype dbs with type optionally based on input dsn -function getDatabaseDSN(string $databasetype, $region, ?string $dsn = null): string -{ - $isSharedTablesV1 = false; - $isSharedTablesV2 = false; - if (!empty($dsn)) { - try { - $parsedDsn = new DSN($dsn); - $dsnHost = $parsedDsn->getHost(); - } catch (\InvalidArgumentException) { - $dsnHost = $dsn; - } - - $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', '')); - $sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES_V1', '')); - $sharedTablesV2 = \array_diff($sharedTables, $sharedTablesV1); - $isSharedTablesV1 = \in_array($dsnHost, $sharedTablesV1); - $isSharedTablesV2 = \in_array($dsnHost, $sharedTablesV2); - } - - $databases = []; - $databaseKeys = []; - /** - * @var string|null $databaseOverride - */ - $databaseOverride = ''; - $dbScheme = ''; - $sharedTables = []; - $sharedTablesV1 = []; - $sharedTablesV2 = []; - - switch ($databasetype) { - case 'documentsDatabase': - $databases = Config::getParam('pools-documentsdb', []); - $databaseKeys = System::getEnv('_APP_DATABASE_DOCUMENTSDB_KEYS', ''); - $databaseOverride = System::getEnv('_APP_DATABASE_DOCUMENTSDB_OVERRIDE'); - $dbScheme = System::getEnv('_APP_DB_HOST_DOCUMENTSDB', 'mongodb'); - $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_DOCUMENTSDB_SHARED_TABLES', '')); - $sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_DOCUMENTSDB_SHARED_TABLES_V1', '')); - break; - case 'vectorDatabase': - $databases = Config::getParam('pools-vectordb', []); - $databaseKeys = System::getEnv('_APP_DATABASE_VECTORDB_KEYS', ''); - $databaseOverride = System::getEnv('_APP_DATABASE_VECTORDB_OVERRIDE'); - $dbScheme = System::getEnv('_APP_DB_HOST_VECTORDB', 'postgresql'); - $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_VECTORDB_SHARED_TABLES', '')); - $sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_VECTORDB_SHARED_TABLES_V1', '')); - break; - default: - // legacy/tablesdb - $databases = Config::getParam('pools-database', []); - $databaseKeys = System::getEnv('_APP_DATABASE_KEYS', ''); - $databaseOverride = System::getEnv('_APP_DATABASE_OVERRIDE'); - $dbScheme = System::getEnv('_APP_DB_HOST', 'mysql'); - $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', '')); - $sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES_V1', '')); - break; - } - - if ($region !== 'default') { - $keys = explode(',', $databaseKeys); - $databases = array_filter($keys, function ($value) use ($region) { - return str_contains($value, $region); - }); - } - $sharedTablesV2 = \array_diff($sharedTables, $sharedTablesV1); - - $index = \array_search($databaseOverride, $databases); - if ($index !== false) { - $selectedDsn = $databases[$index]; - } else { - if (!empty($dsn)) { - if ($isSharedTablesV1) { - $databases = array_filter($databases, fn ($value) => \in_array($value, $sharedTablesV1)); - } elseif ($isSharedTablesV2) { - $databases = array_filter($databases, fn ($value) => \in_array($value, $sharedTablesV2)); - } else { - $databases = array_filter($databases, fn ($value) => !\in_array($value, $sharedTables)); - } - } - $selectedDsn = !empty($databases) ? $databases[array_rand($databases)] : ''; - } - - if (\in_array($selectedDsn, $sharedTables)) { - $schema = 'appwrite'; - $database = 'appwrite'; - $namespace = System::getEnv('_APP_DATABASE_SHARED_NAMESPACE', ''); - $selectedDsn = $schema . '://' . $selectedDsn . '?database=' . $database; - - if (!empty($namespace)) { - $selectedDsn .= '&namespace=' . $namespace; - } - } - try { - new DSN($selectedDsn); - } catch (\InvalidArgumentException) { - $selectedDsn = $dbScheme.'://' . $selectedDsn; - } - return $selectedDsn; -} - App::init() ->groups(['projects']) ->inject('project') @@ -200,6 +99,105 @@ App::post('/v1/projects') ->inject('hooks') ->action(function (string $projectId, string $name, string $teamId, string $region, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, Request $request, Response $response, Database $dbForPlatform, Cache $cache, Group $pools, Hooks $hooks) { + // for returning dsn of multitype dbs with type optionally based on input dsn + $getDatabaseDSN = function (string $databasetype, $region, ?string $dsn = null): string { + $isSharedTablesV1 = false; + $isSharedTablesV2 = false; + if (!empty($dsn)) { + try { + $parsedDsn = new DSN($dsn); + $dsnHost = $parsedDsn->getHost(); + } catch (\InvalidArgumentException) { + $dsnHost = $dsn; + } + + $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', '')); + $sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES_V1', '')); + $sharedTablesV2 = \array_diff($sharedTables, $sharedTablesV1); + $isSharedTablesV1 = \in_array($dsnHost, $sharedTablesV1); + $isSharedTablesV2 = \in_array($dsnHost, $sharedTablesV2); + } + + $databases = []; + $databaseKeys = []; + /** + * @var string|null $databaseOverride + */ + $databaseOverride = ''; + $dbScheme = ''; + $sharedTables = []; + $sharedTablesV1 = []; + $sharedTablesV2 = []; + + switch ($databasetype) { + case 'documentsDatabase': + $databases = Config::getParam('pools-documentsdb', []); + $databaseKeys = System::getEnv('_APP_DATABASE_DOCUMENTSDB_KEYS', ''); + $databaseOverride = System::getEnv('_APP_DATABASE_DOCUMENTSDB_OVERRIDE'); + $dbScheme = System::getEnv('_APP_DB_HOST_DOCUMENTSDB', 'mongodb'); + $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_DOCUMENTSDB_SHARED_TABLES', '')); + $sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_DOCUMENTSDB_SHARED_TABLES_V1', '')); + break; + case 'vectorDatabase': + $databases = Config::getParam('pools-vectordb', []); + $databaseKeys = System::getEnv('_APP_DATABASE_VECTORDB_KEYS', ''); + $databaseOverride = System::getEnv('_APP_DATABASE_VECTORDB_OVERRIDE'); + $dbScheme = System::getEnv('_APP_DB_HOST_VECTORDB', 'postgresql'); + $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_VECTORDB_SHARED_TABLES', '')); + $sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_VECTORDB_SHARED_TABLES_V1', '')); + break; + default: + // legacy/tablesdb + $databases = Config::getParam('pools-database', []); + $databaseKeys = System::getEnv('_APP_DATABASE_KEYS', ''); + $databaseOverride = System::getEnv('_APP_DATABASE_OVERRIDE'); + $dbScheme = System::getEnv('_APP_DB_HOST', 'mysql'); + $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', '')); + $sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES_V1', '')); + break; + } + + if ($region !== 'default') { + $keys = explode(',', $databaseKeys); + $databases = array_filter($keys, function ($value) use ($region) { + return str_contains($value, $region); + }); + } + $sharedTablesV2 = \array_diff($sharedTables, $sharedTablesV1); + + $index = \array_search($databaseOverride, $databases); + if ($index !== false) { + $selectedDsn = $databases[$index]; + } else { + if (!empty($dsn)) { + if ($isSharedTablesV1) { + $databases = array_filter($databases, fn ($value) => \in_array($value, $sharedTablesV1)); + } elseif ($isSharedTablesV2) { + $databases = array_filter($databases, fn ($value) => \in_array($value, $sharedTablesV2)); + } else { + $databases = array_filter($databases, fn ($value) => !\in_array($value, $sharedTables)); + } + } + $selectedDsn = !empty($databases) ? $databases[array_rand($databases)] : ''; + } + + if (\in_array($selectedDsn, $sharedTables)) { + $schema = 'appwrite'; + $database = 'appwrite'; + $namespace = System::getEnv('_APP_DATABASE_SHARED_NAMESPACE', ''); + $selectedDsn = $schema . '://' . $selectedDsn . '?database=' . $database; + + if (!empty($namespace)) { + $selectedDsn .= '&namespace=' . $namespace; + } + } + try { + new DSN($selectedDsn); + } catch (\InvalidArgumentException) { + $selectedDsn = $dbScheme.'://' . $selectedDsn; + } + return $selectedDsn; + }; $team = $dbForPlatform->getDocument('teams', $teamId); if ($team->isEmpty()) { @@ -238,7 +236,7 @@ App::post('/v1/projects') throw new Exception(Exception::PROJECT_RESERVED_PROJECT, "'console' is a reserved project."); } - $dsn = getDatabaseDSN('databases', $region); + $dsn = $getDatabaseDSN('databases', $region); try { $project = $dbForPlatform->createDocument('projects', new Document([ @@ -273,8 +271,8 @@ App::post('/v1/projects') 'accessedAt' => DateTime::now(), 'search' => implode(' ', [$projectId, $name]), 'database' => $dsn, - 'documentsDatabase' => getDatabaseDSN('documentsDatabase', $region, $dsn), - 'vectorDatabase' => getDatabaseDSN('vectorDatabase', $region, $dsn) + 'documentsDatabase' => $getDatabaseDSN('documentsDatabase', $region, $dsn), + 'vectorDatabase' => $getDatabaseDSN('vectorDatabase', $region, $dsn) ])); } catch (Duplicate) { throw new Exception(Exception::PROJECT_ALREADY_EXISTS); diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 185c737399..bfd208fc15 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -681,7 +681,13 @@ App::post('/v1/storage/buckets/:bucketId/files') 'metadata' => $metadata, ]); - $file = $dbForProject->createDocument('bucket_' . $bucket->getSequence(), $doc); + try { + $file = $dbForProject->createDocument('bucket_' . $bucket->getSequence(), $doc); + } catch (DuplicateException) { + throw new Exception(Exception::STORAGE_FILE_ALREADY_EXISTS); + } catch (NotFoundException) { + throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); + } } else { $file = $file ->setAttribute('$permissions', $permissions) @@ -731,6 +737,8 @@ App::post('/v1/storage/buckets/:bucketId/files') try { $file = $dbForProject->createDocument('bucket_' . $bucket->getSequence(), $doc); + } catch (DuplicateException) { + throw new Exception(Exception::STORAGE_FILE_ALREADY_EXISTS); } catch (NotFoundException) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 298322671e..cfb43ce5e7 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -72,6 +72,18 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; +/** + * Get database type prefixed metric + * Prefixes the metric with database type if it's not legacy or tablesdb + * + * @param string $databaseType Database type (e.g., 'documentsdb', 'tablesdb', 'legacy', '') + * @param string $metric Base metric constant (e.g., METRIC_DATABASES, METRIC_COLLECTIONS) + * @return string Prefixed metric or original metric if no prefix needed + */ +$getDatabaseTypePrefixedMetric = function (string $databaseType, string $metric): string { + return implode('.', array_filter([$databaseType, $metric])); +}; + /** * This isolated event handling for `users.*.create` which is based on a `Database::EVENT_DOCUMENT_CREATE` listener may look odd, but it is **intentional**. * @@ -110,7 +122,7 @@ $eventDatabaseListener = function (Document $project, Document $document, Respon } }; -$usageDatabaseListener = function (string $event, Document $document, StatsUsage $queueForStatsUsage) { +$usageDatabaseListener = function (string $event, Document $document, StatsUsage $queueForStatsUsage, string $databaseType) use ($getDatabaseTypePrefixedMetric) { $value = 1; switch ($event) { @@ -142,7 +154,8 @@ $usageDatabaseListener = function (string $event, Document $document, StatsUsage $queueForStatsUsage->addMetric(METRIC_SESSIONS, $value); //per project break; case $document->getCollection() === 'databases': // databases - $queueForStatsUsage->addMetric(METRIC_DATABASES, $value); // per project + $metric = $getDatabaseTypePrefixedMetric($databaseType, METRIC_DATABASES); + $queueForStatsUsage->addMetric($metric, $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForStatsUsage->addReduce($document); @@ -151,22 +164,29 @@ $usageDatabaseListener = function (string $event, Document $document, StatsUsage case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections $parts = explode('_', $document->getCollection()); $databaseInternalId = $parts[1] ?? 0; + $collectionMetric = $getDatabaseTypePrefixedMetric($databaseType, METRIC_COLLECTIONS); + $databaseIdCollectionMetric = $getDatabaseTypePrefixedMetric($databaseType, METRIC_DATABASE_ID_COLLECTIONS); $queueForStatsUsage - ->addMetric(METRIC_COLLECTIONS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_COLLECTIONS), $value); + ->addMetric($collectionMetric, $value) // per project + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, $databaseIdCollectionMetric), $value); if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForStatsUsage->addReduce($document); } break; + // for databases route documents are getting created via getDatabasesDB and stats are maintained in the resources + // but keeping it since other routes might created documents still directly via dbForProject case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents $parts = explode('_', $document->getCollection()); $databaseInternalId = $parts[1] ?? 0; $collectionInternalId = $parts[3] ?? 0; + $documentsMetric = $getDatabaseTypePrefixedMetric($databaseType, METRIC_DOCUMENTS); + $databaseIdDocumentsMetric = $getDatabaseTypePrefixedMetric($databaseType, METRIC_DATABASE_ID_DOCUMENTS); + $databaseIdCollectionIdDocumentsMetric = $getDatabaseTypePrefixedMetric($databaseType, METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS); $queueForStatsUsage - ->addMetric(METRIC_DOCUMENTS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database - ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection + ->addMetric($documentsMetric, $value) // per project + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, $databaseIdDocumentsMetric), $value) // per database + ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], $databaseIdCollectionIdDocumentsMetric), $value); // per collection break; case $document->getCollection() === 'buckets': //buckets $queueForStatsUsage @@ -506,6 +526,11 @@ App::init() ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Publisher $publisher, Publisher $publisherFunctions, Publisher $publisherWebhooks, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, StatsUsage $queueForStatsUsage, Database $dbForProject, callable $timelimit, Document $resourceToken, string $mode, ?Key $apiKey, array $plan, Document $devKey, Telemetry $telemetry) use ($usageDatabaseListener, $eventDatabaseListener) { $route = $utopia->getRoute(); + $path = $route->getMatchedPath(); + $databaseType = match (true) { + str_contains($path, '/documentsdb') => DATABASE_TYPE_DOCUMENTSDB, + default => '', + }; if ( array_key_exists('rest', $project->getAttribute('apis', [])) @@ -621,12 +646,14 @@ App::init() $queueForWebhooks = new Webhook($publisherWebhooks); $queueForRealtime = new Realtime(); + // to get consumed in the stats worker without calling to database + $queueForStatsUsage->setContext('database', new Document(['type' => $databaseType])); $dbForProject - ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage)) - ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage)) - ->on(Database::EVENT_DOCUMENTS_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage)) - ->on(Database::EVENT_DOCUMENTS_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage)) - ->on(Database::EVENT_DOCUMENTS_UPSERT, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage)) + ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage, $databaseType)) + ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage, $databaseType)) + ->on(Database::EVENT_DOCUMENTS_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage, $databaseType)) + ->on(Database::EVENT_DOCUMENTS_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage, $databaseType)) + ->on(Database::EVENT_DOCUMENTS_UPSERT, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage, $databaseType)) ->on(Database::EVENT_DOCUMENT_CREATE, 'create-trigger-events', fn ($event, $document) => $eventDatabaseListener( $project, $document, diff --git a/app/init/configs.php b/app/init/configs.php index 51242af578..6fa3b576d5 100644 --- a/app/init/configs.php +++ b/app/init/configs.php @@ -7,6 +7,8 @@ require_once __DIR__ . '/../config/storage/resource_limits.php'; $configAdapter = new PHP(); +Config::load('runtimes', __DIR__ . '/../config/runtimes.php', $configAdapter); +Config::load('runtimes-v2', __DIR__ . '/../config/runtimes-v2.php', $configAdapter); Config::load('template-runtimes', __DIR__ . '/../config/template-runtimes.php', $configAdapter); Config::load('events', __DIR__ . '/../config/events.php', $configAdapter); Config::load('auth', __DIR__ . '/../config/auth.php', $configAdapter); @@ -17,8 +19,6 @@ Config::load('platforms', __DIR__ . '/../config/platforms.php', $configAdapter); Config::load('console', __DIR__ . '/../config/console.php', $configAdapter); Config::load('collections', __DIR__ . '/../config/collections.php', $configAdapter); Config::load('frameworks', __DIR__ . '/../config/frameworks.php', $configAdapter); -Config::load('runtimes', __DIR__ . '/../config/runtimes.php', $configAdapter); -Config::load('runtimes-v2', __DIR__ . '/../config/runtimes-v2.php', $configAdapter); Config::load('usage', __DIR__ . '/../config/usage.php', $configAdapter); Config::load('roles', __DIR__ . '/../config/roles.php', $configAdapter); // User roles and scopes Config::load('scopes', __DIR__ . '/../config/scopes.php', $configAdapter); // User roles and scopes diff --git a/app/init/constants.php b/app/init/constants.php index e0b72bf1ad..02576c6478 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -264,6 +264,22 @@ const METRIC_DATABASES_OPERATIONS_READS = 'databases.operations.reads'; const METRIC_DATABASE_ID_OPERATIONS_READS = '{databaseInternalId}.databases.operations.reads'; const METRIC_DATABASES_OPERATIONS_WRITES = 'databases.operations.writes'; const METRIC_DATABASE_ID_OPERATIONS_WRITES = '{databaseInternalId}.databases.operations.writes'; + +// documentsdb +const METRIC_DATABASES_DOCUMENTSDB = 'documentsdb.databases'; +const METRIC_COLLECTIONS_DOCUMENTSDB = 'documentsdb.collections'; +const METRIC_DATABASES_STORAGE_DOCUMENTSDB = 'documentsdb.databases.storage'; +const METRIC_DATABASE_ID_COLLECTIONS_DOCUMENTSDB = 'documentsdb.{databaseInternalId}.collections'; +const METRIC_DATABASE_ID_STORAGE_DOCUMENTSDB = 'documentsdb.{databaseInternalId}.databases.storage'; +const METRIC_DOCUMENTS_DOCUMENTSDB = 'documentsdb.documents'; +const METRIC_DATABASE_ID_DOCUMENTS_DOCUMENTSDB = 'documentsdb.{databaseInternalId}.documents'; +const METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS_DOCUMENTSDB = 'documentsdb.{databaseInternalId}.{collectionInternalId}.documents'; +const METRIC_DATABASE_ID_COLLECTION_ID_STORAGE_DOCUMENTSDB = 'documentsdb.{databaseInternalId}.{collectionInternalId}.databases.storage'; +const METRIC_DATABASES_OPERATIONS_READS_DOCUMENTSDB = 'documentsdb.databases.operations.reads'; +const METRIC_DATABASE_ID_OPERATIONS_READS_DOCUMENTSDB = 'documentsdb.{databaseInternalId}.databases.operations.reads'; +const METRIC_DATABASES_OPERATIONS_WRITES_DOCUMENTSDB = 'documentsdb.databases.operations.writes'; +const METRIC_DATABASE_ID_OPERATIONS_WRITES_DOCUMENTSDB = 'documentsdb.{databaseInternalId}.databases.operations.writes'; + const METRIC_BUCKETS = 'buckets'; const METRIC_FILES = 'files'; const METRIC_FILES_STORAGE = 'files.storage'; @@ -370,10 +386,10 @@ const SCHEDULE_RESOURCE_TYPE_MESSAGE = 'message'; const COOKIE_NAME_PREVIEW = 'a_jwt_console'; // Database types -const DATABASE_LEGACY_TYPE = 'legacy'; -const DATABASE_TABLESDB_TYPE = 'tablesdb'; -const DATABASE_DOCUMENTSDB_TYPE = 'documentsdb'; -const DATABASE_VECTORDB_TYPE = 'vectordb'; +const DATABASE_TYPE_LEGACY = 'legacy'; +const DATABASE_TYPE_TABLESDB = 'tablesdb'; +const DATABASE_TYPE_DOCUMENTSDB = 'documentsdb'; +const DATABASE_TYPE_VECTORDB = 'vectordb'; // CSV import/export allowed database types -const CSV_ALLOWED_DATABASE_TYPES = [DATABASE_LEGACY_TYPE, DATABASE_LEGACY_TYPE, DATABASE_VECTORDB_TYPE]; +const CSV_ALLOWED_DATABASE_TYPES = [DATABASE_TYPE_LEGACY, DATABASE_TYPE_LEGACY, DATABASE_TYPE_VECTORDB]; diff --git a/app/init/resources.php b/app/init/resources.php index 6750804e13..994fecea1d 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -485,13 +485,14 @@ App::setResource('dbForPlatform', function (Group $pools, Cache $cache) { App::setResource('getDatabasesDB', function (Group $pools, Cache $cache, Document $project, Request $request, StatsUsage $queueForStatsUsage) { return function (Document $database) use ($pools, $cache, $project, $request, $queueForStatsUsage): Database { - $databaseType = $database->getAttribute('database', ''); + $databaseDSN = $database->getAttribute('database', ''); + $databaseType = $database->getAttribute('type', ''); try { - $databaseDSN = new DSN($databaseType); + $databaseDSN = new DSN($databaseDSN); } catch (\InvalidArgumentException) { // for old databases migrated through patch script - // databaseType determines the adapter - $databaseDSN = new DSN('mysql://'.$databaseType); + // databaseDSN determines the adapter + $databaseDSN = new DSN('mysql://'.$databaseDSN); } try { $dsn = new DSN($project->getAttribute('database')); @@ -529,8 +530,16 @@ App::setResource('getDatabasesDB', function (Group $pools, Cache $cache, Documen } // Register database event listeners for usage stats collection + $documentsMetric = METRIC_DOCUMENTS; + $databaseIdDocumentsMetric = METRIC_DATABASE_ID_DOCUMENTS; + $databaseIdCollectionIdDocumentsMetric = METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS; + if ($databaseType !== DATABASE_TYPE_LEGACY && $databaseType !== DATABASE_TYPE_TABLESDB) { + $documentsMetric = $databaseType. '.' .$documentsMetric; + $databaseIdDocumentsMetric = $databaseType. '.' .$databaseIdDocumentsMetric; + $databaseIdCollectionIdDocumentsMetric = $databaseType . '.' .$databaseIdCollectionIdDocumentsMetric; + } $database - ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', function ($event, $document) use ($queueForStatsUsage) { + ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', function ($event, $document) use ($queueForStatsUsage, $documentsMetric, $databaseIdDocumentsMetric, $databaseIdCollectionIdDocumentsMetric) { $value = 1; if (str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_')) { @@ -538,12 +547,12 @@ App::setResource('getDatabasesDB', function (Group $pools, Cache $cache, Documen $databaseInternalId = $parts[1] ?? 0; $collectionInternalId = $parts[3] ?? 0; $queueForStatsUsage - ->addMetric(METRIC_DOCUMENTS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database - ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection + ->addMetric($documentsMetric, $value) // per project + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, $databaseIdDocumentsMetric), $value) // per database + ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], $databaseIdCollectionIdDocumentsMetric), $value); // per collection } }) - ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', function ($event, $document) use ($queueForStatsUsage) { + ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', function ($event, $document) use ($queueForStatsUsage, $documentsMetric, $databaseIdDocumentsMetric, $databaseIdCollectionIdDocumentsMetric) { $value = -1; if (str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_')) { @@ -551,12 +560,12 @@ App::setResource('getDatabasesDB', function (Group $pools, Cache $cache, Documen $databaseInternalId = $parts[1] ?? 0; $collectionInternalId = $parts[3] ?? 0; $queueForStatsUsage - ->addMetric(METRIC_DOCUMENTS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database - ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection + ->addMetric($documentsMetric, $value) // per project + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, $databaseIdDocumentsMetric), $value) // per database + ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], $databaseIdCollectionIdDocumentsMetric), $value); // per collection } }) - ->on(Database::EVENT_DOCUMENTS_CREATE, 'calculate-usage', function ($event, $document) use ($queueForStatsUsage) { + ->on(Database::EVENT_DOCUMENTS_CREATE, 'calculate-usage', function ($event, $document) use ($queueForStatsUsage, $documentsMetric, $databaseIdDocumentsMetric, $databaseIdCollectionIdDocumentsMetric) { $value = $document->getAttribute('modified', 0); if (str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_')) { @@ -564,12 +573,12 @@ App::setResource('getDatabasesDB', function (Group $pools, Cache $cache, Documen $databaseInternalId = $parts[1] ?? 0; $collectionInternalId = $parts[3] ?? 0; $queueForStatsUsage - ->addMetric(METRIC_DOCUMENTS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database - ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection + ->addMetric($documentsMetric, $value) // per project + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, $databaseIdDocumentsMetric), $value) // per database + ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], $databaseIdCollectionIdDocumentsMetric), $value); // per collection } }) - ->on(Database::EVENT_DOCUMENTS_DELETE, 'calculate-usage', function ($event, $document) use ($queueForStatsUsage) { + ->on(Database::EVENT_DOCUMENTS_DELETE, 'calculate-usage', function ($event, $document) use ($queueForStatsUsage, $documentsMetric, $databaseIdDocumentsMetric, $databaseIdCollectionIdDocumentsMetric) { $value = -1 * $document->getAttribute('modified', 0); if (str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_')) { @@ -577,12 +586,12 @@ App::setResource('getDatabasesDB', function (Group $pools, Cache $cache, Documen $databaseInternalId = $parts[1] ?? 0; $collectionInternalId = $parts[3] ?? 0; $queueForStatsUsage - ->addMetric(METRIC_DOCUMENTS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database - ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection + ->addMetric($documentsMetric, $value) // per project + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, $databaseIdDocumentsMetric), $value) // per database + ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], $databaseIdCollectionIdDocumentsMetric), $value); // per collection } }) - ->on(Database::EVENT_DOCUMENTS_UPSERT, 'calculate-usage', function ($event, $document) use ($queueForStatsUsage) { + ->on(Database::EVENT_DOCUMENTS_UPSERT, 'calculate-usage', function ($event, $document) use ($queueForStatsUsage, $documentsMetric, $databaseIdDocumentsMetric, $databaseIdCollectionIdDocumentsMetric) { $value = $document->getAttribute('created', 0); if (str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_')) { @@ -590,9 +599,9 @@ App::setResource('getDatabasesDB', function (Group $pools, Cache $cache, Documen $databaseInternalId = $parts[1] ?? 0; $collectionInternalId = $parts[3] ?? 0; $queueForStatsUsage - ->addMetric(METRIC_DOCUMENTS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database - ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection + ->addMetric($documentsMetric, $value) // per project + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, $databaseIdDocumentsMetric), $value) // per database + ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], $databaseIdCollectionIdDocumentsMetric), $value); // per collection } }); diff --git a/app/realtime.php b/app/realtime.php index 3a68947cf6..734dcd70bb 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -8,6 +8,7 @@ use Appwrite\PubSub\Adapter\Pool as PubSubPool; use Appwrite\Utopia\Database\Documents\User; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; +use Swoole\Coroutine; use Swoole\Http\Request as SwooleRequest; use Swoole\Http\Response as SwooleResponse; use Swoole\Runtime; @@ -52,14 +53,14 @@ Runtime::enableCoroutine(SWOOLE_HOOK_ALL); if (!function_exists('getConsoleDB')) { function getConsoleDB(): Database { - global $register; + $ctx = Coroutine::getContext(); - static $database = null; - - if ($database !== null) { - return $database; + if (isset($ctx['dbForPlatform'])) { + return $ctx['dbForPlatform']; } + global $register; + /** @var Group $pools */ $pools = $register->get('pools'); @@ -69,10 +70,8 @@ if (!function_exists('getConsoleDB')) { ->setNamespace('_console') ->setMetadata('host', \gethostname()) ->setMetadata('project', '_console'); - $database->setDocumentType('users', User::class); - - return $database; + return $ctx['dbForPlatform'] = $database; } } @@ -80,14 +79,18 @@ if (!function_exists('getConsoleDB')) { if (!function_exists('getProjectDB')) { function getProjectDB(Document $project): Database { - global $register; + $ctx = Coroutine::getContext(); - static $databases = []; - - if (isset($databases[$project->getSequence()])) { - return $databases[$project->getSequence()]; + if (!isset($ctx['dbForProject'])) { + $ctx['dbForProject'] = []; } + if (isset($ctx['dbForProject'][$project->getSequence()])) { + return $ctx['dbForProject'][$project->getSequence()]; + } + + global $register; + /** @var Group $pools */ $pools = $register->get('pools'); @@ -125,7 +128,7 @@ if (!function_exists('getProjectDB')) { $database->setDocumentType('users', User::class); - return $databases[$project->getSequence()] = $database; + return $ctx['dbForProject'][$project->getSequence()] = $database; } } @@ -133,14 +136,14 @@ if (!function_exists('getProjectDB')) { if (!function_exists('getCache')) { function getCache(): Cache { - global $register; + $ctx = Coroutine::getContext(); - static $cache = null; - - if ($cache !== null) { - return $cache; + if (isset($ctx['cache'])) { + return $ctx['cache']; } + global $register; + $pools = $register->get('pools'); /** @var Group $pools */ $list = Config::getParam('pools-cache', []); @@ -150,7 +153,7 @@ if (!function_exists('getCache')) { $adapters[] = new CachePool($pools->get($value)); } - return $cache = new Cache(new Sharding($adapters)); + return $ctx['cache'] = new Cache(new Sharding($adapters)); } } @@ -158,10 +161,10 @@ if (!function_exists('getCache')) { if (!function_exists('getRedis')) { function getRedis(): \Redis { - static $redis = null; + $ctx = Coroutine::getContext(); - if ($redis !== null) { - return $redis; + if (isset($ctx['redis'])) { + return $ctx['redis']; } $host = System::getEnv('_APP_REDIS_HOST', 'localhost'); @@ -175,46 +178,46 @@ if (!function_exists('getRedis')) { } $redis->setOption(\Redis::OPT_READ_TIMEOUT, -1); - return $redis; + return $ctx['redis'] = $redis; } } if (!function_exists('getTimelimit')) { - function getTimelimit(): TimeLimitRedis + function getTimelimit(string $key = "", int $limit = 0, int $seconds = 1): TimeLimitRedis { - static $timelimit = null; + $ctx = Coroutine::getContext(); - if ($timelimit !== null) { - return $timelimit; + if (isset($ctx['timelimit'])) { + return $ctx['timelimit']; } - return $timelimit = new TimeLimitRedis("", 0, 1, getRedis()); + return $ctx['timelimit'] = new TimeLimitRedis($key, $limit, $seconds, getRedis()); } } if (!function_exists('getRealtime')) { function getRealtime(): Realtime { - static $realtime = null; + $ctx = Coroutine::getContext(); - if ($realtime !== null) { - return $realtime; + if (isset($ctx['realtime'])) { + return $ctx['realtime']; } - return $realtime = new Realtime(); + return $ctx['realtime'] = new Realtime(); } } if (!function_exists('getTelemetry')) { function getTelemetry(int $workerId): Utopia\Telemetry\Adapter { - static $telemetry = null; + $ctx = Coroutine::getContext(); - if ($telemetry !== null) { - return $telemetry; + if (isset($ctx['telemetry'])) { + return $ctx['telemetry']; } - return $telemetry = new NoTelemetry(); + return $ctx['telemetry'] = new NoTelemetry(); } } diff --git a/composer.json b/composer.json index 3a9d53496f..fe83fd650f 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ "utopia-php/detector": "0.2.*", "utopia-php/domains": "0.9.*", "utopia-php/emails": "0.6.*", - "utopia-php/dns": "1.1.*", + "utopia-php/dns": "1.4.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", "utopia-php/fetch": "0.4.*", diff --git a/composer.lock b/composer.lock index 7c082386ce..065713e446 100644 --- a/composer.lock +++ b/composer.lock @@ -754,16 +754,16 @@ }, { "name": "google/protobuf", - "version": "v4.33.1", + "version": "v4.33.2", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "0cd73ccf0cd26c3e72299cce1ea6144091a57e12" + "reference": "fbd96b7bf1343f4b0d8fb358526c7ba4d72f1318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/0cd73ccf0cd26c3e72299cce1ea6144091a57e12", - "reference": "0cd73ccf0cd26c3e72299cce1ea6144091a57e12", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/fbd96b7bf1343f4b0d8fb358526c7ba4d72f1318", + "reference": "fbd96b7bf1343f4b0d8fb358526c7ba4d72f1318", "shasum": "" }, "require": { @@ -792,9 +792,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.33.1" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.33.2" }, - "time": "2025-11-12T21:58:05+00:00" + "time": "2025-12-05T22:12:22+00:00" }, { "name": "league/csv", @@ -2668,16 +2668,16 @@ }, { "name": "symfony/http-client", - "version": "v7.4.0", + "version": "v7.4.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "ee5e0e0139ab506f6063a230e631bed677c650a4" + "reference": "26cc224ea7103dda90e9694d9e139a389092d007" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/ee5e0e0139ab506f6063a230e631bed677c650a4", - "reference": "ee5e0e0139ab506f6063a230e631bed677c650a4", + "url": "https://api.github.com/repos/symfony/http-client/zipball/26cc224ea7103dda90e9694d9e139a389092d007", + "reference": "26cc224ea7103dda90e9694d9e139a389092d007", "shasum": "" }, "require": { @@ -2745,7 +2745,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.4.0" + "source": "https://github.com/symfony/http-client/tree/v7.4.1" }, "funding": [ { @@ -2765,7 +2765,7 @@ "type": "tidelift" } ], - "time": "2025-11-20T12:32:50+00:00" + "time": "2025-12-04T21:12:57+00:00" }, { "name": "symfony/http-client-contracts", @@ -4048,16 +4048,16 @@ }, { "name": "utopia-php/dns", - "version": "1.1.4", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/utopia-php/dns.git", - "reference": "eea6b9299a1420ae6c574f16eb1e9da8689ac56b" + "reference": "dce3453364a4524b7250db8d8eb74820b814409e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/dns/zipball/eea6b9299a1420ae6c574f16eb1e9da8689ac56b", - "reference": "eea6b9299a1420ae6c574f16eb1e9da8689ac56b", + "url": "https://api.github.com/repos/utopia-php/dns/zipball/dce3453364a4524b7250db8d8eb74820b814409e", + "reference": "dce3453364a4524b7250db8d8eb74820b814409e", "shasum": "" }, "require": { @@ -4099,9 +4099,9 @@ ], "support": { "issues": "https://github.com/utopia-php/dns/issues", - "source": "https://github.com/utopia-php/dns/tree/1.1.4" + "source": "https://github.com/utopia-php/dns/tree/1.4.0" }, - "time": "2025-11-26T13:38:10+00:00" + "time": "2025-12-05T10:09:00+00:00" }, { "name": "utopia-php/domains", @@ -4313,29 +4313,29 @@ }, { "name": "utopia-php/framework", - "version": "0.33.33", + "version": "0.33.34", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "838e3a28276e73187bc34a314f014096dc92191b" + "reference": "76def92594c32504ec80eaacdb60ff8fad73c856" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/838e3a28276e73187bc34a314f014096dc92191b", - "reference": "838e3a28276e73187bc34a314f014096dc92191b", + "url": "https://api.github.com/repos/utopia-php/http/zipball/76def92594c32504ec80eaacdb60ff8fad73c856", + "reference": "76def92594c32504ec80eaacdb60ff8fad73c856", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.3", "utopia-php/compression": "0.1.*", "utopia-php/telemetry": "0.1.*", "utopia-php/validators": "0.1.*" }, "require-dev": { - "laravel/pint": "^1.2", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.5.25" + "laravel/pint": "1.*", + "phpbench/phpbench": "1.*", + "phpstan/phpstan": "1.*", + "phpunit/phpunit": "9.*" }, "type": "library", "autoload": { @@ -4355,9 +4355,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.33" + "source": "https://github.com/utopia-php/http/tree/0.33.34" }, - "time": "2025-11-25T10:21:13+00:00" + "time": "2025-12-08T07:55:31+00:00" }, { "name": "utopia-php/image", @@ -4728,16 +4728,16 @@ }, { "name": "utopia-php/platform", - "version": "0.7.12", + "version": "0.7.13", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "04255de21db75e90b170040f4d1b457ba721e7a5" + "reference": "77a863a920122e2c6a6bc6ee5548d366a3f4c6c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/04255de21db75e90b170040f4d1b457ba721e7a5", - "reference": "04255de21db75e90b170040f4d1b457ba721e7a5", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/77a863a920122e2c6a6bc6ee5548d366a3f4c6c7", + "reference": "77a863a920122e2c6a6bc6ee5548d366a3f4c6c7", "shasum": "" }, "require": { @@ -4750,6 +4750,7 @@ }, "require-dev": { "laravel/pint": "1.*", + "phpstan/phpstan": "2.*", "phpunit/phpunit": "9.*" }, "type": "library", @@ -4772,9 +4773,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.7.12" + "source": "https://github.com/utopia-php/platform/tree/0.7.13" }, - "time": "2025-09-05T15:53:12+00:00" + "time": "2025-12-08T10:02:40+00:00" }, { "name": "utopia-php/pools", @@ -5001,16 +5002,16 @@ }, { "name": "utopia-php/storage", - "version": "0.18.14", + "version": "0.18.16", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "4f14ec952c6f4006dd0613e55bbf7631814fbc00" + "reference": "0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/4f14ec952c6f4006dd0613e55bbf7631814fbc00", - "reference": "4f14ec952c6f4006dd0613e55bbf7631814fbc00", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f", + "reference": "0c7b8ad68de8e1eb23ccc8af9f27a30eb832930f", "shasum": "" }, "require": { @@ -5053,9 +5054,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.18.14" + "source": "https://github.com/utopia-php/storage/tree/0.18.16" }, - "time": "2025-10-07T10:21:47+00:00" + "time": "2025-12-03T02:15:45+00:00" }, { "name": "utopia-php/swoole", @@ -6009,16 +6010,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.6.2", + "version": "v5.7.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "3a454ca033b9e06b63282ce19562e892747449bb" + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", - "reference": "3a454ca033b9e06b63282ce19562e892747449bb", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", "shasum": "" }, "require": { @@ -6061,9 +6062,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" }, - "time": "2025-10-21T19:32:17+00:00" + "time": "2025-12-06T11:56:16+00:00" }, { "name": "phar-io/manifest", @@ -6712,16 +6713,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.30", + "version": "9.6.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b69489b312503bf8fa6d75a76916919d7d2fa6d4" + "reference": "945d0b7f346a084ce5549e95289962972c4272e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b69489b312503bf8fa6d75a76916919d7d2fa6d4", - "reference": "b69489b312503bf8fa6d75a76916919d7d2fa6d4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/945d0b7f346a084ce5549e95289962972c4272e5", + "reference": "945d0b7f346a084ce5549e95289962972c4272e5", "shasum": "" }, "require": { @@ -6795,7 +6796,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.30" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.31" }, "funding": [ { @@ -6819,7 +6820,7 @@ "type": "tidelift" } ], - "time": "2025-12-01T07:35:08+00:00" + "time": "2025-12-06T07:45:52+00:00" }, { "name": "psr/cache", @@ -7979,16 +7980,16 @@ }, { "name": "symfony/console", - "version": "v8.0.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "307d3cf852f5ead3618ac60ecbedbdd512c348b1" + "reference": "fcb73f69d655b48fcb894a262f074218df08bd58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/307d3cf852f5ead3618ac60ecbedbdd512c348b1", - "reference": "307d3cf852f5ead3618ac60ecbedbdd512c348b1", + "url": "https://api.github.com/repos/symfony/console/zipball/fcb73f69d655b48fcb894a262f074218df08bd58", + "reference": "fcb73f69d655b48fcb894a262f074218df08bd58", "shasum": "" }, "require": { @@ -8045,7 +8046,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.0" + "source": "https://github.com/symfony/console/tree/v8.0.1" }, "funding": [ { @@ -8065,20 +8066,20 @@ "type": "tidelift" } ], - "time": "2025-11-21T13:19:49+00:00" + "time": "2025-12-05T15:25:33+00:00" }, { "name": "symfony/filesystem", - "version": "v8.0.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "7fc96ae83372620eaba3826874f46e26295768ca" + "reference": "d937d400b980523dc9ee946bb69972b5e619058d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/7fc96ae83372620eaba3826874f46e26295768ca", - "reference": "7fc96ae83372620eaba3826874f46e26295768ca", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d937d400b980523dc9ee946bb69972b5e619058d", + "reference": "d937d400b980523dc9ee946bb69972b5e619058d", "shasum": "" }, "require": { @@ -8115,7 +8116,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v8.0.0" + "source": "https://github.com/symfony/filesystem/tree/v8.0.1" }, "funding": [ { @@ -8135,7 +8136,7 @@ "type": "tidelift" } ], - "time": "2025-11-05T14:36:47+00:00" + "time": "2025-12-01T09:13:36+00:00" }, { "name": "symfony/finder", @@ -8673,16 +8674,16 @@ }, { "name": "symfony/string", - "version": "v8.0.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f929eccf09531078c243df72398560e32fa4cf4f" + "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f929eccf09531078c243df72398560e32fa4cf4f", - "reference": "f929eccf09531078c243df72398560e32fa4cf4f", + "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc", + "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc", "shasum": "" }, "require": { @@ -8739,7 +8740,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.0" + "source": "https://github.com/symfony/string/tree/v8.0.1" }, "funding": [ { @@ -8759,7 +8760,7 @@ "type": "tidelift" } ], - "time": "2025-09-11T14:37:55+00:00" + "time": "2025-12-01T09:13:36+00:00" }, { "name": "textalk/websocket", diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-screenshot.md b/docs/examples/1.8.x/client-android/java/avatars/get-screenshot.md index 0f6e41451a..ce8372dd37 100644 --- a/docs/examples/1.8.x/client-android/java/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/client-android/java/avatars/get-screenshot.md @@ -13,24 +13,27 @@ Avatars avatars = new Avatars(client); avatars.getScreenshot( "https://example.com", // url - Map.of("a", "b"), // headers (optional) - 1, // viewportWidth (optional) - 1, // viewportHeight (optional) - 0.1, // scale (optional) + Map.of( + "Authorization", "Bearer token123", + "X-Custom-Header", "value" + ), // headers (optional) + 1920, // viewportWidth (optional) + 1080, // viewportHeight (optional) + 2, // scale (optional) Theme.LIGHT, // theme (optional) - "", // userAgent (optional) - false, // fullpage (optional) - "", // locale (optional) + "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // userAgent (optional) + true, // fullpage (optional) + "en-US", // locale (optional) Timezone.AFRICA_ABIDJAN, // timezone (optional) - -90, // latitude (optional) - -180, // longitude (optional) - 0, // accuracy (optional) - false, // touch (optional) - List.of(), // permissions (optional) - 0, // sleep (optional) - 0, // width (optional) - 0, // height (optional) - -1, // quality (optional) + 37.7749, // latitude (optional) + -122.4194, // longitude (optional) + 100, // accuracy (optional) + true, // touch (optional) + List.of("geolocation", "notifications"), // permissions (optional) + 3, // sleep (optional) + 800, // width (optional) + 600, // height (optional) + 85, // quality (optional) Output.JPG, // output (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-screenshot.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-screenshot.md index 2638e9e6a5..d7cd6cda24 100644 --- a/docs/examples/1.8.x/client-android/kotlin/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-screenshot.md @@ -13,23 +13,26 @@ val avatars = Avatars(client) val result = avatars.getScreenshot( url = "https://example.com", - headers = mapOf( "a" to "b" ), // (optional) - viewportWidth = 1, // (optional) - viewportHeight = 1, // (optional) - scale = 0.1, // (optional) + headers = mapOf( + "Authorization" to "Bearer token123", + "X-Custom-Header" to "value" + ), // (optional) + viewportWidth = 1920, // (optional) + viewportHeight = 1080, // (optional) + scale = 2, // (optional) theme = theme.LIGHT, // (optional) - userAgent = "", // (optional) - fullpage = false, // (optional) - locale = "", // (optional) + userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // (optional) + fullpage = true, // (optional) + locale = "en-US", // (optional) timezone = timezone.AFRICA_ABIDJAN, // (optional) - latitude = -90, // (optional) - longitude = -180, // (optional) - accuracy = 0, // (optional) - touch = false, // (optional) - permissions = listOf(), // (optional) - sleep = 0, // (optional) - width = 0, // (optional) - height = 0, // (optional) - quality = -1, // (optional) + latitude = 37.7749, // (optional) + longitude = -122.4194, // (optional) + accuracy = 100, // (optional) + touch = true, // (optional) + permissions = listOf("geolocation", "notifications"), // (optional) + sleep = 3, // (optional) + width = 800, // (optional) + height = 600, // (optional) + quality = 85, // (optional) output = output.JPG, // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-screenshot.md index 7f4ef5da5c..20d635a8fa 100644 --- a/docs/examples/1.8.x/client-apple/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-screenshot.md @@ -9,24 +9,27 @@ let avatars = Avatars(client) let bytes = try await avatars.getScreenshot( url: "https://example.com", - headers: [:], // optional - viewportWidth: 1, // optional - viewportHeight: 1, // optional - scale: 0.1, // optional + headers: [ + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + ], // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional theme: .light, // optional - userAgent: "", // optional - fullpage: false, // optional - locale: "", // optional + userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // optional + fullpage: true, // optional + locale: "en-US", // optional timezone: .africaAbidjan, // optional - latitude: -90, // optional - longitude: -180, // optional - accuracy: 0, // optional - touch: false, // optional - permissions: [], // optional - sleep: 0, // optional - width: 0, // optional - height: 0, // optional - quality: -1, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: ["geolocation","notifications"], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional output: .jpg // optional ) diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-screenshot.md index 42a5ca7230..0dc9b76e96 100644 --- a/docs/examples/1.8.x/client-flutter/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-screenshot.md @@ -9,24 +9,27 @@ Avatars avatars = Avatars(client); // Downloading file Uint8List bytes = await avatars.getScreenshot( url: 'https://example.com', - headers: {}, // optional - viewportWidth: 1, // optional - viewportHeight: 1, // optional - scale: 0.1, // optional + headers: { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional theme: Theme.light, // optional - userAgent: '', // optional - fullpage: false, // optional - locale: '', // optional + userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional + fullpage: true, // optional + locale: 'en-US', // optional timezone: Timezone.africaAbidjan, // optional - latitude: -90, // optional - longitude: -180, // optional - accuracy: 0, // optional - touch: false, // optional - permissions: [], // optional - sleep: 0, // optional - width: 0, // optional - height: 0, // optional - quality: -1, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: ["geolocation","notifications"], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional output: Output.jpg, // optional ) @@ -37,24 +40,27 @@ file.writeAsBytesSync(bytes); FutureBuilder( future: avatars.getScreenshot( url:'https://example.com' , - headers:{} , // optional - viewportWidth:1 , // optional - viewportHeight:1 , // optional - scale:0.1 , // optional + headers:{ + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + } , // optional + viewportWidth:1920 , // optional + viewportHeight:1080 , // optional + scale:2 , // optional theme: Theme.light, // optional - userAgent:'' , // optional - fullpage:false , // optional - locale:'' , // optional + userAgent:'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15' , // optional + fullpage:true , // optional + locale:'en-US' , // optional timezone: Timezone.africaAbidjan, // optional - latitude:-90 , // optional - longitude:-180 , // optional - accuracy:0 , // optional - touch:false , // optional - permissions:[] , // optional - sleep:0 , // optional - width:0 , // optional - height:0 , // optional - quality:-1 , // optional + latitude:37.7749 , // optional + longitude:-122.4194 , // optional + accuracy:100 , // optional + touch:true , // optional + permissions:["geolocation","notifications"] , // optional + sleep:3 , // optional + width:800 , // optional + height:600 , // optional + quality:85 , // optional output: Output.jpg, // optional ), // Works for both public file and private file, for private files you need to be logged in builder: (context, snapshot) { diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-screenshot.md index 918ab667d6..2e4b84dec8 100644 --- a/docs/examples/1.8.x/client-react-native/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-screenshot.md @@ -8,24 +8,27 @@ const avatars = new Avatars(client); const result = avatars.getScreenshot({ url: 'https://example.com', - headers: {}, // optional - viewportWidth: 1, // optional - viewportHeight: 1, // optional - scale: 0.1, // optional + headers: { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional theme: Theme.Light, // optional - userAgent: '', // optional - fullpage: false, // optional - locale: '', // optional + userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional + fullpage: true, // optional + locale: 'en-US', // optional timezone: Timezone.AfricaAbidjan, // optional - latitude: -90, // optional - longitude: -180, // optional - accuracy: 0, // optional - touch: false, // optional - permissions: [], // optional - sleep: 0, // optional - width: 0, // optional - height: 0, // optional - quality: -1, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: ["geolocation","notifications"], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional output: Output.Jpg // optional }); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/client-web/examples/avatars/get-screenshot.md index 75d6bcf80c..033458f43a 100644 --- a/docs/examples/1.8.x/client-web/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-screenshot.md @@ -8,24 +8,27 @@ const avatars = new Avatars(client); const result = avatars.getScreenshot({ url: 'https://example.com', - headers: {}, // optional - viewportWidth: 1, // optional - viewportHeight: 1, // optional - scale: 0.1, // optional + headers: { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional theme: Theme.Light, // optional - userAgent: '', // optional - fullpage: false, // optional - locale: '', // optional + userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional + fullpage: true, // optional + locale: 'en-US', // optional timezone: Timezone.AfricaAbidjan, // optional - latitude: -90, // optional - longitude: -180, // optional - accuracy: 0, // optional - touch: false, // optional - permissions: [], // optional - sleep: 0, // optional - width: 0, // optional - height: 0, // optional - quality: -1, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: ["geolocation","notifications"], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional output: Output.Jpg // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/console-web/examples/avatars/get-screenshot.md index 25ccc040f0..821f60e2ee 100644 --- a/docs/examples/1.8.x/console-web/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-screenshot.md @@ -8,24 +8,27 @@ const avatars = new Avatars(client); const result = avatars.getScreenshot({ url: 'https://example.com', - headers: {}, // optional - viewportWidth: 1, // optional - viewportHeight: 1, // optional - scale: 0.1, // optional + headers: { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional theme: Theme.Light, // optional - userAgent: '', // optional - fullpage: false, // optional - locale: '', // optional + userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional + fullpage: true, // optional + locale: 'en-US', // optional timezone: Timezone.AfricaAbidjan, // optional - latitude: -90, // optional - longitude: -180, // optional - accuracy: 0, // optional - touch: false, // optional - permissions: [], // optional - sleep: 0, // optional - width: 0, // optional - height: 0, // optional - quality: -1, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: ["geolocation","notifications"], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional output: Output.Jpg // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md b/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md index cae640097e..85334c43e1 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md @@ -9,7 +9,8 @@ const vcs = new Vcs(client); const result = await vcs.listRepositories({ installationId: '', type: VCSDetectionType.Runtime, - search: '' // optional + search: '', // optional + queries: [] // optional }); console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-screenshot.md index c787a82298..da80f30bee 100644 --- a/docs/examples/1.8.x/server-dart/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-screenshot.md @@ -9,23 +9,26 @@ Avatars avatars = Avatars(client); Uint8List result = await avatars.getScreenshot( url: 'https://example.com', - headers: {}, // (optional) - viewportWidth: 1, // (optional) - viewportHeight: 1, // (optional) - scale: 0.1, // (optional) + headers: { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, // (optional) + viewportWidth: 1920, // (optional) + viewportHeight: 1080, // (optional) + scale: 2, // (optional) theme: Theme.light, // (optional) - userAgent: '', // (optional) - fullpage: false, // (optional) - locale: '', // (optional) + userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // (optional) + fullpage: true, // (optional) + locale: 'en-US', // (optional) timezone: Timezone.africaAbidjan, // (optional) - latitude: -90, // (optional) - longitude: -180, // (optional) - accuracy: 0, // (optional) - touch: false, // (optional) - permissions: [], // (optional) - sleep: 0, // (optional) - width: 0, // (optional) - height: 0, // (optional) - quality: -1, // (optional) + latitude: 37.7749, // (optional) + longitude: -122.4194, // (optional) + accuracy: 100, // (optional) + touch: true, // (optional) + permissions: ["geolocation","notifications"], // (optional) + sleep: 3, // (optional) + width: 800, // (optional) + height: 600, // (optional) + quality: 85, // (optional) output: Output.jpg, // (optional) ); diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-screenshot.md index e2e5462484..58e6e4267a 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-screenshot.md @@ -12,23 +12,26 @@ Avatars avatars = new Avatars(client); byte[] result = await avatars.GetScreenshot( url: "https://example.com", - headers: [object], // optional - viewportWidth: 1, // optional - viewportHeight: 1, // optional - scale: 0.1, // optional + headers: new { + Authorization = "Bearer token123", + X-Custom-Header = "value" + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional theme: Theme.Light, // optional - userAgent: "", // optional - fullpage: false, // optional - locale: "", // optional + userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // optional + fullpage: true, // optional + locale: "en-US", // optional timezone: Timezone.AfricaAbidjan, // optional - latitude: -90, // optional - longitude: -180, // optional - accuracy: 0, // optional - touch: false, // optional - permissions: new List(), // optional - sleep: 0, // optional - width: 0, // optional - height: 0, // optional - quality: -1, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: ["geolocation","notifications"], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional output: Output.Jpg // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/server-go/examples/avatars/get-screenshot.md index ac425fbc4f..9191ad8875 100644 --- a/docs/examples/1.8.x/server-go/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-screenshot.md @@ -16,23 +16,26 @@ service := avatars.New(client) response, error := service.GetScreenshot( "https://example.com", - avatars.WithGetScreenshotHeaders(map[string]interface{}{}), - avatars.WithGetScreenshotViewportWidth(1), - avatars.WithGetScreenshotViewportHeight(1), - avatars.WithGetScreenshotScale(0.1), - avatars.WithGetScreenshotTheme("light"), - avatars.WithGetScreenshotUserAgent(""), - avatars.WithGetScreenshotFullpage(false), - avatars.WithGetScreenshotLocale(""), - avatars.WithGetScreenshotTimezone("africa/abidjan"), - avatars.WithGetScreenshotLatitude(-90), - avatars.WithGetScreenshotLongitude(-180), - avatars.WithGetScreenshotAccuracy(0), - avatars.WithGetScreenshotTouch(false), - avatars.WithGetScreenshotPermissions([]interface{}{}), - avatars.WithGetScreenshotSleep(0), - avatars.WithGetScreenshotWidth(0), - avatars.WithGetScreenshotHeight(0), - avatars.WithGetScreenshotQuality(-1), - avatars.WithGetScreenshotOutput("jpg"), + avatars.WithGetScreenshotHeaders(map[string]interface{}{ + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }), + avatars.WithGetScreenshotViewportWidth(1920), + avatars.WithGetScreenshotViewportHeight(1080), + avatars.WithGetScreenshotScale(2), + avatars.WithGetScreenshotTheme("dark"), + avatars.WithGetScreenshotUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15"), + avatars.WithGetScreenshotFullpage(true), + avatars.WithGetScreenshotLocale("en-US"), + avatars.WithGetScreenshotTimezone("America/New_York"), + avatars.WithGetScreenshotLatitude(37.7749), + avatars.WithGetScreenshotLongitude(-122.4194), + avatars.WithGetScreenshotAccuracy(100), + avatars.WithGetScreenshotTouch(true), + avatars.WithGetScreenshotPermissions(interface{}{"geolocation","notifications"}), + avatars.WithGetScreenshotSleep(3), + avatars.WithGetScreenshotWidth(800), + avatars.WithGetScreenshotHeight(600), + avatars.WithGetScreenshotQuality(85), + avatars.WithGetScreenshotOutput("jpeg"), ) diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-screenshot.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-screenshot.md index 1874358337..5eea09678b 100644 --- a/docs/examples/1.8.x/server-kotlin/java/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-screenshot.md @@ -14,24 +14,27 @@ Avatars avatars = new Avatars(client); avatars.getScreenshot( "https://example.com", // url - Map.of("a", "b"), // headers (optional) - 1, // viewportWidth (optional) - 1, // viewportHeight (optional) - 0.1, // scale (optional) + Map.of( + "Authorization", "Bearer token123", + "X-Custom-Header", "value" + ), // headers (optional) + 1920, // viewportWidth (optional) + 1080, // viewportHeight (optional) + 2, // scale (optional) Theme.LIGHT, // theme (optional) - "", // userAgent (optional) - false, // fullpage (optional) - "", // locale (optional) + "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // userAgent (optional) + true, // fullpage (optional) + "en-US", // locale (optional) Timezone.AFRICA_ABIDJAN, // timezone (optional) - -90, // latitude (optional) - -180, // longitude (optional) - 0, // accuracy (optional) - false, // touch (optional) - List.of(), // permissions (optional) - 0, // sleep (optional) - 0, // width (optional) - 0, // height (optional) - -1, // quality (optional) + 37.7749, // latitude (optional) + -122.4194, // longitude (optional) + 100, // accuracy (optional) + true, // touch (optional) + List.of("geolocation", "notifications"), // permissions (optional) + 3, // sleep (optional) + 800, // width (optional) + 600, // height (optional) + 85, // quality (optional) Output.JPG, // output (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-screenshot.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-screenshot.md index eca5493c57..a2de2e5adc 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-screenshot.md @@ -14,23 +14,26 @@ val avatars = Avatars(client) val result = avatars.getScreenshot( url = "https://example.com", - headers = mapOf( "a" to "b" ), // optional - viewportWidth = 1, // optional - viewportHeight = 1, // optional - scale = 0.1, // optional - theme = "light", // optional - userAgent = "", // optional - fullpage = false, // optional - locale = "", // optional - timezone = "africa/abidjan", // optional - latitude = -90, // optional - longitude = -180, // optional - accuracy = 0, // optional - touch = false, // optional - permissions = listOf(), // optional - sleep = 0, // optional - width = 0, // optional - height = 0, // optional - quality = -1, // optional - output = "jpg" // optional + headers = mapOf( + "Authorization" to "Bearer token123", + "X-Custom-Header" to "value" + ), // optional + viewportWidth = 1920, // optional + viewportHeight = 1080, // optional + scale = 2, // optional + theme = "dark", // optional + userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // optional + fullpage = true, // optional + locale = "en-US", // optional + timezone = "America/New_York", // optional + latitude = 37.7749, // optional + longitude = -122.4194, // optional + accuracy = 100, // optional + touch = true, // optional + permissions = listOf("geolocation", "notifications"), // optional + sleep = 3, // optional + width = 800, // optional + height = 600, // optional + quality = 85, // optional + output = "jpeg" // optional ) diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-screenshot.md index 60a38988cb..dc63102bf9 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-screenshot.md @@ -9,23 +9,26 @@ const avatars = new sdk.Avatars(client); const result = await avatars.getScreenshot({ url: 'https://example.com', - headers: {}, // optional - viewportWidth: 1, // optional - viewportHeight: 1, // optional - scale: 0.1, // optional + headers: { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional theme: sdk.Theme.Light, // optional - userAgent: '', // optional - fullpage: false, // optional - locale: '', // optional + userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional + fullpage: true, // optional + locale: 'en-US', // optional timezone: sdk.Timezone.AfricaAbidjan, // optional - latitude: -90, // optional - longitude: -180, // optional - accuracy: 0, // optional - touch: false, // optional - permissions: [], // optional - sleep: 0, // optional - width: 0, // optional - height: 0, // optional - quality: -1, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: ["geolocation","notifications"], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional output: sdk.Output.Jpg // optional }); diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/server-php/examples/avatars/get-screenshot.md index b9dfd23862..9f91a3fafe 100644 --- a/docs/examples/1.8.x/server-php/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-screenshot.md @@ -15,23 +15,26 @@ $avatars = new Avatars($client); $result = $avatars->getScreenshot( url: 'https://example.com', - headers: [], // optional - viewportWidth: 1, // optional - viewportHeight: 1, // optional - scale: 0.1, // optional + headers: [ + 'Authorization' => 'Bearer token123', + 'X-Custom-Header' => 'value' + ], // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional theme: Theme::LIGHT(), // optional - userAgent: '', // optional - fullpage: false, // optional - locale: '', // optional + userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional + fullpage: true, // optional + locale: 'en-US', // optional timezone: Timezone::AFRICAABIDJAN(), // optional - latitude: -90, // optional - longitude: -180, // optional - accuracy: 0, // optional - touch: false, // optional - permissions: [], // optional - sleep: 0, // optional - width: 0, // optional - height: 0, // optional - quality: -1, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: ["geolocation","notifications"], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional output: Output::JPG() // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/server-python/examples/avatars/get-screenshot.md index fe7073eceb..43755943f1 100644 --- a/docs/examples/1.8.x/server-python/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-screenshot.md @@ -13,23 +13,26 @@ avatars = Avatars(client) result = avatars.get_screenshot( url = 'https://example.com', - headers = {}, # optional - viewport_width = 1, # optional - viewport_height = 1, # optional - scale = 0.1, # optional + headers = { + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + }, # optional + viewport_width = 1920, # optional + viewport_height = 1080, # optional + scale = 2, # optional theme = Theme.LIGHT, # optional - user_agent = '', # optional - fullpage = False, # optional - locale = '', # optional + user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', # optional + fullpage = True, # optional + locale = 'en-US', # optional timezone = Timezone.AFRICA_ABIDJAN, # optional - latitude = -90, # optional - longitude = -180, # optional - accuracy = 0, # optional - touch = False, # optional - permissions = [], # optional - sleep = 0, # optional - width = 0, # optional - height = 0, # optional - quality = -1, # optional + latitude = 37.7749, # optional + longitude = -122.4194, # optional + accuracy = 100, # optional + touch = True, # optional + permissions = ["geolocation","notifications"], # optional + sleep = 3, # optional + width = 800, # optional + height = 600, # optional + quality = 85, # optional output = Output.JPG # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-screenshot.md index f66fae3e02..0271404522 100644 --- a/docs/examples/1.8.x/server-ruby/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-screenshot.md @@ -12,23 +12,26 @@ avatars = Avatars.new(client) result = avatars.get_screenshot( url: 'https://example.com', - headers: {}, # optional - viewport_width: 1, # optional - viewport_height: 1, # optional - scale: 0.1, # optional + headers: { + "Authorization" => "Bearer token123", + "X-Custom-Header" => "value" + }, # optional + viewport_width: 1920, # optional + viewport_height: 1080, # optional + scale: 2, # optional theme: Theme::LIGHT, # optional - user_agent: '', # optional - fullpage: false, # optional - locale: '', # optional + user_agent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', # optional + fullpage: true, # optional + locale: 'en-US', # optional timezone: Timezone::AFRICA_ABIDJAN, # optional - latitude: -90, # optional - longitude: -180, # optional - accuracy: 0, # optional - touch: false, # optional - permissions: [], # optional - sleep: 0, # optional - width: 0, # optional - height: 0, # optional - quality: -1, # optional + latitude: 37.7749, # optional + longitude: -122.4194, # optional + accuracy: 100, # optional + touch: true, # optional + permissions: ["geolocation","notifications"], # optional + sleep: 3, # optional + width: 800, # optional + height: 600, # optional + quality: 85, # optional output: Output::JPG # optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-screenshot.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-screenshot.md index 3aa1661093..91e08d9053 100644 --- a/docs/examples/1.8.x/server-swift/examples/avatars/get-screenshot.md +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-screenshot.md @@ -10,24 +10,27 @@ let avatars = Avatars(client) let bytes = try await avatars.getScreenshot( url: "https://example.com", - headers: [:], // optional - viewportWidth: 1, // optional - viewportHeight: 1, // optional - scale: 0.1, // optional + headers: [ + "Authorization": "Bearer token123", + "X-Custom-Header": "value" + ], // optional + viewportWidth: 1920, // optional + viewportHeight: 1080, // optional + scale: 2, // optional theme: .light, // optional - userAgent: "", // optional - fullpage: false, // optional - locale: "", // optional + userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // optional + fullpage: true, // optional + locale: "en-US", // optional timezone: .africaAbidjan, // optional - latitude: -90, // optional - longitude: -180, // optional - accuracy: 0, // optional - touch: false, // optional - permissions: [], // optional - sleep: 0, // optional - width: 0, // optional - height: 0, // optional - quality: -1, // optional + latitude: 37.7749, // optional + longitude: -122.4194, // optional + accuracy: 100, // optional + touch: true, // optional + permissions: ["geolocation","notifications"], // optional + sleep: 3, // optional + width: 800, // optional + height: 600, // optional + quality: 85, // optional output: .jpg // optional ) diff --git a/docs/sdks/android/CHANGELOG.md b/docs/sdks/android/CHANGELOG.md index c355a1904f..870ba79bfe 100644 --- a/docs/sdks/android/CHANGELOG.md +++ b/docs/sdks/android/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 11.4.0 + +* Add `getScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## 11.3.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/docs/sdks/apple/CHANGELOG.md b/docs/sdks/apple/CHANGELOG.md index 44c40a5858..7f4141cc34 100644 --- a/docs/sdks/apple/CHANGELOG.md +++ b/docs/sdks/apple/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 13.5.0 + +* Add `getScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## 13.4.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/docs/sdks/cli/CHANGELOG.md b/docs/sdks/cli/CHANGELOG.md index 3c2e7ef709..9f1f02bbd0 100644 --- a/docs/sdks/cli/CHANGELOG.md +++ b/docs/sdks/cli/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 12.0.1 + +Fix type generation for `point`, `lineString` and `polygon` columns + ## 12.0.0 * Change `create-deployment-template`'s `version` parameter to `type` and `reference`. eg. usage - `create-deployment-template --type tag --reference 1.0.0` diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index 7fd7227f15..49d45becaf 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 20.0.0 + +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `createTemplateDeployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters +* Add `Theme`, `Timezone` and `Output` enums + ## 19.4.0 * Add `getScreenshot` method to `Avatars` service diff --git a/docs/sdks/dotnet/CHANGELOG.md b/docs/sdks/dotnet/CHANGELOG.md index 1401108b9f..eabf40dac0 100644 --- a/docs/sdks/dotnet/CHANGELOG.md +++ b/docs/sdks/dotnet/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 0.23.0 + +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `CreateTemplateDeployment` method signature: replace `Version` parameter with `Type` (TemplateReferenceType) and `Reference` parameters +* Add `GetScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## 0.22.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 40f703903f..834c926977 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -7,6 +7,8 @@ ## 20.3.1 * Fix passing of `null` values and stripping only non-nullable optional parameters from the request body +* Add `getScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums ## 20.3.0 diff --git a/docs/sdks/go/CHANGELOG.md b/docs/sdks/go/CHANGELOG.md index 0cc395644f..c93c431eb7 100644 --- a/docs/sdks/go/CHANGELOG.md +++ b/docs/sdks/go/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## v0.15.0 + +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `CreateTemplateDeployment` method signature: replace `Version` parameter with `Type` (TemplateReferenceType) and `Reference` parameters +* Add `GetScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## v0.14.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/docs/sdks/kotlin/CHANGELOG.md b/docs/sdks/kotlin/CHANGELOG.md index 362c9aa979..07e9d9647f 100644 --- a/docs/sdks/kotlin/CHANGELOG.md +++ b/docs/sdks/kotlin/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 13.0.0 + +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `createTemplateDeployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters +* Add `getScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## 12.3.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/docs/sdks/nodejs/CHANGELOG.md b/docs/sdks/nodejs/CHANGELOG.md index 419b052678..2811a060f4 100644 --- a/docs/sdks/nodejs/CHANGELOG.md +++ b/docs/sdks/nodejs/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 21.0.0 + +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `createTemplateDeployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters +* Add `getScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## 20.3.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/docs/sdks/php/CHANGELOG.md b/docs/sdks/php/CHANGELOG.md index 14a26e441d..1ffcff2a6e 100644 --- a/docs/sdks/php/CHANGELOG.md +++ b/docs/sdks/php/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 19.0.0 + +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `createTemplateDeployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters +* Add `Theme`, `Timezone` and `Output` enums + ## 18.0.1 * Fix `TablesDB` service to use correct file name diff --git a/docs/sdks/python/CHANGELOG.md b/docs/sdks/python/CHANGELOG.md index 31396fa3e6..ff2ac85322 100644 --- a/docs/sdks/python/CHANGELOG.md +++ b/docs/sdks/python/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 14.0.0 + +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `create_template_deployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters +* Add `get_screenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums +* Add support for dart39 and flutter335 runtimes + ## 13.6.1 * Fix passing of `None` to nullable parameters diff --git a/docs/sdks/react-native/CHANGELOG.md b/docs/sdks/react-native/CHANGELOG.md index 757a5f0158..8ab9bcca43 100644 --- a/docs/sdks/react-native/CHANGELOG.md +++ b/docs/sdks/react-native/CHANGELOG.md @@ -1,5 +1,10 @@ # Change log +## 0.19.0 + +* Add `getScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## 0.18.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/docs/sdks/ruby/CHANGELOG.md b/docs/sdks/ruby/CHANGELOG.md index c4b0df5615..272f9b6631 100644 --- a/docs/sdks/ruby/CHANGELOG.md +++ b/docs/sdks/ruby/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 20.0.0 + +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `create_template_deployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters +* Add `get_screenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## 19.3.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/docs/sdks/swift/CHANGELOG.md b/docs/sdks/swift/CHANGELOG.md index 33ec214069..22ae4719a3 100644 --- a/docs/sdks/swift/CHANGELOG.md +++ b/docs/sdks/swift/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 14.0.0 + +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `createTemplateDeployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters +* Add `getScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## 13.3.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/docs/sdks/web/CHANGELOG.md b/docs/sdks/web/CHANGELOG.md index 83ed257773..b600d67e1b 100644 --- a/docs/sdks/web/CHANGELOG.md +++ b/docs/sdks/web/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 21.5.0 + +* Add `getScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## 21.4.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/src/Appwrite/Databases/TransactionState.php b/src/Appwrite/Databases/TransactionState.php index 04c0967561..73e5192648 100644 --- a/src/Appwrite/Databases/TransactionState.php +++ b/src/Appwrite/Databases/TransactionState.php @@ -52,9 +52,9 @@ class TransactionState ?string $transactionId = null, array $queries = [] ): Document { - $databasesDB = ($this->getDatabasesDB)($database); + $dbForDatabases = ($this->getDatabasesDB)($database); if ($transactionId === null) { - return $databasesDB->getDocument($collectionId, $documentId, $queries); + return $dbForDatabases->getDocument($collectionId, $documentId, $queries); } $state = $this->getTransactionState($transactionId); @@ -72,7 +72,7 @@ class TransactionState if ($docState['action'] === 'update' || $docState['action'] === 'upsert') { // Merge with committed version - $committedDoc = $databasesDB->getDocument($collectionId, $documentId, $queries); + $committedDoc = $dbForDatabases->getDocument($collectionId, $documentId, $queries); if (!$committedDoc->isEmpty()) { foreach ($docState['document']->getAttributes() as $key => $value) { if ($key !== '$id') { @@ -86,7 +86,7 @@ class TransactionState } } } - return $databasesDB->getDocument($collectionId, $documentId, $queries); + return $dbForDatabases->getDocument($collectionId, $documentId, $queries); } /** @@ -107,14 +107,14 @@ class TransactionState ?string $transactionId = null, array $queries = [] ): array { - $databasesDB = ($this->getDatabasesDB)($database); + $dbForDatabases = ($this->getDatabasesDB)($database); // If no transaction, use normal database retrieval if ($transactionId === null) { - return $databasesDB->find($collectionId, $queries); + return $dbForDatabases->find($collectionId, $queries); } $state = $this->getTransactionState($transactionId); - $committedDocs = $databasesDB->find($collectionId, $queries); + $committedDocs = $dbForDatabases->find($collectionId, $queries); $documentMap = []; // Build map of committed documents @@ -170,18 +170,18 @@ class TransactionState ?string $transactionId = null, array $queries = [] ): int { - $databasesDB = ($this->getDatabasesDB)($database); + $dbForDatabases = ($this->getDatabasesDB)($database); if ($transactionId === null) { - return $databasesDB->count($collectionId, $queries, APP_LIMIT_COUNT); + return $dbForDatabases->count($collectionId, $queries, APP_LIMIT_COUNT); } $state = $this->getTransactionState($transactionId); - $baseCount = $databasesDB->count($collectionId, $queries, APP_LIMIT_COUNT); + $baseCount = $dbForDatabases->count($collectionId, $queries, APP_LIMIT_COUNT); if (!isset($state[$collectionId])) { return $baseCount; } - $committedDocs = $databasesDB->find($collectionId, $queries); + $committedDocs = $dbForDatabases->find($collectionId, $queries); $committedDocIds = []; foreach ($committedDocs as $doc) { $committedDocIds[$doc->getId()] = true; diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index b72b70cf2d..9b460541ea 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -475,6 +475,9 @@ class Event $patterns = []; $parsed = self::parseEventPattern($pattern); + // to switch the resource types from databases to the required prefix + // eg; all databases events get fired with databases. prefix which mainly depicts legacy type + // so a projection from databases to the actual prefix(documentsdb, vectordb,etc) if ((str_contains($pattern, 'databases.') && $database && $database->getAttribute('type') !== 'legacy')) { $parsed = self::getDatabaseTypeEvents($database, $parsed); } diff --git a/src/Appwrite/Event/StatsUsage.php b/src/Appwrite/Event/StatsUsage.php index f6b1d695f4..34a0245520 100644 --- a/src/Appwrite/Event/StatsUsage.php +++ b/src/Appwrite/Event/StatsUsage.php @@ -83,6 +83,7 @@ class StatsUsage extends Event } return true; }), + 'context' => $this->context, ]; } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Action.php index 4bf157be66..0347d4365b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Action.php @@ -10,7 +10,7 @@ use Utopia\Database\Operator; class Action extends AppwriteAction { - private string $context = 'legacy'; + private string $context = DATABASE_TYPE_LEGACY; public function getDatabaseType(): string { @@ -20,10 +20,10 @@ class Action extends AppwriteAction public function setHttpPath(string $path): AppwriteAction { if (\str_contains($path, '/tablesdb')) { - $this->context = 'tablesdb'; + $this->context = DATABASE_TYPE_TABLESDB; } if (\str_contains($path, '/documentsdb')) { - $this->context = 'documentsdb'; + $this->context = DATABASE_TYPE_DOCUMENTSDB; } if (\str_contains($path, '/vectordb')) { $this->context = 'vectordb'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php index 4bcc9bd9ab..c1706d69bc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -118,4 +118,64 @@ abstract class Action extends UtopiaAction ? Exception::COLLECTION_LIMIT_EXCEEDED : Exception::TABLE_LIMIT_EXCEEDED; } + + /** + * Get the appropriate format unsupported exception. + */ + protected function getFormatUnsupportedException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_FORMAT_UNSUPPORTED + : Exception::COLUMN_FORMAT_UNSUPPORTED; + } + + /** + * Get the correct default unsupported message. + */ + protected function getDefaultUnsupportedException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED + : Exception::COLUMN_DEFAULT_UNSUPPORTED; + } + + /** + * Get the appropriate parent level not found exception. + */ + protected function getParentNotFoundException(): string + { + return $this->isCollectionsAPI() + ? Exception::COLLECTION_NOT_FOUND + : Exception::TABLE_NOT_FOUND; + } + + /** + * Get the correct invalid structure message. + */ + protected function getStructureException(): string + { + return $this->isCollectionsAPI() + ? Exception::DOCUMENT_INVALID_STRUCTURE + : Exception::ROW_INVALID_STRUCTURE; + } + + /** + * Get the exception for unknown attribute/column in index. + */ + protected function getParentUnknownException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_UNKNOWN + : Exception::COLUMN_UNKNOWN; + } + + /** + * Get the exception for invalid attribute/column type in index. + */ + protected function getParentInvalidTypeException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_TYPE_INVALID + : Exception::COLUMN_TYPE_INVALID; + } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index eaf2ed944d..1866b62653 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -9,7 +9,9 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; +use Appwrite\Utopia\Database\Validator\Attributes as AttributesValidator; use Appwrite\Utopia\Database\Validator\CustomId; +use Appwrite\Utopia\Database\Validator\Indexes as IndexesValidator; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; @@ -20,10 +22,13 @@ use Utopia\Database\Exception\NotFound as NotFoundException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Validator\Authorization; +use Utopia\Database\Validator\Index as IndexValidator; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; +use Utopia\Validator\JSON; use Utopia\Validator\Nullable; use Utopia\Validator\Text; @@ -75,6 +80,8 @@ class Create extends Action ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE)), 'An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('enabled', true, new Boolean(), 'Is collection enabled? When set to \'disabled\', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.', true) + ->param('attributes', [], new ArrayList(new JSON(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.', true) + ->param('indexes', [], new ArrayList(new JSON(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).', true) ->inject('response') ->inject('dbForProject') ->inject('getDatabasesDB') @@ -82,7 +89,7 @@ class Create extends Action ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, callable $getDatabasesDB, Event $queueForEvents): void + public function action(string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, array $attributes, array $indexes, UtopiaResponse $response, Database $dbForProject, callable $getDatabasesDB, Event $queueForEvents): void { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -113,24 +120,129 @@ class Create extends Action } catch (NotFoundException) { throw new Exception(Exception::DATABASE_NOT_FOUND); } + /** * @var Database $dbForDatabases */ $dbForDatabases = $getDatabasesDB($database); + + $collectionKey = 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(); + $databaseKey = 'database_' . $database->getSequence(); + + $attributesValidator = new AttributesValidator( + APP_LIMIT_ARRAY_PARAMS_SIZE, + $dbForDatabases->getAdapter()->getSupportForSpatialAttributes(), + $dbForDatabases->getAdapter()->getSupportForAttributes() + ); + + if (!$attributesValidator->isValid($attributes)) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $attributesValidator->getDescription()); + } + + foreach ($attributes as $attribute) { + if (($attribute['type'] ?? '') === Database::VAR_RELATIONSHIP) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Relationship attributes cannot be created inline. Use the create relationship endpoint instead.'); + } + } + + $collectionAttributes = []; + $attributeDocuments = []; + try { + foreach ($attributes as $attributeDef) { + $attrDoc = $this->buildAttributeDocument($database, $collection, $attributeDef); + $collectionAttributes[] = $attrDoc['collection']; + $attributeDocuments[] = $attrDoc['document']; + } + } catch (\Throwable $e) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw $e; + } + + // Validate indexes + $indexesValidator = new IndexesValidator($dbForDatabases->getLimitForIndexes()); + if (!$indexesValidator->isValid($indexes)) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $indexesValidator->getDescription()); + } + + $collectionIndexes = []; + $indexDocuments = []; + try { + foreach ($indexes as $indexDef) { + $idxDoc = $this->buildIndexDocument($database, $collection, $indexDef, $collectionAttributes); + $collectionIndexes[] = $idxDoc['collection']; + $indexDocuments[] = $idxDoc['document']; + } + } catch (\Throwable $e) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw $e; + } + + // Validate indexes with DB adapter capabilities + $indexValidator = new IndexValidator( + $collectionAttributes, + [], + $dbForDatabases->getAdapter()->getMaxIndexLength(), + $dbForDatabases->getAdapter()->getInternalIndexesKeys(), + $dbForDatabases->getAdapter()->getSupportForIndexArray(), + $dbForDatabases->getAdapter()->getSupportForSpatialIndexNull(), + $dbForDatabases->getAdapter()->getSupportForSpatialIndexOrder(), + $dbForDatabases->getAdapter()->getSupportForVectors(), + $dbForDatabases->getAdapter()->getSupportForAttributes(), + $dbForDatabases->getAdapter()->getSupportForMultipleFulltextIndexes(), + $dbForDatabases->getAdapter()->getSupportForIdenticalIndexes() + ); + + foreach ($collectionIndexes as $indexDoc) { + if (!$indexValidator->isValid($indexDoc)) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw new Exception($this->getInvalidIndexException(), $indexValidator->getDescription()); + } + } + try { $dbForDatabases->createCollection( - id: 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + id: $collectionKey, + attributes: $collectionAttributes, + indexes: $collectionIndexes, permissions: $permissions, documentSecurity: $documentSecurity ); } catch (DuplicateException) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); throw new Exception($this->getDuplicateException()); - } catch (IndexException) { - throw new Exception($this->getInvalidIndexException()); + } catch (IndexException $e) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw new Exception($this->getInvalidIndexException(), $e->getMessage()); } catch (LimitException) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); throw new Exception($this->getLimitException()); + } catch (\Throwable $e) { + $dbForProject->deleteDocument($databaseKey, $collection->getId()); + throw $e; } + // Create documents in attributes and indexes collections + try { + if (!empty($attributeDocuments)) { + $dbForProject->createDocuments('attributes', $attributeDocuments); + } + if (!empty($indexDocuments)) { + $dbForProject->createDocuments('indexes', $indexDocuments); + } + } catch (DuplicateException) { + $this->cleanup($dbForProject, $databaseKey, $collectionKey, $collection->getId()); + throw new Exception($this->getDuplicateException()); + } catch (\Throwable $e) { + $this->cleanup($dbForProject, $databaseKey, $collectionKey, $collection->getId()); + throw $e; + } + + $dbForProject->purgeCachedDocument('database_' . $database->getSequence(), $collection->getId()); + $dbForProject->purgeCachedCollection('database_' . $database->getSequence() . '_collection_' . $collection->getSequence()); + $queueForEvents ->setContext('database', $database) ->setParam('databaseId', $databaseId) @@ -140,4 +252,167 @@ class Create extends Action ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) ->dynamic($collection, $this->getResponseModel()); } + + /** + * Build attribute Document objects from a definition array + * + * @return array{collection: Document, document: Document} + */ + protected function buildAttributeDocument( + Document $database, + Document $collection, + array $attribute, + ): array { + $key = $attribute['key']; + $type = $attribute['type']; + $size = $attribute['size'] ?? 0; + $required = $attribute['required'] ?? false; + $signed = $attribute['signed'] ?? true; + $array = $attribute['array'] ?? false; + $format = $attribute['format'] ?? ''; + $formatOptions = []; + $filters = $attribute['filters'] ?? []; + $default = $attribute['default'] ?? null; + + if ($format === APP_DATABASE_ATTRIBUTE_ENUM && isset($attribute['elements'])) { + $formatOptions = ['elements' => $attribute['elements']]; + } + + if (isset($attribute['min']) || isset($attribute['max'])) { + $format = $type === Database::VAR_INTEGER + ? APP_DATABASE_ATTRIBUTE_INT_RANGE + : APP_DATABASE_ATTRIBUTE_FLOAT_RANGE; + + $formatOptions = [ + 'min' => $attribute['min'] ?? ($type === Database::VAR_INTEGER ? \PHP_INT_MIN : -\PHP_FLOAT_MAX), + 'max' => $attribute['max'] ?? ($type === Database::VAR_INTEGER ? \PHP_INT_MAX : \PHP_FLOAT_MAX), + ]; + } + + $collectionDoc = new Document([ + '$id' => $key, + 'key' => $key, + 'type' => $type, + 'size' => $size, + 'required' => $required, + 'signed' => $signed, + 'default' => $default, + 'array' => $array, + 'format' => $format, + 'formatOptions' => $formatOptions, + 'filters' => $filters, + ]); + + $document = new Document([ + '$id' => ID::custom($database->getSequence() . '_' . $collection->getSequence() . '_' . $key), + 'key' => $key, + 'databaseInternalId' => $database->getSequence(), + 'databaseId' => $database->getId(), + 'collectionInternalId' => $collection->getSequence(), + 'collectionId' => $collection->getId(), + 'type' => $type, + 'status' => 'available', + 'size' => $size, + 'required' => $required, + 'signed' => $signed, + 'default' => $default, + 'array' => $array, + 'format' => $format, + 'formatOptions' => $formatOptions, + 'filters' => $filters, + ]); + + return [ + 'collection' => $collectionDoc, + 'document' => $document, + ]; + } + + /** + * Build index Document objects from a definition array + * + * @return array{collection: Document, document: Document} + */ + protected function buildIndexDocument(Document $database, Document $collection, array $indexDef, array $attributeDocuments): array + { + $key = $indexDef['key']; + $type = $indexDef['type']; + $indexAttributes = $indexDef['attributes']; + $orders = $indexDef['orders'] ?? []; + $lengths = $indexDef['lengths'] ?? []; + + $attrKeys = array_map(fn ($a) => $a->getAttribute('key'), $attributeDocuments); + + // Build lengths and orders based on attribute properties + foreach ($indexAttributes as $i => $attr) { + $attrIndex = array_search($attr, $attrKeys); + if ($attrIndex !== false) { + $attrDoc = $attributeDocuments[$attrIndex]; + $attrArray = $attrDoc->getAttribute('array', false); + + if (empty($lengths[$i])) { + $lengths[$i] = null; + } + + if ($attrArray === true) { + $lengths[$i] = Database::MAX_ARRAY_INDEX_LENGTH; + $orders[$i] = null; + } + } else { + if (empty($lengths[$i])) { + $lengths[$i] = null; + } + } + } + + $collectionDoc = new Document([ + '$id' => $key, + 'key' => $key, + 'type' => $type, + 'attributes' => $indexAttributes, + 'lengths' => $lengths, + 'orders' => $orders, + ]); + + $document = new Document([ + '$id' => ID::custom($database->getSequence() . '_' . $collection->getSequence() . '_' . $key), + 'key' => $key, + 'status' => 'available', + 'databaseInternalId' => $database->getSequence(), + 'databaseId' => $database->getId(), + 'collectionInternalId' => $collection->getSequence(), + 'collectionId' => $collection->getId(), + 'type' => $type, + 'attributes' => $indexAttributes, + 'lengths' => $lengths, + 'orders' => $orders, + ]); + + return [ + 'collection' => $collectionDoc, + 'document' => $document, + ]; + } + + /** + * Cleanup on failure: delete the collection document and the underlying DB collection + */ + protected function cleanup( + Database $dbForProject, + string $databaseId, + string $collectionId, + string $collectionDocumentId + ): void { + try { + $dbForProject->deleteCollection($collectionId); + } catch (\Throwable) { + // Ignore cleanup errors for collection deletion + } + + try { + $dbForProject->deleteDocument($databaseId, $collectionDocumentId); + } catch (\Throwable) { + // Ignore cleanup errors for document deletion + } + } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 08eea88e19..b6f95dd27c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -15,6 +15,7 @@ abstract class Action extends DatabasesAction * @var string|null The current context (either 'row' or 'document') */ private ?string $context = DOCUMENTS; + private ?string $databaseType = DATABASE_TYPE_LEGACY; /** * Get the response model used in the SDK and HTTP responses. @@ -25,6 +26,8 @@ abstract class Action extends DatabasesAction { if (str_contains($path, '/tablesdb/')) { $this->context = ROWS; + } elseif (str_contains($path, '/documentsdb/')) { + $this->databaseType = DATABASE_TYPE_DOCUMENTSDB; } $contextId = '$' . $this->getCollectionsEventsContext() . 'Id'; @@ -43,6 +46,39 @@ abstract class Action extends DatabasesAction return parent::setHttpPath($path); } + protected function getDatabasesOperationReadMetric(): string + { + if ($this->databaseType === DATABASE_TYPE_LEGACY || $this->databaseType === DATABASE_TYPE_TABLESDB) { + return METRIC_DATABASES_OPERATIONS_READS; + } + return $this->databaseType.'.'.METRIC_DATABASES_OPERATIONS_READS; + } + + protected function getDatabasesIdOperationReadMetric(): string + { + if ($this->databaseType === DATABASE_TYPE_LEGACY || $this->databaseType === DATABASE_TYPE_TABLESDB) { + return METRIC_DATABASE_ID_OPERATIONS_READS; + } + return $this->databaseType.'.'.METRIC_DATABASE_ID_OPERATIONS_READS; + } + + protected function getDatabasesOperationWriteMetric(): string + { + if ($this->databaseType === DATABASE_TYPE_LEGACY || $this->databaseType === DATABASE_TYPE_TABLESDB) { + return METRIC_DATABASES_OPERATIONS_WRITES; + } + return $this->databaseType.'.'.METRIC_DATABASES_OPERATIONS_WRITES; + + } + + protected function getDatabasesIdOperationWriteMetric(): string + { + if ($this->databaseType === DATABASE_TYPE_LEGACY || $this->databaseType === DATABASE_TYPE_TABLESDB) { + return METRIC_DATABASE_ID_OPERATIONS_WRITES; + } + return $this->databaseType.'.'.METRIC_DATABASE_ID_OPERATIONS_WRITES; + } + /** * Get the plural of the given name. * diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php index 80ae11cd2f..46dcd84acc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -200,8 +200,8 @@ class Decrement extends Action ); $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); + ->addMetric($this->getDatabasesOperationWriteMetric(), 1) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationWriteMetric()), 1); $queueForEvents ->setParam('databaseId', $databaseId) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index fcf0a467fe..a6c6b7a8b4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -200,8 +200,8 @@ class Increment extends Action ); $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); + ->addMetric($this->getDatabasesOperationWriteMetric(), 1) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationWriteMetric()), 1); $queueForEvents ->setParam('databaseId', $databaseId) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index 04a129c15a..c9fa015955 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -189,8 +189,8 @@ class Delete extends Action } $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $modified)) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $modified)); + ->addMetric($this->getDatabasesOperationWriteMetric(), \max(1, $modified)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationWriteMetric()), \max(1, $modified)); $response->dynamic(new Document([ 'total' => $modified, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 264bc2f08a..b52b96a4c9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -220,8 +220,8 @@ class Update extends Action } $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $modified)) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $modified)); + ->addMetric($this->getDatabasesOperationWriteMetric(), \max(1, $modified)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationWriteMetric()), \max(1, $modified)); $response->dynamic(new Document([ 'total' => $modified, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 8e6ad45444..4ba808def3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -195,8 +195,8 @@ class Upsert extends Action } $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $modified)) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $modified)); + ->addMetric($this->getDatabasesOperationWriteMetric(), \max(1, $modified)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationWriteMetric()), \max(1, $modified)); $response->dynamic(new Document([ 'total' => $modified, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 0130d8ae88..7b58a2a887 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -83,8 +83,7 @@ class Create extends Action new Parameter('documentId', optional: false), new Parameter('data', optional: false), new Parameter('permissions', optional: true), - new Parameter('transactionId', optional: true), - new Parameter('transactionId', optional: true), + new Parameter('transactionId', optional: true) ], deprecated: new Deprecated( since: '1.8.0', @@ -482,8 +481,8 @@ class Create extends Action } $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $operations)) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $operations)); // per collection + ->addMetric($this->getDatabasesOperationWriteMetric(), \max(1, $operations)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationWriteMetric()), \max(1, $operations)); // per collection $response->setStatusCode(SwooleResponse::STATUS_CODE_CREATED); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 85b02297c3..5263259a7d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -84,8 +84,6 @@ class Delete extends Action ->inject('queueForStatsUsage') ->inject('transactionState') ->inject('plan') - ->inject('transactionState') - ->inject('plan') ->callback($this->action(...)); } @@ -213,8 +211,8 @@ class Delete extends Action ); $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); // per collection + ->addMetric($this->getDatabasesOperationWriteMetric(), 1) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationWriteMetric()), 1); // per collection $response->addHeader('X-Debug-Operations', 1); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index 3f4a2371d0..52f0ab93cf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -71,7 +71,6 @@ class Get extends Action ->inject('getDatabasesDB') ->inject('queueForStatsUsage') ->inject('transactionState') - ->inject('transactionState') ->callback($this->action(...)); } @@ -133,8 +132,8 @@ class Get extends Action ); $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); + ->addMetric($this->getDatabasesOperationReadMetric(), max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationReadMetric()), $operations); $response->addHeader('X-Debug-Operations', $operations); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 63c4a27c7e..8fe13dabb0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -88,8 +88,6 @@ class Update extends Action ->inject('queueForStatsUsage') ->inject('transactionState') ->inject('plan') - ->inject('transactionState') - ->inject('plan') ->callback($this->action(...)); } @@ -247,8 +245,8 @@ class Update extends Action $setCollection($collection, $newDocument); $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); + ->addMetric($this->getDatabasesOperationWriteMetric(), max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationWriteMetric()), $operations); // Handle transaction staging if ($transactionId !== null) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 9cfb3d337d..1d7ddd17fa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -92,8 +92,6 @@ class Upsert extends Action ->inject('queueForStatsUsage') ->inject('transactionState') ->inject('plan') - ->inject('transactionState') - ->inject('plan') ->callback($this->action(...)); } @@ -259,8 +257,8 @@ class Upsert extends Action $setCollection($collection, $newDocument); $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $operations)) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $operations)); + ->addMetric($this->getDatabasesOperationWriteMetric(), \max(1, $operations)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationWriteMetric()), \max(1, $operations)); // Handle transaction staging if ($transactionId !== null) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index f9bc24c41e..067f63deed 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -75,7 +75,6 @@ class XList extends Action ->inject('getDatabasesDB') ->inject('queueForStatsUsage') ->inject('transactionState') - ->inject('transactionState') ->callback($this->action(...)); } @@ -168,8 +167,8 @@ class XList extends Action } $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); + ->addMetric($this->getDatabasesOperationReadMetric(), max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), $this->getDatabasesIdOperationReadMetric()), $operations); $response->dynamic(new Document([ 'total' => $total, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php index 85d9fe8a53..24c31c5c29 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php @@ -110,8 +110,11 @@ class Create extends Action if ($count >= $limit) { throw new Exception($this->getLimitException(), 'Index limit exceeded'); } - // Convert Document array to array of attribute metadata - $oldAttributes = \array_map(fn ($a) => $a->getArrayCopy(), $collection->getAttribute('attributes')); + + $oldAttributes = \array_map( + fn ($a) => $a->getArrayCopy(), + $collection->getAttribute('attributes') + ); $oldAttributes[] = [ 'key' => '$id', @@ -122,7 +125,6 @@ class Create extends Action 'default' => null, 'size' => Database::LENGTH_KEY ]; - $oldAttributes[] = [ 'key' => '$createdAt', 'type' => Database::VAR_DATETIME, @@ -133,7 +135,6 @@ class Create extends Action 'default' => null, 'size' => 0 ]; - $oldAttributes[] = [ 'key' => '$updatedAt', 'type' => Database::VAR_DATETIME, @@ -163,7 +164,6 @@ class Create extends Action throw new Exception($this->getParentInvalidTypeException(), "Cannot create an index for a relationship $contextType: " . $oldAttributes[$attributeIndex]['key']); } - // Ensure attribute is available if ($attributeStatus !== 'available') { $contextType = ucfirst($contextType); throw new Exception($this->getParentNotAvailableException(), "$contextType not available: " . $oldAttributes[$attributeIndex]['key']); @@ -174,11 +174,12 @@ class Create extends Action } if ($attributeArray === true) { - $lengths[$i] = Database::MAX_ARRAY_INDEX_LENGTH; - $orders[$i] = null; + // Because of a bug in MySQL, we cannot create indexes on array attributes for now, otherwise queries break. + throw new Exception(Exception::INDEX_INVALID, 'Creating indexes on array attributes is not currently supported.'); } } } + $index = new Document([ '$id' => ID::custom($db->getSequence() . '_' . $collection->getSequence() . '_' . $key), 'key' => $key, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index fee548305f..3522087d3d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -31,6 +31,11 @@ class Get extends Action return UtopiaResponse::MODEL_USAGE_COLLECTION; } + protected function getMetric(): string + { + return METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS; + } + public function __construct() { $this @@ -82,7 +87,7 @@ class Get extends Action $stats = $usage = []; $days = $periods[$range]; $metrics = [ - str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getSequence(), $collectionDocument->getSequence()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), + str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getSequence(), $collectionDocument->getSequence()], $this->getMetric()), ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Action.php index 4c06aa6555..033446a00c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Action.php @@ -17,6 +17,22 @@ abstract class Action extends DatabasesAction return $this->databaseType; } + protected function getDatabasesOperationWriteMetric(): string + { + if ($this->databaseType === DATABASE_TYPE_LEGACY || $this->databaseType === TABLESDB) { + return METRIC_DATABASES_OPERATIONS_WRITES; + } + return $this->databaseType.'.'.METRIC_DATABASES_OPERATIONS_WRITES; + + } + protected function getDatabasesIdOperationWriteMetric(): string + { + if ($this->databaseType === DATABASE_TYPE_LEGACY || $this->databaseType === TABLESDB) { + return METRIC_DATABASE_ID_OPERATIONS_WRITES; + } + return $this->databaseType.'.'.METRIC_DATABASE_ID_OPERATIONS_WRITES; + } + public function setHttpPath(string $path): DatabasesAction { switch (true) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php index d4f62a3d7b..87ec52c4e0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php @@ -275,11 +275,11 @@ class Update extends Action } $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, $totalOperations); + ->addMetric($this->getDatabasesOperationWriteMetric(), $totalOperations); foreach ($databaseOperations as $sequence => $count) { $queueForStatsUsage->addMetric( - str_replace('{databaseInternalId}', $sequence, METRIC_DATABASE_ID_OPERATIONS_WRITES), + str_replace('{databaseInternalId}', $sequence, $this->getDatabasesIdOperationWriteMetric()), $count ); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index 2127206501..45a36a859d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -26,6 +26,42 @@ class Get extends Action return 'getDatabaseUsage'; } + protected $databaseType = DATABASE_TYPE_LEGACY; + + public function setHttpPath(string $path): Action + { + $this->databaseType = match (true) { + str_contains($path, '/documentsdb') => DATABASE_TYPE_DOCUMENTSDB, + default => DATABASE_TYPE_LEGACY, + }; + + return parent::setHttpPath($path); + } + + protected function getMetrics(): array + { + $metrics = [ + METRIC_DATABASE_ID_COLLECTIONS, + METRIC_DATABASE_ID_DOCUMENTS, + METRIC_DATABASE_ID_STORAGE, + METRIC_DATABASE_ID_OPERATIONS_READS, + METRIC_DATABASE_ID_OPERATIONS_WRITES + ]; + if ($this->databaseType === DATABASE_TYPE_LEGACY || $this->databaseType === DATABASE_TYPE_TABLESDB) { + return $metrics; + } + + return array_map( + fn ($metric) => "{$this->databaseType}.{$metric}", + $metrics + ); + } + + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_USAGE_DATABASE; + } + public function __construct() { $this @@ -73,13 +109,10 @@ class Get extends Action $periods = Config::getParam('usage', []); $stats = $usage = []; $days = $periods[$range]; - $metrics = [ - str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_COLLECTIONS), - str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_DOCUMENTS), - str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_STORAGE), - str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), - str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES) - ]; + $metrics = array_map( + fn ($metric) => str_replace('{databaseInternalId}', $database->getSequence(), $metric), + $this->getMetrics() + ); Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { foreach ($metrics as $metric) { @@ -141,6 +174,6 @@ class Get extends Action 'storage' => $usage[$metrics[2]]['data'], 'databaseReads' => $usage[$metrics[3]]['data'], 'databaseWrites' => $usage[$metrics[4]]['data'], - ]), UtopiaResponse::MODEL_USAGE_DATABASE); + ]), $this->getResponseModel()); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index c13149cfc7..5e244bb3d7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -24,6 +24,42 @@ class XList extends Action return 'listDatabaseUsage'; } + protected $databaseType = DATABASE_TYPE_LEGACY; + + public function setHttpPath(string $path): Action + { + $this->databaseType = match (true) { + str_contains($path, '/documentsdb') => DATABASE_TYPE_DOCUMENTSDB, + default => DATABASE_TYPE_LEGACY, + }; + + return parent::setHttpPath($path); + } + + protected function getMetrics(): array + { + $metrics = [ + METRIC_DATABASES, + METRIC_COLLECTIONS, + METRIC_DOCUMENTS, + METRIC_DATABASES_STORAGE, + METRIC_DATABASES_OPERATIONS_READS, + METRIC_DATABASES_OPERATIONS_WRITES, + ]; + if ($this->databaseType === DATABASE_TYPE_LEGACY || $this->databaseType === DATABASE_TYPE_TABLESDB) { + return $metrics; + } + return array_map( + fn ($metric) => "{$this->databaseType}.{$metric}", + $metrics + ); + } + + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_USAGE_DATABASES; + } + public function __construct() { $this @@ -65,14 +101,7 @@ class XList extends Action $periods = Config::getParam('usage', []); $stats = $usage = []; $days = $periods[$range]; - $metrics = [ - METRIC_DATABASES, - METRIC_COLLECTIONS, - METRIC_DOCUMENTS, - METRIC_DATABASES_STORAGE, - METRIC_DATABASES_OPERATIONS_READS, - METRIC_DATABASES_OPERATIONS_WRITES, - ]; + $metrics = $this->getMetrics(); Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { foreach ($metrics as $metric) { @@ -135,6 +164,6 @@ class XList extends Action 'storage' => $usage[$metrics[3]]['data'], 'databasesReads' => $usage[$metrics[4]]['data'], 'databasesWrites' => $usage[$metrics[5]]['data'], - ]), UtopiaResponse::MODEL_USAGE_DATABASES); + ]), $this->getResponseModel()); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Create.php index 14f555d3e3..a2d4321bee 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Create.php @@ -12,7 +12,9 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; +use Utopia\Validator\JSON; use Utopia\Validator\Text; class Create extends CollectionCreate @@ -59,6 +61,8 @@ class Create extends CollectionCreate ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('enabled', true, new Boolean(), 'Is collection enabled? When set to \'disabled\', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.', true) + ->param('attributes', [], new ArrayList(new JSON(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.', true) + ->param('indexes', [], new ArrayList(new JSON(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).', true) ->inject('response') ->inject('dbForProject') ->inject('getDatabasesDB') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Usage/Get.php index d188e34866..fd661a5d41 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Usage/Get.php @@ -24,6 +24,11 @@ class Get extends CollectionUsageGet return UtopiaResponse::MODEL_USAGE_COLLECTION; } + protected function getMetric(): string + { + return METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS_DOCUMENTSDB; + } + public function __construct() { $this diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Usage/Get.php index 03940902d5..450c0e82fe 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Usage/Get.php @@ -19,6 +19,11 @@ class Get extends DatabaseUsageGet return 'getDocumentsDBUsage'; } + public function getResponseModel(): string + { + return UtopiaResponse::MODEL_USAGE_DOCUMENTSDB; + } + public function __construct() { $this @@ -38,7 +43,7 @@ class Get extends DatabaseUsageGet responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_USAGE_DATABASE, + model: UtopiaResponse::MODEL_USAGE_DOCUMENTSDB, ) ], contentType: ContentType::JSON, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Usage/XList.php index 37fbbcb118..9ecda531b0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Usage/XList.php @@ -18,6 +18,11 @@ class XList extends DatabaseUsageXList return 'listDocumentsDBUsage'; } + public function getResponseModel(): string + { + return UtopiaResponse::MODEL_USAGE_DOCUMENTSDBS; + } + public function __construct() { $this diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php index 758e8559b9..b3fd2064cc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php @@ -13,7 +13,9 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; +use Utopia\Validator\JSON; use Utopia\Validator\Nullable; use Utopia\Validator\Text; @@ -61,6 +63,8 @@ class Create extends CollectionCreate ->param('permissions', null, new Nullable(new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE)), 'An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('rowSecurity', false, new Boolean(true), 'Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('enabled', true, new Boolean(), 'Is table enabled? When set to \'disabled\', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.', true) + ->param('columns', [], new ArrayList(new JSON(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.', true) + ->param('indexes', [], new ArrayList(new JSON(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).', true) ->inject('response') ->inject('dbForProject') ->inject('getDatabasesDB') diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 22b302f26e..d46a3b4986 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -1107,10 +1107,6 @@ class Builds extends Action $resource = $dbForProject->updateDocument($resource->getCollection(), $resource->getId(), new Document(['latestDeploymentStatus' => $deployment->getAttribute('status', '')])); } - $queueForRealtime - ->setPayload($deployment->getArrayCopy()) - ->trigger(); - if ($isVcsEnabled) { $this->runGitAction('ready', $github, $providerCommitHash, $owner, $repositoryName, $project, $resource, $deployment->getId(), $dbForProject, $dbForPlatform, $queueForRealtime); } @@ -1198,6 +1194,11 @@ class Builds extends Action Console::log('Deployment activated'); } + // Send realtime event after updating the associated resource so that Console will have the resource's deployment details when re-fetching. + $queueForRealtime + ->setPayload($deployment->getArrayCopy()) + ->trigger(); + if ($resource->getCollection() === 'sites') { // VCS branch $branchName = $deployment->getAttribute('providerBranch'); diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 43f901158e..836cbbc9c8 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -286,6 +286,8 @@ class Migrations extends Action 'disabledMetrics' => [ METRIC_DATABASES_OPERATIONS_READS, METRIC_DATABASES_OPERATIONS_WRITES, + METRIC_DATABASES_OPERATIONS_READS_DOCUMENTSDB, + METRIC_DATABASES_OPERATIONS_WRITES_DOCUMENTSDB, METRIC_NETWORK_REQUESTS, METRIC_NETWORK_INBOUND, METRIC_NETWORK_OUTBOUND, diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index 0c9c1fcfd6..b745fac367 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -123,7 +123,8 @@ class StatsResources extends Action ]); - $databases = $dbForProject->count('databases'); + $databases = $dbForProject->count('databases', [Query::equal('type', [DATABASE_TYPE_LEGACY, DATABASE_TYPE_TABLESDB])]); + $documentsdb = $dbForProject->count('databases', [Query::equal('type', [DATABASE_TYPE_DOCUMENTSDB])]); $buckets = $dbForProject->count('buckets'); $users = $dbForProject->count('users'); @@ -158,6 +159,7 @@ class StatsResources extends Action $metrics = [ METRIC_DATABASES => $databases, + METRIC_DATABASES_DOCUMENTSDB => $documentsdb, METRIC_BUCKETS => $buckets, METRIC_USERS => $users, METRIC_FUNCTIONS => $functions, @@ -259,48 +261,83 @@ class StatsResources extends Action { $totalCollections = 0; $totalDocuments = 0; - $totalDatabaseStorage = 0; - $this->foreachDocument($dbForProject, 'databases', [], function ($database) use ($dbForProject, $getDatabasesDB, $region, &$totalCollections, &$totalDocuments, &$totalDatabaseStorage) { + // documentsdb + $totalCollectionsDocumentsdb = 0; + $totalDocumentsDocumentsdb = 0; + $totalDatabaseStorageDocumentsdb = 0; + + + $this->foreachDocument($dbForProject, 'databases', [], function ($database) use ($dbForProject, $getDatabasesDB, $region, &$totalCollections, &$totalDocuments, &$totalDatabaseStorage, &$totalCollectionsDocumentsdb, &$totalDocumentsDocumentsdb, &$totalDatabaseStorageDocumentsdb) { $dbForDatabases = $getDatabasesDB($database); $collections = $dbForProject->count('database_' . $database->getSequence()); - $metric = str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_COLLECTIONS); + $databaseType = $database->getAttribute('type'); + $collectionsMetric = METRIC_DATABASE_ID_COLLECTIONS; + if (!empty($databaseType) && $databaseType !== DATABASE_TYPE_LEGACY && $databaseType !== DATABASE_TYPE_TABLESDB) { + $collectionsMetric = $databaseType . '.' . $collectionsMetric; + } + $metric = str_replace('{databaseInternalId}', $database->getSequence(), $collectionsMetric); $this->createStatsDocuments($region, $metric, $collections); [$documents, $storage] = $this->countForCollections($dbForProject, $dbForDatabases, $database, $region); - $totalDatabaseStorage += $storage; - $totalDocuments += $documents; - $totalCollections += $collections; + switch ($database->getAttribute('type')) { + case DATABASE_TYPE_DOCUMENTSDB: + $totalDatabaseStorageDocumentsdb += $storage; + $totalDocumentsDocumentsdb += $documents; + $totalCollectionsDocumentsdb += $collections; + break; + default: + $totalDatabaseStorage += $storage; + $totalDocuments += $documents; + $totalCollections += $collections; + } }); $this->createStatsDocuments($region, METRIC_COLLECTIONS, $totalCollections); $this->createStatsDocuments($region, METRIC_DOCUMENTS, $totalDocuments); $this->createStatsDocuments($region, METRIC_DATABASES_STORAGE, $totalDatabaseStorage); + + $this->createStatsDocuments($region, METRIC_COLLECTIONS_DOCUMENTSDB, $totalCollectionsDocumentsdb); + $this->createStatsDocuments($region, METRIC_DOCUMENTS_DOCUMENTSDB, $totalDocumentsDocumentsdb); + $this->createStatsDocuments($region, METRIC_DATABASES_STORAGE_DOCUMENTSDB, $totalDatabaseStorageDocumentsdb); } protected function countForCollections(Database $dbForProject, Database $dbForDatabases, Document $database, string $region): array { $databaseDocuments = 0; $databaseStorage = 0; - $this->foreachDocument($dbForProject, 'database_' . $database->getSequence(), [], function ($collection) use ($dbForProject, $dbForDatabases, $database, $region, &$databaseStorage, &$databaseDocuments) { + $databaseType = $database->getAttribute('type'); + $databaseIdCollectionIdDocumentsMetric = METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS; + $databaseIdCollectionIdStorageMetric = METRIC_DATABASE_ID_COLLECTION_ID_STORAGE; + $databaseIdDocumentsMetric = METRIC_DATABASE_ID_DOCUMENTS; + $databaseIdStorageMetric = METRIC_DATABASE_ID_STORAGE; + + if ($databaseType !== DATABASE_TYPE_LEGACY && $databaseType !== DATABASE_TYPE_TABLESDB) { + $databaseIdCollectionIdDocumentsMetric = $databaseType . '.' . $databaseIdCollectionIdDocumentsMetric; + $databaseIdCollectionIdStorageMetric = $databaseType . '.' . $databaseIdCollectionIdStorageMetric; + $databaseIdDocumentsMetric = $databaseType . '.' . $databaseIdDocumentsMetric; + $databaseIdStorageMetric = $databaseType . '.' . $databaseIdStorageMetric; + } + + $this->foreachDocument($dbForProject, 'database_' . $database->getSequence(), [], function ($collection) use ($dbForProject, $dbForDatabases, $database, $region, &$databaseStorage, &$databaseDocuments, $databaseIdCollectionIdDocumentsMetric, $databaseIdCollectionIdStorageMetric) { $documents = $dbForDatabases->count('database_' . $database->getSequence() . '_collection_' . $collection->getSequence()); - $metric = str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getSequence(), $collection->getSequence()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS); + $metric = str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getSequence(), $collection->getSequence()], $databaseIdCollectionIdDocumentsMetric); $this->createStatsDocuments($region, $metric, $documents); $databaseDocuments += $documents; $collectionStorage = $dbForDatabases->getSizeOfCollection('database_' . $database->getSequence() . '_collection_' . $collection->getSequence()); - $metric = str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getSequence(), $collection->getSequence()], METRIC_DATABASE_ID_COLLECTION_ID_STORAGE); + $metric = str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getSequence(), $collection->getSequence()], $databaseIdCollectionIdStorageMetric); $this->createStatsDocuments($region, $metric, $collectionStorage); $databaseStorage += $collectionStorage; }); - $metric = str_replace(['{databaseInternalId}'], [$database->getSequence()], METRIC_DATABASE_ID_DOCUMENTS); + $metric = str_replace(['{databaseInternalId}'], [$database->getSequence()], $databaseIdDocumentsMetric); $this->createStatsDocuments($region, $metric, $databaseDocuments); - $metric = str_replace(['{databaseInternalId}'], [$database->getSequence()], METRIC_DATABASE_ID_STORAGE); + $metric = str_replace(['{databaseInternalId}'], [$database->getSequence()], $databaseIdStorageMetric); $this->createStatsDocuments($region, $metric, $databaseStorage); return [$databaseDocuments, $databaseStorage]; diff --git a/src/Appwrite/Platform/Workers/StatsUsage.php b/src/Appwrite/Platform/Workers/StatsUsage.php index 018c192647..24e60a714e 100644 --- a/src/Appwrite/Platform/Workers/StatsUsage.php +++ b/src/Appwrite/Platform/Workers/StatsUsage.php @@ -47,6 +47,7 @@ class StatsUsage extends Action */ protected array $skipBaseMetrics = [ METRIC_DATABASES => true, + METRIC_DATABASES_DOCUMENTSDB => true, METRIC_BUCKETS => true, METRIC_USERS => true, METRIC_FUNCTIONS => true, @@ -85,6 +86,12 @@ class StatsUsage extends Action '.databases.storage' ]; + public const DATABASE_PREFIXES = [ + DATABASE_TYPE_LEGACY, + DATABASE_TYPE_TABLESDB, + DATABASE_TYPE_DOCUMENTSDB, + ]; + /** * @var callable(): Database */ @@ -146,6 +153,11 @@ class StatsUsage extends Action $aggregationInterval = (int) System::getEnv('_APP_USAGE_AGGREGATION_INTERVAL', '20'); $project = new Document($payload['project'] ?? []); $projectId = $project->getSequence(); + + // Get database type from context + $databaseContext = $payload['context']['database'] ?? null; + $databaseType = $databaseContext ? (new Document($databaseContext))->getAttribute('type', '') : ''; + foreach ($payload['reduce'] ?? [] as $document) { if (empty($document)) { continue; @@ -155,7 +167,8 @@ class StatsUsage extends Action project: $project, document: new Document($document), metrics: $payload['metrics'], - getProjectDB: $getProjectDB + getProjectDB: $getProjectDB, + databaseType: $databaseType ); } @@ -193,9 +206,10 @@ class StatsUsage extends Action * @param Document $document * @param array $metrics * @param callable(): Database $getProjectDB + * @param string $databaseType Database type from context * @return void */ - protected function reduce(Document $project, Document $document, array &$metrics, callable $getProjectDB): void + protected function reduce(Document $project, Document $document, array &$metrics, callable $getProjectDB, string $databaseType = ''): void { $dbForProject = $getProjectDB($project); @@ -211,38 +225,48 @@ class StatsUsage extends Action } break; case $document->getCollection() === 'databases': // databases - $collections = $dbForProject->getDocument('stats', md5(self::INFINITY_PERIOD . str_replace('{databaseInternalId}', $document->getSequence(), METRIC_DATABASE_ID_COLLECTIONS))); - $documents = $dbForProject->getDocument('stats', md5(self::INFINITY_PERIOD . str_replace('{databaseInternalId}', $document->getSequence(), METRIC_DATABASE_ID_DOCUMENTS))); + $databaseCollectionsMetric = implode('.', array_filter([$databaseType,METRIC_COLLECTIONS])); + $databaseDocumentsMetric = implode('.', array_filter([$databaseType,METRIC_DOCUMENTS])); + + $databaseIdCollectionsMetric = implode('.', array_filter([$databaseType,METRIC_DATABASE_ID_COLLECTIONS])); + $databaseIdDocumentsMetric = implode('.', array_filter([$databaseType,METRIC_DATABASE_ID_DOCUMENTS])); + + $collections = $dbForProject->getDocument('stats', md5(self::INFINITY_PERIOD . str_replace('{databaseInternalId}', $document->getSequence(), $databaseIdCollectionsMetric))); + $documents = $dbForProject->getDocument('stats', md5(self::INFINITY_PERIOD . str_replace('{databaseInternalId}', $document->getSequence(), $databaseIdDocumentsMetric))); if (!empty($collections['value'])) { $metrics[] = [ - 'key' => METRIC_COLLECTIONS, + 'key' => $databaseCollectionsMetric, 'value' => ($collections['value'] * -1), ]; } if (!empty($documents['value'])) { $metrics[] = [ - 'key' => METRIC_DOCUMENTS, + 'key' => $databaseDocumentsMetric, 'value' => ($documents['value'] * -1), ]; } break; case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections + $databaseDocumentsMetric = implode('.', array_filter([$databaseType,METRIC_DOCUMENTS])); + $databaseIdCollectionIdDocumentsMetric = implode('.', array_filter([$databaseType,METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS])); + $databaseIdDocumentsMetric = implode('.', array_filter([$databaseType,METRIC_DATABASE_ID_DOCUMENTS])); + $parts = explode('_', $document->getCollection()); $databaseInternalId = $parts[1] ?? 0; $documents = $dbForProject->getDocument('stats', md5(self::INFINITY_PERIOD . str_replace( ['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $document->getSequence()], - METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS + $databaseIdCollectionIdDocumentsMetric ))); if (!empty($documents['value'])) { $metrics[] = [ - 'key' => METRIC_DOCUMENTS, + 'key' => $databaseDocumentsMetric, 'value' => ($documents['value'] * -1), ]; $metrics[] = [ - 'key' => str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), + 'key' => str_replace('{databaseInternalId}', $databaseInternalId, $databaseIdDocumentsMetric), 'value' => ($documents['value'] * -1), ]; } @@ -473,8 +497,11 @@ class StatsUsage extends Action if (array_key_exists($stat->getAttribute('metric'), $this->skipBaseMetrics)) { return; } + foreach ($this->skipParentIdMetrics as $skipMetric) { - if (str_ends_with($stat->getAttribute('metric'), $skipMetric)) { + $metricParts = explode('.', $stat->getAttribute('metric')); + $metric = implode('.', in_array($metricParts[0], self::DATABASE_PREFIXES) ? array_slice($metricParts, 1) : $metricParts); + if (str_ends_with($metric, $metric)) { return; } } diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index d614a5983a..6304b042a7 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -171,6 +171,12 @@ abstract class Format return 'CreditCard'; case 'getFlag': return 'Flag'; + case 'getScreenshot': + switch ($param) { + case 'permissions': + return 'BrowserPermission'; + } + break; } break; case 'databases': diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 0ab16d306b..bfa33e19f3 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -19,7 +19,6 @@ use Utopia\Validator; use Utopia\Validator\ArrayList; use Utopia\Validator\Nullable; use Utopia\Validator\Range; -use Utopia\Validator\WhiteList; class OpenAPI3 extends Format { @@ -440,6 +439,7 @@ class OpenAPI3 extends Format $subclass = \get_class($validator->getValidator()); switch ($subclass) { case 'Appwrite\Utopia\Database\Validator\Operation': + case 'Utopia\Validator\WhiteList': $class = $subclass; break; } @@ -449,23 +449,23 @@ class OpenAPI3 extends Format case 'Utopia\Database\Validator\UID': case 'Utopia\Validator\Text': $node['schema']['type'] = $validator->getType(); - $node['schema']['x-example'] = '<' . \strtoupper(Template::fromCamelCaseToSnake($node['name'])) . '>'; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: '<' . \strtoupper(Template::fromCamelCaseToSnake($node['name'])) . '>'; break; case 'Utopia\Validator\Boolean': $node['schema']['type'] = $validator->getType(); - $node['schema']['x-example'] = false; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: false; break; case 'Appwrite\Utopia\Database\Validator\CustomId': if ($sdk->getType() === MethodType::UPLOAD) { $node['schema']['x-upload-id'] = true; } $node['schema']['type'] = $validator->getType(); - $node['schema']['x-example'] = '<' . \strtoupper(Template::fromCamelCaseToSnake($node['name'])) . '>'; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: '<' . \strtoupper(Template::fromCamelCaseToSnake($node['name'])) . '>'; break; case 'Utopia\Database\Validator\DatetimeValidator': $node['schema']['type'] = $validator->getType(); $node['schema']['format'] = 'datetime'; - $node['schema']['x-example'] = Model::TYPE_DATETIME_EXAMPLE; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: Model::TYPE_DATETIME_EXAMPLE; break; case 'Utopia\Database\Validator\Spatial': /** @var Spatial $validator */ @@ -475,7 +475,7 @@ class OpenAPI3 extends Format ['type' => 'array'] ] ]; - $node['schema']['x-example'] = match ($validator->getSpatialType()) { + $node['schema']['x-example'] = ($param['example'] ?? '') ?: match ($validator->getSpatialType()) { Database::VAR_POINT => '[1, 2]', Database::VAR_LINESTRING => '[[1, 2], [3, 4], [5, 6]]', Database::VAR_POLYGON => '[[[1, 2], [3, 4], [5, 6], [1, 2]]]', @@ -484,14 +484,14 @@ class OpenAPI3 extends Format case 'Appwrite\Network\Validator\Email': $node['schema']['type'] = $validator->getType(); $node['schema']['format'] = 'email'; - $node['schema']['x-example'] = 'email@example.com'; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: 'email@example.com'; break; case 'Utopia\Validator\Host': case 'Utopia\Validator\URL': case 'Appwrite\Network\Validator\Redirect': $node['schema']['type'] = $validator->getType(); $node['schema']['format'] = 'url'; - $node['schema']['x-example'] = 'https://example.com'; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: 'https://example.com'; break; case 'Utopia\Validator\JSON': case 'Utopia\Validator\Mock': @@ -511,6 +511,9 @@ class OpenAPI3 extends Format $node['schema']['items'] = [ 'type' => $validator->getValidator()->getType(), ]; + if (!empty($param['example'])) { + $node['schema']['x-example'] = $param['example']; + } break; case 'Appwrite\Utopia\Database\Validator\Queries\Base': case 'Appwrite\Utopia\Database\Validator\Queries\Columns': @@ -551,73 +554,115 @@ class OpenAPI3 extends Format $node['schema']['items'] = [ 'type' => 'string', ]; - $node['schema']['x-example'] = '["' . Permission::read(Role::any()) . '"]'; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: '["' . Permission::read(Role::any()) . '"]'; break; case 'Utopia\Database\Validator\Roles': $node['schema']['type'] = $validator->getType(); $node['schema']['items'] = [ 'type' => 'string', ]; - $node['schema']['x-example'] = '["' . Role::any()->toString() . '"]'; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: '["' . Role::any()->toString() . '"]'; break; case 'Appwrite\Auth\Validator\Password': $node['schema']['type'] = $validator->getType(); $node['schema']['format'] = 'password'; - $node['schema']['x-example'] = 'password'; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: 'password'; break; case 'Appwrite\Auth\Validator\Phone': $node['schema']['type'] = $validator->getType(); $node['schema']['format'] = 'phone'; - $node['schema']['x-example'] = '+12065550100'; // In the US, 555 is reserved like example.com + $node['schema']['x-example'] = ($param['example'] ?? '') ?: '+12065550100'; // In the US, 555 is reserved like example.com break; case 'Utopia\Validator\Range': /** @var Range $validator */ $node['schema']['type'] = $validator->getType() === Validator::TYPE_FLOAT ? 'number' : $validator->getType(); $node['schema']['format'] = $validator->getType() == Validator::TYPE_INTEGER ? 'int32' : 'float'; - $node['schema']['x-example'] = $validator->getMin(); + $node['schema']['x-example'] = ($param['example'] ?? '') ?: $validator->getMin(); break; case 'Utopia\Validator\Integer': $node['schema']['type'] = $validator->getType(); $node['schema']['format'] = 'int32'; + if (!empty($param['example'])) { + $node['schema']['x-example'] = $param['example']; + } break; case 'Utopia\Validator\Numeric': case 'Utopia\Validator\FloatValidator': $node['schema']['type'] = 'number'; $node['schema']['format'] = 'float'; + if (!empty($param['example'])) { + $node['schema']['x-example'] = $param['example']; + } break; case 'Utopia\Validator\Length': $node['schema']['type'] = $validator->getType(); + if (!empty($param['example'])) { + $node['schema']['x-example'] = $param['example']; + } break; case 'Utopia\Validator\WhiteList': - /** @var WhiteList $validator */ - $node['schema']['type'] = $validator->getType(); - $node['schema']['x-example'] = $validator->getList()[0]; + if ($array) { + $validator = $validator->getValidator(); - // Iterate from the blackList. If it matches with the current one, then it is a blackList - // Do not add the enum - $allowed = true; - foreach ($this->enumBlacklist as $blacklist) { - if ( - $blacklist['namespace'] == $sdk->getNamespace() - && $blacklist['method'] == $methodName - && $blacklist['parameter'] == $name - ) { - $allowed = false; - break; + $node['schema']['type'] = 'array'; + $node['schema']['items'] = [ + 'type' => $validator->getType(), + ]; + if (!empty($param['example'])) { + $node['schema']['x-example'] = $param['example']; + } + + // Iterate from the blackList. If it matches with the current one, then it is a blackList + // Do not add the enum + $allowed = true; + foreach ($this->enumBlacklist as $blacklist) { + if ( + $blacklist['namespace'] == $sdk->getNamespace() + && $blacklist['method'] == $methodName + && $blacklist['parameter'] == $name + ) { + $allowed = false; + break; + } + } + if ($allowed && $validator->getType() === 'string') { + $node['schema']['items']['enum'] = \array_values($validator->getList()); + $node['schema']['items']['x-enum-name'] = $this->getRequestEnumName($sdk->getNamespace() ?? '', $methodName, $name); + $node['schema']['items']['x-enum-keys'] = $this->getRequestEnumKeys($sdk->getNamespace() ?? '', $methodName, $name); + } + if ($validator->getType() === 'integer') { + $node['schema']['items']['format'] = 'int32'; + } + } else { + $node['schema']['type'] = $validator->getType(); + $node['schema']['x-example'] = ($param['example'] ?? '') ?: $validator->getList()[0]; + + // Iterate from the blackList. If it matches with the current one, then it is a blackList + // Do not add the enum + $allowed = true; + foreach ($this->enumBlacklist as $blacklist) { + if ( + $blacklist['namespace'] == $sdk->getNamespace() + && $blacklist['method'] == $methodName + && $blacklist['parameter'] == $name + ) { + $allowed = false; + break; + } + } + if ($allowed && $validator->getType() === 'string') { + $node['schema']['enum'] = \array_values($validator->getList()); + $node['schema']['x-enum-name'] = $this->getRequestEnumName($sdk->getNamespace() ?? '', $methodName, $name); + $node['schema']['x-enum-keys'] = $this->getRequestEnumKeys($sdk->getNamespace() ?? '', $methodName, $name); + } + if ($validator->getType() === 'integer') { + $node['format'] = 'int32'; } - } - if ($allowed && $validator->getType() === 'string') { - $node['schema']['enum'] = $validator->getList(); - $node['schema']['x-enum-name'] = $this->getRequestEnumName($sdk->getNamespace() ?? '', $methodName, $name); - $node['schema']['x-enum-keys'] = $this->getRequestEnumKeys($sdk->getNamespace() ?? '', $methodName, $name); - } - if ($validator->getType() === 'integer') { - $node['format'] = 'int32'; } break; case 'Appwrite\Utopia\Database\Validator\CompoundUID': $node['schema']['type'] = $validator->getType(); - $node['schema']['x-example'] = ''; + $node['schema']['x-example'] = ($param['example'] ?? '') ?: ''; break; case 'Appwrite\Utopia\Database\Validator\Operation': if ($array) { @@ -633,22 +678,29 @@ class OpenAPI3 extends Format } else { $node['schema']['type'] = 'object'; } - $example = [ - 'action' => 'create', - 'databaseId' => '', - $collectionIdKey => '<'.\strtoupper(Template::fromCamelCaseToSnake($collectionIdKey)).'>', - $documentIdKey => '<'.\strtoupper(Template::fromCamelCaseToSnake($documentIdKey)).'>', - 'data' => [ - 'name' => 'Walter O\'Brien', - ], - ]; - if ($array) { - $example = [$example]; + if (empty($param['example'])) { + $example = [ + 'action' => 'create', + 'databaseId' => '', + $collectionIdKey => '<'.\strtoupper(Template::fromCamelCaseToSnake($collectionIdKey)).'>', + $documentIdKey => '<'.\strtoupper(Template::fromCamelCaseToSnake($documentIdKey)).'>', + 'data' => [ + 'name' => 'Walter O\'Brien', + ], + ]; + if ($array) { + $example = [$example]; + } + $node['schema']['x-example'] = \str_replace("\n", "\n\t", \json_encode($example, JSON_PRETTY_PRINT)); + } else { + $node['schema']['x-example'] = $param['example']; } - $node['schema']['x-example'] = \str_replace("\n", "\n\t", \json_encode($example, JSON_PRETTY_PRINT)); break; default: $node['schema']['type'] = 'string'; + if (!empty($param['example'])) { + $node['schema']['x-example'] = $param['example']; + } break; } @@ -853,13 +905,13 @@ class OpenAPI3 extends Format } if ($rule['type'] === 'enum' && !empty($rule['enum'])) { if ($rule['array']) { - $output['components']['schemas'][$model->getType()]['properties'][$name]['items']['enum'] = $rule['enum']; + $output['components']['schemas'][$model->getType()]['properties'][$name]['items']['enum'] = \array_values($rule['enum']); $enumName = $this->getResponseEnumName($model->getType(), $name); if ($enumName) { $output['components']['schemas'][$model->getType()]['properties'][$name]['items']['x-enum-name'] = $enumName; } } else { - $output['components']['schemas'][$model->getType()]['properties'][$name]['enum'] = $rule['enum']; + $output['components']['schemas'][$model->getType()]['properties'][$name]['enum'] = \array_values($rule['enum']); $enumName = $this->getResponseEnumName($model->getType(), $name); if ($enumName) { $output['components']['schemas'][$model->getType()]['properties'][$name]['x-enum-name'] = $enumName; diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 7606c48750..b0deb034b4 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -20,7 +20,6 @@ use Utopia\Validator; use Utopia\Validator\ArrayList; use Utopia\Validator\Nullable; use Utopia\Validator\Range; -use Utopia\Validator\WhiteList; class Swagger2 extends Format { @@ -445,6 +444,7 @@ class Swagger2 extends Format $subclass = \get_class($validator->getValidator()); switch ($subclass) { case 'Appwrite\Utopia\Database\Validator\Operation': + case 'Utopia\Validator\WhiteList': $class = $subclass; break; } @@ -454,23 +454,23 @@ class Swagger2 extends Format case 'Utopia\Validator\Text': case 'Utopia\Database\Validator\UID': $node['type'] = $validator->getType(); - $node['x-example'] = '<' . \strtoupper(Template::fromCamelCaseToSnake($node['name'])) . '>'; + $node['x-example'] = ($param['example'] ?? '') ?: '<' . \strtoupper(Template::fromCamelCaseToSnake($node['name'])) . '>'; break; case 'Utopia\Validator\Boolean': $node['type'] = $validator->getType(); - $node['x-example'] = false; + $node['x-example'] = ($param['example'] ?? '') ?: false; break; case 'Appwrite\Utopia\Database\Validator\CustomId': if ($sdk->getType() === MethodType::UPLOAD) { $node['x-upload-id'] = true; } $node['type'] = $validator->getType(); - $node['x-example'] = '<' . \strtoupper(Template::fromCamelCaseToSnake($node['name'])) . '>'; + $node['x-example'] = ($param['example'] ?? '') ?: '<' . \strtoupper(Template::fromCamelCaseToSnake($node['name'])) . '>'; break; case 'Utopia\Database\Validator\DatetimeValidator': $node['type'] = $validator->getType(); $node['format'] = 'datetime'; - $node['x-example'] = Model::TYPE_DATETIME_EXAMPLE; + $node['x-example'] = ($param['example'] ?? '') ?: Model::TYPE_DATETIME_EXAMPLE; break; case 'Utopia\Database\Validator\Spatial': /** @var Spatial $validator */ @@ -480,7 +480,7 @@ class Swagger2 extends Format ['type' => 'array'] ] ]; - $node['x-example'] = match ($validator->getSpatialType()) { + $node['x-example'] = ($param['example'] ?? '') ?: match ($validator->getSpatialType()) { Database::VAR_POINT => '[1, 2]', Database::VAR_LINESTRING => '[[1, 2], [3, 4], [5, 6]]', Database::VAR_POLYGON => '[[[1, 2], [3, 4], [5, 6], [1, 2]]]', @@ -489,14 +489,14 @@ class Swagger2 extends Format case 'Appwrite\Network\Validator\Email': $node['type'] = $validator->getType(); $node['format'] = 'email'; - $node['x-example'] = 'email@example.com'; + $node['x-example'] = ($param['example'] ?? '') ?: 'email@example.com'; break; case 'Utopia\Validator\Host': case 'Utopia\Validator\URL': case 'Appwrite\Network\Validator\Redirect': $node['type'] = $validator->getType(); $node['format'] = 'url'; - $node['x-example'] = 'https://example.com'; + $node['x-example'] = ($param['example'] ?? '') ?: 'https://example.com'; break; case 'Utopia\Validator\ArrayList': /** @var ArrayList $validator */ @@ -505,6 +505,9 @@ class Swagger2 extends Format $node['items'] = [ 'type' => $validator->getValidator()->getType(), ]; + if (!empty($param['example'])) { + $node['x-example'] = $param['example']; + } break; case 'Utopia\Validator\JSON': case 'Utopia\Validator\Mock': @@ -539,7 +542,7 @@ class Swagger2 extends Format $node['items'] = [ 'type' => 'string', ]; - $node['x-example'] = '["' . Permission::read(Role::any()) . '"]'; + $node['x-example'] = ($param['example'] ?? '') ?: '["' . Permission::read(Role::any()) . '"]'; break; case 'Utopia\Database\Validator\Roles': $node['type'] = $validator->getType(); @@ -547,61 +550,99 @@ class Swagger2 extends Format $node['items'] = [ 'type' => 'string', ]; - $node['x-example'] = '["' . Role::any()->toString() . '"]'; + $node['x-example'] = ($param['example'] ?? '') ?: '["' . Role::any()->toString() . '"]'; break; case 'Appwrite\Auth\Validator\Password': $node['type'] = $validator->getType(); $node['format'] = 'password'; - $node['x-example'] = 'password'; + $node['x-example'] = ($param['example'] ?? '') ?: 'password'; break; case 'Appwrite\Auth\Validator\Phone': $node['type'] = $validator->getType(); $node['format'] = 'phone'; - $node['x-example'] = '+12065550100'; + $node['x-example'] = ($param['example'] ?? '') ?: '+12065550100'; break; case 'Utopia\Validator\Range': /** @var Range $validator */ $node['type'] = $validator->getType() === Validator::TYPE_FLOAT ? 'number' : $validator->getType(); $node['format'] = $validator->getType() == Validator::TYPE_INTEGER ? 'int32' : 'float'; - $node['x-example'] = $validator->getMin(); + $node['x-example'] = ($param['example'] ?? '') ?: $validator->getMin(); break; case 'Utopia\Validator\Integer': $node['type'] = $validator->getType(); $node['format'] = 'int32'; + if (!empty($param['example'])) { + $node['x-example'] = $param['example']; + } break; case 'Utopia\Validator\Numeric': case 'Utopia\Validator\FloatValidator': $node['type'] = 'number'; $node['format'] = 'float'; + if (!empty($param['example'])) { + $node['x-example'] = $param['example']; + } break; case 'Utopia\Validator\Length': $node['type'] = $validator->getType(); + if (!empty($param['example'])) { + $node['x-example'] = $param['example']; + } break; case 'Utopia\Validator\WhiteList': - /** @var WhiteList $validator */ - $node['type'] = $validator->getType(); - $node['x-example'] = $validator->getList()[0]; + if ($array) { + $validator = $validator->getValidator(); - // Iterate the blackList. If it matches with the current one, then it is blackListed - $allowed = true; - foreach ($this->enumBlacklist as $blacklist) { - if ($blacklist['namespace'] == $namespace && $blacklist['method'] == $methodName && $blacklist['parameter'] == $name) { - $allowed = false; - break; + $node['type'] = 'array'; + $node['collectionFormat'] = 'multi'; + $node['items'] = [ + 'type' => $validator->getType(), + ]; + if (!empty($param['example'])) { + $node['x-example'] = $param['example']; + } + + // Iterate the blackList. If it matches with the current one, then it is blackListed + $allowed = true; + foreach ($this->enumBlacklist as $blacklist) { + if ($blacklist['namespace'] == $namespace && $blacklist['method'] == $methodName && $blacklist['parameter'] == $name) { + $allowed = false; + break; + } + } + if ($allowed && $validator->getType() === 'string') { + $node['items']['enum'] = \array_values($validator->getList()); + $node['items']['x-enum-name'] = $this->getRequestEnumName($namespace, $methodName, $name); + $node['items']['x-enum-keys'] = $this->getRequestEnumKeys($namespace, $methodName, $name); + } + if ($validator->getType() === 'integer') { + $node['items']['format'] = 'int32'; + } + } else { + $node['type'] = $validator->getType(); + $node['x-example'] = ($param['example'] ?? '') ?: $validator->getList()[0]; + + // Iterate the blackList. If it matches with the current one, then it is blackListed + $allowed = true; + foreach ($this->enumBlacklist as $blacklist) { + if ($blacklist['namespace'] == $namespace && $blacklist['method'] == $methodName && $blacklist['parameter'] == $name) { + $allowed = false; + break; + } + } + if ($allowed && $validator->getType() === 'string') { + $node['enum'] = \array_values($validator->getList()); + $node['x-enum-name'] = $this->getRequestEnumName($namespace, $methodName, $name); + $node['x-enum-keys'] = $this->getRequestEnumKeys($namespace, $methodName, $name); + } + if ($validator->getType() === 'integer') { + $node['format'] = 'int32'; } - } - if ($allowed && $validator->getType() === 'string') { - $node['enum'] = $validator->getList(); - $node['x-enum-name'] = $this->getRequestEnumName($namespace, $methodName, $name); - $node['x-enum-keys'] = $this->getRequestEnumKeys($namespace, $methodName, $name); - } - if ($validator->getType() === 'integer') { - $node['format'] = 'int32'; } break; case 'Appwrite\Utopia\Database\Validator\CompoundUID': $node['type'] = $validator->getType(); - $node['x-example'] = ''; + $node['x-example'] = ($param['example'] ?? '') ?: ''; break; case 'Appwrite\Utopia\Database\Validator\Operation': if ($array) { @@ -618,22 +659,29 @@ class Swagger2 extends Format } else { $node['type'] = 'object'; } - $example = [ - 'action' => 'create', - 'databaseId' => '', - $collectionIdKey => '<'.\strtoupper(Template::fromCamelCaseToSnake($collectionIdKey)).'>', - $documentIdKey => '<'.\strtoupper(Template::fromCamelCaseToSnake($documentIdKey)).'>', - 'data' => [ - 'name' => 'Walter O\'Brien', - ], - ]; - if ($array) { - $example = [$example]; + if (empty($param['example'])) { + $example = [ + 'action' => 'create', + 'databaseId' => '', + $collectionIdKey => '<'.\strtoupper(Template::fromCamelCaseToSnake($collectionIdKey)).'>', + $documentIdKey => '<'.\strtoupper(Template::fromCamelCaseToSnake($documentIdKey)).'>', + 'data' => [ + 'name' => 'Walter O\'Brien', + ], + ]; + if ($array) { + $example = [$example]; + } + $node['x-example'] = \str_replace("\n", "\n\t", \json_encode($example, JSON_PRETTY_PRINT)); + } else { + $node['x-example'] = $param['example']; } - $node['x-example'] = \str_replace("\n", "\n\t", \json_encode($example, JSON_PRETTY_PRINT)); break; default: $node['type'] = 'string'; + if (!empty($param['example'])) { + $node['x-example'] = $param['example']; + } break; } @@ -853,13 +901,13 @@ class Swagger2 extends Format } if ($rule['type'] === 'enum' && !empty($rule['enum'])) { if ($rule['array']) { - $output['definitions'][$model->getType()]['properties'][$name]['items']['enum'] = $rule['enum']; + $output['definitions'][$model->getType()]['properties'][$name]['items']['enum'] = \array_values($rule['enum']); $enumName = $this->getResponseEnumName($model->getType(), $name); if ($enumName) { $output['definitions'][$model->getType()]['properties'][$name]['items']['x-enum-name'] = $enumName; } } else { - $output['definitions'][$model->getType()]['properties'][$name]['enum'] = $rule['enum']; + $output['definitions'][$model->getType()]['properties'][$name]['enum'] = \array_values($rule['enum']); $enumName = $this->getResponseEnumName($model->getType(), $name); if ($enumName) { $output['definitions'][$model->getType()]['properties'][$name]['x-enum-name'] = $enumName; diff --git a/src/Appwrite/Utopia/Database/Validator/Attributes.php b/src/Appwrite/Utopia/Database/Validator/Attributes.php new file mode 100644 index 0000000000..839d1d2533 --- /dev/null +++ b/src/Appwrite/Utopia/Database/Validator/Attributes.php @@ -0,0 +1,365 @@ + Supported attribute types + */ + protected array $supportedTypes = [ + Database::VAR_STRING, + Database::VAR_INTEGER, + Database::VAR_FLOAT, + Database::VAR_BOOLEAN, + Database::VAR_DATETIME, + Database::VAR_POINT, + Database::VAR_LINESTRING, + Database::VAR_POLYGON, + ]; + + /** + * @var array Supported formats for string attributes + */ + protected array $supportedFormats = [ + '', + APP_DATABASE_ATTRIBUTE_EMAIL, + APP_DATABASE_ATTRIBUTE_ENUM, + APP_DATABASE_ATTRIBUTE_IP, + APP_DATABASE_ATTRIBUTE_URL, + ]; + + /** + * @param int $maxAttributes Maximum number of attributes allowed + * @param bool $supportForSpatialAttributes Whether DB supports spatial attributes + * @param bool $supportForSpatialAttributes Whether DB supports attributes or not + */ + public function __construct( + int $maxAttributes = APP_LIMIT_ARRAY_PARAMS_SIZE, + protected bool $supportForSpatialAttributes = true, + protected bool $supportForAttributes = true + ) { + $this->maxAttributes = $maxAttributes; + } + + /** + * Get Description + * + * Returns validator description + * + * @return string + */ + public function getDescription(): string + { + return $this->message; + } + + /** + * Is valid + * + * @param mixed $value + * @return bool + */ + public function isValid($value): bool + { + if (!\is_array($value)) { + $this->message = 'Attributes must be an array'; + return false; + } + + if (\count($value) && !$this->supportForAttributes) { + $this->message = "Attributes are not supported by the current database"; + return false; + } + + if (\count($value) > $this->maxAttributes) { + $this->message = 'Maximum of ' . $this->maxAttributes . ' attributes allowed'; + return false; + } + + $keyValidator = new Key(); + $keys = []; + + foreach ($value as $index => $attribute) { + if (!\is_array($attribute)) { + $this->message = "Attribute at index $index must be an object"; + return false; + } + + // Validate required fields + if (!isset($attribute['key'])) { + $this->message = "Attribute at index $index is missing required field 'key'"; + return false; + } + + if (!isset($attribute['type'])) { + $this->message = "Attribute at index $index is missing required field 'type'"; + return false; + } + + // Validate key + if (!$keyValidator->isValid($attribute['key'])) { + $this->message = "Invalid key for attribute at index $index: " . $keyValidator->getDescription(); + return false; + } + + // Check for duplicate keys + if (in_array($attribute['key'], $keys)) { + $this->message = "Duplicate attribute key: " . $attribute['key']; + return false; + } + $keys[] = $attribute['key']; + + // Check for reserved keys + $reservedKeys = ['$id', '$createdAt', '$updatedAt', '$permissions', '$collection']; + if (\in_array($attribute['key'], $reservedKeys)) { + $this->message = "Attribute key '" . $attribute['key'] . "' is reserved and cannot be used"; + return false; + } + + // Validate type + if (!\in_array($attribute['type'], $this->supportedTypes)) { + $this->message = "Invalid type for attribute '" . $attribute['key'] . "': " . $attribute['type']; + return false; + } + + // Validate spatial type support + if (\in_array($attribute['type'], Database::SPATIAL_TYPES) && !$this->supportForSpatialAttributes) { + $this->message = "Spatial attributes are not supported by the current database"; + return false; + } + + // Validate size for string types + if ($attribute['type'] === Database::VAR_STRING) { + if (!isset($attribute['size']) || !is_int($attribute['size']) || $attribute['size'] < 1 || $attribute['size'] > APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH) { + $this->message = "Invalid or missing size for string attribute '" . $attribute['key'] . "'. Size must be between 1 and " . APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH; + return false; + } + } + + // Validate format if provided + if (isset($attribute['format']) && $attribute['format'] !== '') { + // Format is only allowed for string type + if ($attribute['type'] !== Database::VAR_STRING) { + $this->message = "Format is only allowed for string type for attribute '" . $attribute['key'] . "'"; + return false; + } + if (!in_array($attribute['format'], $this->supportedFormats)) { + $this->message = "Invalid format for attribute '" . $attribute['key'] . "': " . $attribute['format']; + return false; + } + } + + // Validate required field if provided + if (isset($attribute['required']) && !is_bool($attribute['required'])) { + $this->message = "Invalid 'required' value for attribute '" . $attribute['key'] . "': must be a boolean"; + return false; + } + + // Validate array field if provided + if (isset($attribute['array']) && !is_bool($attribute['array'])) { + $this->message = "Invalid 'array' value for attribute '" . $attribute['key'] . "': must be a boolean"; + return false; + } + + // Validate signed field if provided + if (isset($attribute['signed']) && !is_bool($attribute['signed'])) { + $this->message = "Invalid 'signed' value for attribute '" . $attribute['key'] . "': must be a boolean"; + return false; + } + + // Validate signed only for integer/float types + if (isset($attribute['signed']) && !in_array($attribute['type'], [Database::VAR_INTEGER, Database::VAR_FLOAT])) { + $this->message = "Attribute '" . $attribute['key'] . "': 'signed' can only be used with integer or float types"; + return false; + } + + // Validate required and default conflict + if (isset($attribute['required']) && $attribute['required'] === true && isset($attribute['default']) && $attribute['default'] !== null) { + $this->message = "Attribute '" . $attribute['key'] . "' cannot have a default value when required is true"; + return false; + } + + // Validate array and default conflict + if (isset($attribute['array']) && $attribute['array'] === true && isset($attribute['default']) && $attribute['default'] !== null) { + $this->message = "Attribute '" . $attribute['key'] . "' cannot have a default value when array is true"; + return false; + } + + // Validate min/max range for integer/float + if (isset($attribute['min']) || isset($attribute['max'])) { + if (!in_array($attribute['type'], [Database::VAR_INTEGER, Database::VAR_FLOAT])) { + $this->message = "Attribute '" . $attribute['key'] . "': min/max can only be used with integer or float types"; + return false; + } + + // If both are set, validate ordering + if (isset($attribute['min']) && isset($attribute['max']) && $attribute['min'] > $attribute['max']) { + $this->message = "Attribute '" . $attribute['key'] . "': minimum value must be less than or equal to maximum value"; + return false; + } + } + + // Validate default value matches attribute type + if (isset($attribute['default'])) { + switch ($attribute['type']) { + case Database::VAR_STRING: + if (!is_string($attribute['default'])) { + $this->message = "Default value for string attribute '" . $attribute['key'] . "' must be a string"; + return false; + } + + // Validate string size + $size = $attribute['size'] ?? 0; + if ($size > 0) { + $textValidator = new Text($size, 0); + if (!$textValidator->isValid($attribute['default'])) { + $this->message = "Default value for attribute '" . $attribute['key'] . "' exceeds maximum size of $size characters"; + return false; + } + } + + // Validate format-specific defaults + $format = $attribute['format'] ?? ''; + if ($format === APP_DATABASE_ATTRIBUTE_EMAIL) { + $emailValidator = new Email(); + if (!$emailValidator->isValid($attribute['default'])) { + $this->message = "Default value for email attribute '" . $attribute['key'] . "' must be a valid email address"; + return false; + } + } elseif ($format === APP_DATABASE_ATTRIBUTE_IP) { + $ipValidator = new IP(); + if (!$ipValidator->isValid($attribute['default'])) { + $this->message = "Default value for IP attribute '" . $attribute['key'] . "' must be a valid IP address"; + return false; + } + } elseif ($format === APP_DATABASE_ATTRIBUTE_URL) { + $urlValidator = new URL(); + if (!$urlValidator->isValid($attribute['default'])) { + $this->message = "Default value for URL attribute '" . $attribute['key'] . "' must be a valid URL"; + return false; + } + } + break; + + case Database::VAR_INTEGER: + if (!is_int($attribute['default'])) { + $this->message = "Default value for integer attribute '" . $attribute['key'] . "' must be an integer"; + return false; + } + // Validate within range if min/max specified + if (isset($attribute['min']) || isset($attribute['max'])) { + $min = $attribute['min'] ?? \PHP_INT_MIN; + $max = $attribute['max'] ?? \PHP_INT_MAX; + $rangeValidator = new Range($min, $max, Database::VAR_INTEGER); + if (!$rangeValidator->isValid($attribute['default'])) { + $this->message = "Default value for integer attribute '" . $attribute['key'] . "' must be between $min and $max"; + return false; + } + } + break; + + case Database::VAR_FLOAT: + if (!is_float($attribute['default']) && !is_int($attribute['default'])) { + $this->message = "Default value for float attribute '" . $attribute['key'] . "' must be a number"; + return false; + } + // Validate within range if min/max specified + if (isset($attribute['min']) || isset($attribute['max'])) { + $min = $attribute['min'] ?? -\PHP_FLOAT_MAX; + $max = $attribute['max'] ?? \PHP_FLOAT_MAX; + $rangeValidator = new Range($min, $max, Database::VAR_FLOAT); + if (!$rangeValidator->isValid((float)$attribute['default'])) { + $this->message = "Default value for float attribute '" . $attribute['key'] . "' must be between $min and $max"; + return false; + } + } + break; + + case Database::VAR_BOOLEAN: + if (!is_bool($attribute['default'])) { + $this->message = "Default value for boolean attribute '" . $attribute['key'] . "' must be a boolean"; + return false; + } + break; + + case Database::VAR_DATETIME: + if (!is_string($attribute['default'])) { + $this->message = "Default value for datetime attribute '" . $attribute['key'] . "' must be a string in ISO 8601 format"; + return false; + } + // Basic datetime format validation + $datetimeValidator = new DatetimeValidator(); + if (!$datetimeValidator->isValid($attribute['default'])) { + $this->message = "Default value for datetime attribute '" . $attribute['key'] . "' must be in valid ISO 8601 format"; + return false; + } + break; + } + } + + // Validate enum elements if format is enum + if (isset($attribute['format']) && $attribute['format'] === APP_DATABASE_ATTRIBUTE_ENUM) { + if (!isset($attribute['elements']) || !is_array($attribute['elements']) || empty($attribute['elements'])) { + $this->message = "Attribute '" . $attribute['key'] . "' with enum format must have 'elements' array"; + return false; + } + + // Validate each enum element + foreach ($attribute['elements'] as $elementIndex => $element) { + if (!is_string($element) || empty($element)) { + $this->message = "Enum element at index $elementIndex for attribute '" . $attribute['key'] . "' must be a non-empty string"; + return false; + } + if (strlen($element) > Database::LENGTH_KEY) { + $this->message = "Enum element at index $elementIndex for attribute '" . $attribute['key'] . "' exceeds maximum length of " . Database::LENGTH_KEY . " characters"; + return false; + } + } + + // Validate default exists in elements + if (isset($attribute['default']) && $attribute['default'] !== null) { + if (!in_array($attribute['default'], $attribute['elements'], true)) { + $this->message = "Default value for enum attribute '" . $attribute['key'] . "' must be one of the provided elements"; + return false; + } + } + } + } + + return true; + } + + /** + * Is array + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return self::TYPE_ARRAY; + } +} diff --git a/src/Appwrite/Utopia/Database/Validator/Indexes.php b/src/Appwrite/Utopia/Database/Validator/Indexes.php new file mode 100644 index 0000000000..00603ab1df --- /dev/null +++ b/src/Appwrite/Utopia/Database/Validator/Indexes.php @@ -0,0 +1,200 @@ + Supported index types + */ + protected array $supportedTypes = [ + Database::INDEX_KEY, + Database::INDEX_FULLTEXT, + Database::INDEX_UNIQUE, + Database::INDEX_SPATIAL, + ]; + + /** + * @var array Supported orders + */ + protected array $supportedOrders = [ + Database::ORDER_ASC, + Database::ORDER_DESC, + ]; + + /** + * @param int $maxIndexes Maximum number of indexes allowed + */ + public function __construct( + protected int $maxIndexes = APP_LIMIT_ARRAY_PARAMS_SIZE, + ) { + } + + /** + * Get Description + * + * @return string + */ + public function getDescription(): string + { + return $this->message; + } + + /** + * Is valid + * + * @param mixed $value + * @return bool + */ + public function isValid($value): bool + { + if (!is_array($value)) { + $this->message = 'Indexes must be an array'; + return false; + } + + if (count($value) > $this->maxIndexes) { + $this->message = 'Maximum of ' . $this->maxIndexes . ' indexes allowed'; + return false; + } + + $keyValidator = new Key(); + $keys = []; + + foreach ($value as $i => $index) { + if (!is_array($index)) { + $this->message = "Index at position $i must be an object"; + return false; + } + + // Validate required fields + if (!isset($index['key']) || !is_string($index['key'])) { + $this->message = "Index at position $i is missing required field 'key'"; + return false; + } + + if (!isset($index['type']) || !is_string($index['type'])) { + $this->message = "Index at position $i is missing required field 'type'"; + return false; + } + + if (!isset($index['attributes']) || !is_array($index['attributes'])) { + $this->message = "Index at position $i is missing required field 'attributes' (must be an array)"; + return false; + } + + // Validate key format + if (!$keyValidator->isValid($index['key'])) { + $this->message = "Invalid key for index at position $i: " . $keyValidator->getDescription(); + return false; + } + + // Check for duplicate keys + if (in_array($index['key'], $keys)) { + $this->message = "Duplicate index key: " . $index['key']; + return false; + } + $keys[] = $index['key']; + + // Validate type + if (!in_array($index['type'], $this->supportedTypes)) { + $this->message = "Invalid type for index '" . $index['key'] . "': " . $index['type']; + return false; + } + + // Validate attributes array + if (empty($index['attributes'])) { + $this->message = "Index '" . $index['key'] . "' must have at least one attribute"; + return false; + } + + if (count($index['attributes']) > APP_LIMIT_ARRAY_PARAMS_SIZE) { + $this->message = "Index '" . $index['key'] . "' cannot have more than " . APP_LIMIT_ARRAY_PARAMS_SIZE . " attributes"; + return false; + } + + // Validate each attribute in the index + $systemAttrs = ['$id', '$createdAt', '$updatedAt']; + foreach ($index['attributes'] as $attrIndex => $attr) { + if (!is_string($attr)) { + $this->message = "Invalid attribute at position $attrIndex in index '" . $index['key'] . "': must be a string"; + return false; + } + if (!$keyValidator->isValid($attr) && !in_array($attr, $systemAttrs)) { + $this->message = "Invalid attribute name '$attr' in index '" . $index['key'] . "'"; + return false; + } + } + + $attrCount = count($index['attributes']); + + // Validate orders if provided + if (isset($index['orders'])) { + if (!is_array($index['orders'])) { + $this->message = "Index '" . $index['key'] . "' orders must be an array"; + return false; + } + + if (count($index['orders']) !== $attrCount) { + $this->message = "Index '" . $index['key'] . "': orders array length (" . count($index['orders']) . ") must match attributes array length ($attrCount)"; + return false; + } + + foreach ($index['orders'] as $order) { + if ($order !== null && $order !== '' && !in_array($order, $this->supportedOrders)) { + $this->message = "Invalid order '$order' in index '" . $index['key'] . "'. Must be 'ASC' or 'DESC'"; + return false; + } + } + } + + // Validate lengths if provided + if (isset($index['lengths'])) { + if (!is_array($index['lengths'])) { + $this->message = "Index '" . $index['key'] . "' lengths must be an array"; + return false; + } + + if (count($index['lengths']) !== $attrCount) { + $this->message = "Index '" . $index['key'] . "': lengths array length (" . count($index['lengths']) . ") must match attributes array length ($attrCount)"; + return false; + } + + foreach ($index['lengths'] as $length) { + if ($length !== null && (!is_int($length) || $length < 0)) { + $this->message = "Invalid length in index '" . $index['key'] . "': must be a non-negative integer or null"; + return false; + } + } + } + } + + return true; + } + + /** + * Is array + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return self::TYPE_ARRAY; + } +} diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Base.php b/src/Appwrite/Utopia/Database/Validator/Queries/Base.php index 02f2a57c5b..9d9bbde00b 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Base.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Base.php @@ -87,8 +87,6 @@ class Base extends Queries $allAttributes[] = $attribute; } - - $validators = [ new Limit(), new Offset(), diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 2dc5f727f7..80c7060b9a 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -135,6 +135,8 @@ use Appwrite\Utopia\Response\Model\UsageBuckets; use Appwrite\Utopia\Response\Model\UsageCollection; use Appwrite\Utopia\Response\Model\UsageDatabase; use Appwrite\Utopia\Response\Model\UsageDatabases; +use Appwrite\Utopia\Response\Model\UsageDocumentsDB; +use Appwrite\Utopia\Response\Model\UsageDocumentsDBs; use Appwrite\Utopia\Response\Model\UsageFunction; use Appwrite\Utopia\Response\Model\UsageFunctions; use Appwrite\Utopia\Response\Model\UsageProject; @@ -175,6 +177,8 @@ class Response extends SwooleResponse public const MODEL_BASE_LIST = 'baseList'; public const MODEL_USAGE_DATABASES = 'usageDatabases'; public const MODEL_USAGE_DATABASE = 'usageDatabase'; + public const MODEL_USAGE_DOCUMENTSDBS = 'usageDocumentsDBs'; + public const MODEL_USAGE_DOCUMENTSDB = 'usageDocumentsDB'; public const MODEL_USAGE_TABLE = 'usageTable'; public const MODEL_USAGE_COLLECTION = 'usageCollection'; public const MODEL_USAGE_USERS = 'usageUsers'; @@ -612,6 +616,8 @@ class Response extends SwooleResponse ->setModel(new MetricBreakdown()) ->setModel(new UsageDatabases()) ->setModel(new UsageDatabase()) + ->setModel(new UsageDocumentsDBs()) + ->setModel(new UsageDocumentsDB()) ->setModel(new UsageTable()) ->setModel(new UsageCollection()) ->setModel(new UsageUsers()) diff --git a/src/Appwrite/Utopia/Response/Model/Document.php b/src/Appwrite/Utopia/Response/Model/Document.php index 7906c1919b..31cc67f42f 100644 --- a/src/Appwrite/Utopia/Response/Model/Document.php +++ b/src/Appwrite/Utopia/Response/Model/Document.php @@ -83,8 +83,12 @@ class Document extends Any $document->removeAttribute('$collection'); $document->removeAttribute('$tenant'); - if (!$document->isEmpty() && is_numeric($document->getAttribute('$sequence', 0))) { - $document->setAttribute('$sequence', (int)$document->getAttribute('$sequence', 0)); + if (!$document->isEmpty()) { + $sequence = $document->getAttribute('$sequence', 0); + if (is_numeric($document->getAttribute('$sequence', 0))) { + $sequence = (int)$sequence; + } + $document->setAttribute('$sequence', $sequence); } foreach ($document->getAttributes() as $attribute) { diff --git a/src/Appwrite/Utopia/Response/Model/UsageDocumentsDB.php b/src/Appwrite/Utopia/Response/Model/UsageDocumentsDB.php new file mode 100644 index 0000000000..099a9887b8 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/UsageDocumentsDB.php @@ -0,0 +1,96 @@ +addRule('range', [ + 'type' => self::TYPE_STRING, + 'description' => 'Time range of the usage stats.', + 'default' => '', + 'example' => '30d', + ]) + ->addRule('collectionsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of collections.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('documentsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of documents.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('storageTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated storage used in bytes.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databaseReadsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of database reads.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databaseWritesTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of database writes.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('collections', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of collections per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documents', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of documents per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('storage', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated storage used in bytes per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('databaseReads', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of database reads.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('databaseWrites', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of database writes.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ; + } + + public function getName(): string + { + return 'UsageDocumentsDB'; + } + + public function getType(): string + { + return Response::MODEL_USAGE_DOCUMENTSDB; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/UsageDocumentsDBs.php b/src/Appwrite/Utopia/Response/Model/UsageDocumentsDBs.php new file mode 100644 index 0000000000..5ce229ce4a --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/UsageDocumentsDBs.php @@ -0,0 +1,109 @@ +addRule('range', [ + 'type' => self::TYPE_STRING, + 'description' => 'Time range of the usage stats.', + 'default' => '', + 'example' => '30d', + ]) + ->addRule('databasesTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of DocumentsDB databases.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('collectionsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of collections.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('documentsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of documents.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('storageTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of total databases storage in bytes.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databasesReadsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of databases reads.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databasesWritesTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of databases writes.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('databases', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of databases per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('collections', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of collections per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documents', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of documents per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('storage', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of the aggregated number of databases storage in bytes per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('databasesReads', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of database reads.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('databasesWrites', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of database writes.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ; + } + + public function getName(): string + { + return 'UsageDocumentsDBs'; + } + + public function getType(): string + { + return Response::MODEL_USAGE_DOCUMENTSDBS; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/UsageProject.php b/src/Appwrite/Utopia/Response/Model/UsageProject.php index fcb073cf61..02047265c7 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageProject.php +++ b/src/Appwrite/Utopia/Response/Model/UsageProject.php @@ -18,7 +18,13 @@ class UsageProject extends Model ]) ->addRule('documentsTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of documents.', + 'description' => 'Total aggregated number of documents in legacy/tablesdb.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('documentsdbDocumentsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of documents in documentsdb.', 'default' => 0, 'example' => 0, ]) @@ -34,12 +40,24 @@ class UsageProject extends Model 'default' => 0, 'example' => 0, ]) + ->addRule('documentsdbTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of documentsdb.', + 'default' => 0, + 'example' => 0, + ]) ->addRule('databasesStorageTotal', [ 'type' => self::TYPE_INTEGER, 'description' => 'Total aggregated sum of databases storage size (in bytes).', 'default' => 0, 'example' => 0, ]) + ->addRule('documentsdbDatabasesStorageTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated sum of documentsdb databases storage size (in bytes).', + 'default' => 0, + 'example' => 0, + ]) ->addRule('usersTotal', [ 'type' => self::TYPE_INTEGER, 'description' => 'Total aggregated number of users.', @@ -100,6 +118,18 @@ class UsageProject extends Model 'default' => 0, 'example' => 0, ]) + ->addRule('documentsdbDatabasesReadsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of documentsdb databases reads.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('documentsdbDatabasesWritesTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of documentsdb databases writes.', + 'default' => 0, + 'example' => 0, + ]) ->addRule('requests', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated number of requests per period.', @@ -203,6 +233,27 @@ class UsageProject extends Model 'example' => [], 'array' => true ]) + ->addRule('documentsdbDatabasesReads', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of documentsdb database reads.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsdbDatabasesWrites', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated number of documentsdb database writes.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ->addRule('documentsdbDatabasesStorage', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'An array of aggregated sum of documentsdb databases storage size (in bytes) per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ->addRule('imageTransformations', [ 'type' => Response::MODEL_METRIC, 'description' => 'An array of aggregated number of image transformations.', diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 6c9024c80f..ad5cb1414e 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -917,6 +917,7 @@ class UsageTest extends Scope { $documentsTotal = 0; $collectionsTotal = 0; + $documentsDbTotal = 0; $databasesTotal = $data['databasesTotal']; $requestsTotal = $data['requestsTotal']; @@ -940,7 +941,7 @@ class UsageTest extends Scope $this->assertNotEmpty($response['body']['$id']); $requestsTotal += 1; - $databasesTotal += 1; + $documentsDbTotal += 1; $documentsDbId = $response['body']['$id']; @@ -955,7 +956,7 @@ class UsageTest extends Scope $this->assertEmpty($response['body']); - $databasesTotal -= 1; + $documentsDbTotal -= 1; $requestsTotal += 1; } } @@ -1052,6 +1053,7 @@ class UsageTest extends Scope 'documentsDbCollectionId' => $collectionId, 'requestsTotal' => $requestsTotal, 'databasesTotal' => $databasesTotal, + 'documentsDbTotal' => $documentsDbTotal, 'documentsDbCollectionsTotal' => $collectionsTotal, 'documentsDbDocumentsTotal' => $documentsTotal, ]); @@ -1065,6 +1067,7 @@ class UsageTest extends Scope $collectionId = $data['documentsDbCollectionId']; $requestsTotal = $data['requestsTotal']; $databasesTotal = $data['databasesTotal']; + $documentsDbTotal = $data['documentsDbTotal']; $collectionsTotal = $data['documentsDbCollectionsTotal']; $documentsTotal = $data['documentsDbDocumentsTotal']; @@ -1086,7 +1089,9 @@ class UsageTest extends Scope $this->assertCount(1, $response['body']['network']); $this->assertEquals($requestsTotal, $response['body']['requests'][array_key_last($response['body']['requests'])]['value']); $this->validateDates($response['body']['requests']); - $this->assertEquals($databasesTotal, $response['body']['databasesTotal']); + // documentsdbTotal should reflect only documents DB instances, not relational databases. + $this->assertEquals($documentsDbTotal, $response['body']['documentsdbTotal']); + $this->assertEquals($documentsTotal, $response['body']['documentsdbDocumentsTotal']); $response = $this->client->call( Client::METHOD_GET, @@ -1097,26 +1102,30 @@ class UsageTest extends Scope $this->assertEquals($databasesTotal, $response['body']['databases'][array_key_last($response['body']['databases'])]['value']); $this->validateDates($response['body']['databases']); - $response = $this->client->call( - Client::METHOD_GET, - '/documentsdb/' . $documentsDbId . '/usage?range=30d', - $this->getConsoleHeaders() - ); + $this->assertEventually(function () use ($documentsDbId, $collectionsTotal, $documentsTotal) { + $response = $this->client->call( + Client::METHOD_GET, + '/documentsdb/' . $documentsDbId . '/usage?range=30d', + $this->getConsoleHeaders() + ); - $this->assertEquals($collectionsTotal, $response['body']['collections'][array_key_last($response['body']['collections'])]['value']); - $this->validateDates($response['body']['collections']); + $this->assertEquals($collectionsTotal, $response['body']['collections'][array_key_last($response['body']['collections'])]['value']); + $this->validateDates($response['body']['collections']); - $this->assertEquals($documentsTotal, $response['body']['documents'][array_key_last($response['body']['documents'])]['value']); - $this->validateDates($response['body']['documents']); + $this->assertEquals($documentsTotal, $response['body']['documents'][array_key_last($response['body']['documents'])]['value']); + $this->validateDates($response['body']['documents']); + }); - $response = $this->client->call( - Client::METHOD_GET, - '/documentsdb/' . $documentsDbId . '/collections/' . $collectionId . '/usage?range=30d', - $this->getConsoleHeaders() - ); + $this->assertEventually(function () use ($documentsDbId, $collectionId, $documentsTotal) { + $response = $this->client->call( + Client::METHOD_GET, + '/documentsdb/' . $documentsDbId . '/collections/' . $collectionId . '/usage?range=30d', + $this->getConsoleHeaders() + ); - $this->assertEquals($documentsTotal, $response['body']['documents'][array_key_last($response['body']['documents'])]['value']); - $this->validateDates($response['body']['documents']); + $this->assertEquals($documentsTotal, $response['body']['documents'][array_key_last($response['body']['documents'])]['value']); + $this->validateDates($response['body']['documents']); + }); return $data; } diff --git a/tests/e2e/Services/Databases/DocumentsDB/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/DocumentsDB/DatabasesConsoleClientTest.php index 0f6411e25b..13a1f3c962 100644 --- a/tests/e2e/Services/Databases/DocumentsDB/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/DocumentsDB/DatabasesConsoleClientTest.php @@ -224,7 +224,8 @@ class DatabasesConsoleClientTest extends Scope ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(15, count($response['body'])); + // not 15 fields due to no tables related fields in body + $this->assertEquals(11, count($response['body'])); $this->assertEquals('24h', $response['body']['range']); $this->assertIsNumeric($response['body']['documentsTotal']); $this->assertIsNumeric($response['body']['collectionsTotal']); diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 02867c7761..778c587217 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -1391,12 +1391,7 @@ trait DatabasesBase $this->assertEquals(400, $fulltextArray['headers']['status-code']); - // MongoDB only allows one fulltext index per collection, so it returns a different error - if ($this->isMongoDB()) { - $this->assertEquals('There is already a fulltext index in the collection', $fulltextArray['body']['message']); - } else { - $this->assertEquals('"Fulltext" index is forbidden on array attributes', $fulltextArray['body']['message']); - } + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $fulltextArray['body']['message']); $actorsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1408,7 +1403,8 @@ trait DatabasesBase 'attributes' => ['actors'], ]); - $this->assertEquals(202, $actorsArray['headers']['status-code']); + $this->assertEquals(400, $actorsArray['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $actorsArray['body']['message']); $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1421,7 +1417,8 @@ trait DatabasesBase 'orders' => ['DESC', 'DESC'], ]); - $this->assertEquals(202, $twoLevelsArray['headers']['status-code']); + $this->assertEquals(400, $twoLevelsArray['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $twoLevelsArray['body']['message']); $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1447,7 +1444,8 @@ trait DatabasesBase 'orders' => ['DESC'], // Check order is removed in API ]); - $this->assertEquals(202, $index1['headers']['status-code']); + $this->assertEquals(400, $index1['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $index1['body']['message']); $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1459,7 +1457,8 @@ trait DatabasesBase 'attributes' => ['integers2'], // array attribute ]); - $this->assertEquals(202, $index2['headers']['status-code']); + $this->assertEquals(400, $index2['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $index2['body']['message']); /** * Create Indexes by worker @@ -1473,7 +1472,7 @@ trait DatabasesBase ]), []); $this->assertIsArray($movies['body']['indexes']); - $this->assertCount(8, $movies['body']['indexes']); + $this->assertCount(4, $movies['body']['indexes']); $this->assertEquals($titleIndex['body']['key'], $movies['body']['indexes'][0]['key']); $this->assertEquals($releaseYearIndex['body']['key'], $movies['body']['indexes'][1]['key']); $this->assertEquals($releaseWithDate1['body']['key'], $movies['body']['indexes'][2]['key']); @@ -1550,14 +1549,8 @@ trait DatabasesBase 'lengths' => [120], ]); - $this->assertEquals(202, $create['headers']['status-code']); - - $index = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/collections/{$collectionId}/indexes/lengthOverrideTestIndex", [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]); - $this->assertEquals([Database::MAX_ARRAY_INDEX_LENGTH], $index['body']['lengths']); + $this->assertEquals(400, $create['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $create['body']['message']); // Test case for count of lengths greater than attributes (should throw 400) $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$collectionId}/indexes", [ diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index 0eab3af8ca..218aea5b4e 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -6816,4 +6816,1337 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); } + + public function testCreateCollectionWithAttributesAndIndexes(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Multi Create', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Create collection with attributes and indexes in one call + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('movies'), + 'name' => 'Movies', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'required' => true, + ], + [ + 'key' => 'year', + 'type' => Database::VAR_INTEGER, + 'required' => false, + 'default' => 2024, + ], + [ + 'key' => 'rating', + 'type' => Database::VAR_FLOAT, + 'required' => false, + ], + [ + 'key' => 'active', + 'type' => Database::VAR_BOOLEAN, + 'required' => false, + 'default' => true, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title'], + ], + [ + 'key' => 'idx_year', + 'type' => Database::INDEX_KEY, + 'attributes' => ['year'], + 'orders' => ['DESC'], + ], + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + $this->assertEquals('Movies', $collection['body']['name']); + $this->assertEquals('movies', $collection['body']['$id']); + + // Verify attributes were created and are available + $attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/movies/attributes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $attributes['headers']['status-code']); + $this->assertEquals(4, $attributes['body']['total']); + + $attrByKey = []; + foreach ($attributes['body']['attributes'] as $attr) { + $attrByKey[$attr['key']] = $attr; + } + + $this->assertEquals('available', $attrByKey['title']['status']); + $this->assertEquals(Database::VAR_STRING, $attrByKey['title']['type']); + $this->assertEquals(256, $attrByKey['title']['size']); + $this->assertTrue($attrByKey['title']['required']); + + $this->assertEquals('available', $attrByKey['year']['status']); + $this->assertEquals(Database::VAR_INTEGER, $attrByKey['year']['type']); + $this->assertFalse($attrByKey['year']['required']); + $this->assertEquals(2024, $attrByKey['year']['default']); + + $this->assertEquals('available', $attrByKey['rating']['status']); + $this->assertEquals(Database::VAR_FLOAT, $attrByKey['rating']['type']); + + $this->assertEquals('available', $attrByKey['active']['status']); + $this->assertEquals(Database::VAR_BOOLEAN, $attrByKey['active']['type']); + $this->assertTrue($attrByKey['active']['default']); + + // Verify indexes were created and are available + $indexes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/movies/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $indexes['headers']['status-code']); + $this->assertEquals(2, $indexes['body']['total']); + + $idxByKey = []; + foreach ($indexes['body']['indexes'] as $idx) { + $idxByKey[$idx['key']] = $idx; + } + + $this->assertEquals('available', $idxByKey['idx_title']['status']); + $this->assertEquals(Database::INDEX_KEY, $idxByKey['idx_title']['type']); + $this->assertEquals(['title'], $idxByKey['idx_title']['attributes']); + + $this->assertEquals('available', $idxByKey['idx_year']['status']); + $this->assertEquals(Database::INDEX_KEY, $idxByKey['idx_year']['type']); + $this->assertEquals(['year'], $idxByKey['idx_year']['attributes']); + $this->assertEquals(['DESC'], $idxByKey['idx_year']['orders']); + + // Verify we can create documents using the attributes + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/movies/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'The Matrix', + 'year' => 1999, + 'rating' => 8.7, + 'active' => true, + ], + ]); + + $this->assertEquals(201, $document['headers']['status-code']); + $this->assertEquals('The Matrix', $document['body']['title']); + $this->assertEquals(1999, $document['body']['year']); + $this->assertEquals(8.7, $document['body']['rating']); + $this->assertTrue($document['body']['active']); + + // Test: Create document with default values + $document2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/movies/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'New Movie', + ], + ]); + + $this->assertEquals(201, $document2['headers']['status-code']); + $this->assertEquals('New Movie', $document2['body']['title']); + $this->assertEquals(2024, $document2['body']['year']); // default value + $this->assertTrue($document2['body']['active']); // default value + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionWithAttributesAndIndexesErrors(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Multi Create Errors', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Invalid attribute type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Type', + 'attributes' => [ + [ + 'key' => 'test', + 'type' => 'invalid_type', + 'size' => 256, + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Index referencing non-existent attribute + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Index', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_invalid', + 'type' => Database::INDEX_KEY, + 'attributes' => ['nonexistent'], + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: String attribute without size (should fail - size is required for strings) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'No Size', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Required attribute with default value (should fail) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Required With Default', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'required' => true, + 'default' => 'test', + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Duplicate attribute keys + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Duplicate Keys', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 128, + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Index on system attribute ($id) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'System Attr Index', + 'attributes' => [], + 'indexes' => [ + [ + 'key' => 'idx_id', + 'type' => Database::INDEX_KEY, + 'attributes' => ['$id'], + ], + ], + ]); + + // Should succeed - system attributes can be indexed + $this->assertEquals(201, $collection['headers']['status-code']); + + // Test: Relationship attributes not supported inline (rejected as invalid type) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Relationship Test', + 'attributes' => [ + [ + 'key' => 'related', + 'type' => 'relationship', + 'relatedCollection' => 'some_collection', + 'relationType' => 'oneToOne', + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + $this->assertStringContainsString('Invalid type', $collection['body']['message']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionCleanupOnFailure(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Cleanup', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + $collectionId = ID::unique(); + + // Test: Create collection with invalid index referencing non-existent attribute (should fail) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => $collectionId, + 'name' => 'Should Fail', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_invalid', + 'type' => Database::INDEX_KEY, + 'attributes' => ['nonexistent'], + ], + ], + ]); + + $this->assertEquals(400, $collection['headers']['status-code']); + + // Verify collection was cleaned up - creating with same ID should succeed + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => $collectionId, + 'name' => 'Should Succeed', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionWithEnumAttribute(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Enum', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Create collection with enum attribute + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::custom('status_collection'), + 'name' => 'Status Collection', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + ], + 'attributes' => [ + [ + 'key' => 'status', + 'type' => Database::VAR_STRING, + 'size' => 32, + 'required' => true, + 'format' => 'enum', + 'elements' => ['pending', 'active', 'completed', 'cancelled'], + ], + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + // Verify attribute + $attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/status_collection/attributes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $attributes['headers']['status-code']); + $this->assertEquals(1, $attributes['body']['total']); + $this->assertEquals('available', $attributes['body']['attributes'][0]['status']); + $this->assertEquals('enum', $attributes['body']['attributes'][0]['format']); + $this->assertEquals(['pending', 'active', 'completed', 'cancelled'], $attributes['body']['attributes'][0]['elements']); + + // Test creating document with valid enum value + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/status_collection/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::unique(), + 'data' => [ + 'status' => 'active', + ], + ]); + + $this->assertEquals(201, $document['headers']['status-code']); + $this->assertEquals('active', $document['body']['status']); + + // Test creating document with invalid enum value + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/status_collection/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => ID::unique(), + 'data' => [ + 'status' => 'invalid_status', + ], + ]); + + $this->assertEquals(400, $document['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionAttributeValidationEdgeCases(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Attribute Edge Cases', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Reserved attribute key ($id) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Reserved Key Test', + 'attributes' => [ + [ + 'key' => '$id', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Reserved attribute key ($createdAt) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Reserved Key Test 2', + 'attributes' => [ + [ + 'key' => '$createdAt', + 'type' => Database::VAR_DATETIME, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Integer default value with wrong type (string instead of int) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Wrong Default Type', + 'attributes' => [ + [ + 'key' => 'count', + 'type' => Database::VAR_INTEGER, + 'default' => 'not_an_integer', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Boolean default value with wrong type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Wrong Boolean Default', + 'attributes' => [ + [ + 'key' => 'active', + 'type' => Database::VAR_BOOLEAN, + 'default' => 'yes', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: min > max for integer + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Min Greater Than Max', + 'attributes' => [ + [ + 'key' => 'score', + 'type' => Database::VAR_INTEGER, + 'min' => 100, + 'max' => 10, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Default value outside min/max range + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Default Out of Range', + 'attributes' => [ + [ + 'key' => 'score', + 'type' => Database::VAR_INTEGER, + 'min' => 0, + 'max' => 100, + 'default' => 150, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: String default exceeds size + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Default Exceeds Size', + 'attributes' => [ + [ + 'key' => 'name', + 'type' => Database::VAR_STRING, + 'size' => 5, + 'default' => 'This is way too long for size 5', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: 'signed' on non-numeric type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Signed On String', + 'attributes' => [ + [ + 'key' => 'name', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'signed' => true, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Array attribute with default value + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Array With Default', + 'attributes' => [ + [ + 'key' => 'tags', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'array' => true, + 'default' => ['tag1', 'tag2'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Format on non-string type (format is only allowed for strings) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Format On Integer', + 'attributes' => [ + [ + 'key' => 'count', + 'type' => Database::VAR_INTEGER, + 'format' => 'enum', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Valid integer with min/max range and default within range (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Valid Range', + 'attributes' => [ + [ + 'key' => 'score', + 'type' => Database::VAR_INTEGER, + 'min' => 0, + 'max' => 100, + 'default' => 50, + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionEnumValidationEdgeCases(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Enum Edge Cases', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Enum with empty elements array + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Empty Enum Elements', + 'attributes' => [ + [ + 'key' => 'status', + 'type' => Database::VAR_STRING, + 'size' => 32, + 'format' => 'enum', + 'elements' => [], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Enum with empty string element + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Empty String Element', + 'attributes' => [ + [ + 'key' => 'status', + 'type' => Database::VAR_STRING, + 'size' => 32, + 'format' => 'enum', + 'elements' => ['active', '', 'inactive'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Enum default not in elements + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Default Not In Elements', + 'attributes' => [ + [ + 'key' => 'status', + 'type' => Database::VAR_STRING, + 'size' => 32, + 'format' => 'enum', + 'elements' => ['active', 'inactive'], + 'default' => 'pending', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Enum with valid default in elements (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Valid Enum Default', + 'attributes' => [ + [ + 'key' => 'status', + 'type' => Database::VAR_STRING, + 'size' => 32, + 'format' => 'enum', + 'elements' => ['active', 'inactive', 'pending'], + 'default' => 'pending', + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionIndexValidationEdgeCases(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Index Edge Cases', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Duplicate index keys + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Duplicate Index Keys', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title'], + ], + [ + 'key' => 'idx_title', + 'type' => Database::INDEX_UNIQUE, + 'attributes' => ['title'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Invalid index type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Index Type', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'type' => 'invalid_type', + 'attributes' => ['title'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Empty attributes array in index + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Empty Index Attributes', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_empty', + 'type' => Database::INDEX_KEY, + 'attributes' => [], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Orders array length mismatch + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Orders Length Mismatch', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + [ + 'key' => 'year', + 'type' => Database::VAR_INTEGER, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_compound', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title', 'year'], + 'orders' => ['ASC'], // Only one order for two attributes + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Lengths array length mismatch + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Lengths Mismatch', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + [ + 'key' => 'description', + 'type' => Database::VAR_STRING, + 'size' => 1024, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_compound', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title', 'description'], + 'lengths' => [100], // Only one length for two attributes + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Invalid order value + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Order', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title'], + 'orders' => ['INVALID'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Valid compound index with proper orders/lengths (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Valid Compound Index', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + [ + 'key' => 'year', + 'type' => Database::VAR_INTEGER, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_compound', + 'type' => Database::INDEX_KEY, + 'attributes' => ['title', 'year'], + 'orders' => ['ASC', 'DESC'], + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionDatetimeValidation(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Datetime Validation', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Invalid datetime default (not ISO 8601) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Invalid Datetime Default', + 'attributes' => [ + [ + 'key' => 'publishedAt', + 'type' => Database::VAR_DATETIME, + 'default' => 'not-a-date', + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Valid datetime with ISO 8601 default (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Valid Datetime', + 'attributes' => [ + [ + 'key' => 'publishedAt', + 'type' => Database::VAR_DATETIME, + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionFloatValidation(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Float Validation', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Float with min > max + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Float Min Greater Max', + 'attributes' => [ + [ + 'key' => 'price', + 'type' => Database::VAR_FLOAT, + 'min' => 100.50, + 'max' => 10.25, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Float default outside range + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Float Default Out of Range', + 'attributes' => [ + [ + 'key' => 'price', + 'type' => Database::VAR_FLOAT, + 'min' => 0.0, + 'max' => 100.0, + 'default' => 150.50, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Valid float with range (should succeed) + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Valid Float Range', + 'attributes' => [ + [ + 'key' => 'price', + 'type' => Database::VAR_FLOAT, + 'min' => 0.0, + 'max' => 1000.0, + 'default' => 99.99, + ], + ], + ]); + $this->assertEquals(201, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testCreateCollectionMissingRequiredFields(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Missing Fields', + ]); + + $this->assertEquals(201, $database['headers']['status-code']); + $databaseId = $database['body']['$id']; + + // Test: Attribute without key + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Attribute Key', + 'attributes' => [ + [ + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Attribute without type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Attribute Type', + 'attributes' => [ + [ + 'key' => 'title', + 'size' => 256, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Index without key + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Index Key', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'type' => Database::INDEX_KEY, + 'attributes' => ['title'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Index without type + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Index Type', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'attributes' => ['title'], + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Test: Index without attributes + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Missing Index Attributes', + 'attributes' => [ + [ + 'key' => 'title', + 'type' => Database::VAR_STRING, + 'size' => 256, + ], + ], + 'indexes' => [ + [ + 'key' => 'idx_title', + 'type' => Database::INDEX_KEY, + ], + ], + ]); + $this->assertEquals(400, $collection['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } } diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index da11582158..2013e0a7a7 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -1366,7 +1366,7 @@ trait DatabasesBase if ($this->isMongoDB()) { $this->assertEquals('There is already a fulltext index in the collection', $fulltextArray['body']['message']); } else { - $this->assertEquals('"Fulltext" index is forbidden on array attributes', $fulltextArray['body']['message']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $fulltextArray['body']['message']); } $actorsArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ @@ -1379,7 +1379,8 @@ trait DatabasesBase 'columns' => ['actors'], ]); - $this->assertEquals(202, $actorsArray['headers']['status-code']); + $this->assertEquals(400, $actorsArray['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $actorsArray['body']['message']); $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1392,7 +1393,8 @@ trait DatabasesBase 'orders' => ['DESC', 'DESC'], ]); - $this->assertEquals(202, $twoLevelsArray['headers']['status-code']); + $this->assertEquals(400, $twoLevelsArray['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $twoLevelsArray['body']['message']); $unknown = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1418,7 +1420,8 @@ trait DatabasesBase 'orders' => ['DESC'], // Check order is removed in API ]); - $this->assertEquals(202, $index1['headers']['status-code']); + $this->assertEquals(400, $index1['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $index1['body']['message']); $index2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1430,7 +1433,8 @@ trait DatabasesBase 'columns' => ['integers2'], // array column ]); - $this->assertEquals(202, $index2['headers']['status-code']); + $this->assertEquals(400, $index2['headers']['status-code']); + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $index2['body']['message']); /** * Create Indexes by worker @@ -1444,7 +1448,7 @@ trait DatabasesBase ]), []); $this->assertIsArray($movies['body']['indexes']); - $this->assertCount(8, $movies['body']['indexes']); + $this->assertCount(4, $movies['body']['indexes']); $this->assertEquals($titleIndex['body']['key'], $movies['body']['indexes'][0]['key']); $this->assertEquals($releaseYearIndex['body']['key'], $movies['body']['indexes'][1]['key']); $this->assertEquals($releaseWithDate1['body']['key'], $movies['body']['indexes'][2]['key']); diff --git a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php index cc978a8e38..2f02fd92ba 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php @@ -422,7 +422,7 @@ class FunctionsCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'useCases' => ['starter', 'ai'], - 'runtimes' => ['bun-1.0', 'dart-2.16'] + 'runtimes' => ['node-22'] ]); $this->assertEquals(200, $templates['headers']['status-code']); $this->assertGreaterThanOrEqual(3, $templates['body']['total']); @@ -436,8 +436,7 @@ class FunctionsCustomClientTest extends Scope $this->assertThat( \array_column($template['runtimes'], 'name'), $this->logicalOr( - $this->containsEqual('bun-1.0'), - $this->containsEqual('dart-2.16'), + $this->containsEqual('node-22'), ), ); }