From ab5ef9776709448243c145ea7ce087be26110c52 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:39:11 +0100 Subject: [PATCH 01/66] fix: oauth trigger create user event --- app/controllers/api/account.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 737bd3e09d..4dd89dbde3 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1498,6 +1498,12 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') 'providerType' => MESSAGE_TYPE_EMAIL, 'identifier' => $email, ])); + + $queueForEvents + ->setEvent('users.[userId].create') + ->setParam('userId', $user->getId()) + ->trigger(); + } catch (Duplicate) { $failureRedirect(Exception::USER_ALREADY_EXISTS); } From 3ba7d7c7deda23e49ef6d4d7f5b8174c6b3bb710 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:48:39 +0100 Subject: [PATCH 02/66] fix: add payload --- app/controllers/api/account.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 4dd89dbde3..9222ef5546 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1502,6 +1502,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') $queueForEvents ->setEvent('users.[userId].create') ->setParam('userId', $user->getId()) + ->setPayload($response->output($user, Response::MODEL_ACCOUNT)) ->trigger(); } catch (Duplicate) { From eacb55cdcc4f07229242237cd6723a1897185638 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 29 Oct 2024 19:04:37 +1300 Subject: [PATCH 03/66] Fix validator usage for updating string size --- app/controllers/api/databases.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 942f886417..a5083e3dfe 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1951,7 +1951,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.') - ->param('size', null, new Integer(), 'Maximum size of the string attribute.', true) + ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Maximum size of the string attribute.', true) ->param('newKey', null, new Key(), 'New attribute key.', true) ->inject('response') ->inject('dbForProject') From 5afa8c6158131f7e799688cbe8a3fa2b1f2c0ffe Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:51:40 +0000 Subject: [PATCH 04/66] feat: usage db listener --- app/controllers/api/account.php | 7 ------- app/controllers/shared/api.php | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 10f44e94ea..92d9123840 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -441,7 +441,6 @@ App::get('/v1/account') App::delete('/v1/account') ->desc('Delete account') ->groups(['api', 'account']) - ->label('event', 'users.[userId].delete') ->label('scope', 'account') ->label('audits.event', 'user.delete') ->label('audits.resource', 'user/{response.$id}') @@ -1499,12 +1498,6 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') 'identifier' => $email, ])); - $queueForEvents - ->setEvent('users.[userId].create') - ->setParam('userId', $user->getId()) - ->setPayload($response->output($user, Response::MODEL_ACCOUNT)) - ->trigger(); - } catch (Duplicate) { $failureRedirect(Exception::USER_ALREADY_EXISTS); } diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 6d87940ff7..ceb3ee2f18 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -57,8 +57,17 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$databaseListener = function (string $event, Document $document, Document $project, Usage $queueForUsage, Database $dbForProject) { +$eventDatabaseListener = function (string $event, Document $document, EventDatabase $queueForEvents, Response $response) { + if ($document->getCollection() === 'users' && $event === Database::EVENT_DOCUMENT_CREATE) { + $queueForEvents + ->setEvent('users.[userId].create') + ->setParam('userId', $document->getId()) + ->setPayload($response->output($document, Response::MODEL_USER)) + ->trigger(); + } +}; +$usageDatabaseListener = function (string $event, Document $document, Usage $queueForUsage) { $value = 1; if ($event === Database::EVENT_DOCUMENT_DELETE) { $value = -1; @@ -357,7 +366,7 @@ App::init() ->inject('queueForUsage') ->inject('dbForProject') ->inject('mode') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Database $dbForProject, string $mode) use ($databaseListener) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Database $dbForProject, string $mode) use ($usageDatabaseListener, $eventDatabaseListener) { $route = $utopia->getRoute(); @@ -452,8 +461,9 @@ App::init() $queueForMessaging->setProject($project); $dbForProject - ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject)) - ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject)); + ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) + ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) + ->on(Database::EVENT_DOCUMENT_CREATE, 'trigger-events', fn ($event, $document) => $eventDatabaseListener($event, $document, $queueForEvents, $response)); $useCache = $route->getLabel('cache', false); if ($useCache) { From d16251d261dbf1ee271eeea042f85b9b741b842e Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:58:57 +0000 Subject: [PATCH 05/66] fix: remove old create user events --- app/controllers/api/account.php | 6 +--- app/controllers/api/users.php | 53 +++++++++++---------------------- 2 files changed, 18 insertions(+), 41 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 92d9123840..d32836d0ec 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -273,7 +273,6 @@ $createSession = function (string $userId, string $secret, Request $request, Res App::post('/v1/account') ->desc('Create account') ->groups(['api', 'account', 'auth']) - ->label('event', 'users.[userId].create') ->label('scope', 'sessions.write') ->label('auth.type', 'emailPassword') ->label('audits.event', 'user.create') @@ -296,9 +295,8 @@ App::post('/v1/account') ->inject('user') ->inject('project') ->inject('dbForProject') - ->inject('queueForEvents') ->inject('hooks') - ->action(function (string $userId, string $email, string $password, string $name, Request $request, Response $response, Document $user, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks) { + ->action(function (string $userId, string $email, string $password, string $name, Request $request, Response $response, Document $user, Document $project, Database $dbForProject, Hooks $hooks) { $email = \strtolower($email); if ('console' === $project->getId()) { @@ -408,8 +406,6 @@ App::post('/v1/account') Authorization::setRole(Role::user($user->getId())->toString()); Authorization::setRole(Role::users()->toString()); - $queueForEvents->setParam('userId', $user->getId()); - $response ->setStatusCode(Response::STATUS_CODE_CREATED) ->dynamic($user, Response::MODEL_ACCOUNT); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 571df4fdb2..42d0875720 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -50,7 +50,7 @@ use Utopia\Validator\Text; use Utopia\Validator\WhiteList; /** TODO: Remove function when we move to using utopia/platform */ -function createUser(string $hash, mixed $hashOptions, string $userId, ?string $email, ?string $password, ?string $phone, string $name, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks): Document +function createUser(string $hash, mixed $hashOptions, string $userId, ?string $email, ?string $password, ?string $phone, string $name, Document $project, Database $dbForProject, Hooks $hooks): Document { $plaintextPassword = $password; $hashOptionsObject = (\is_string($hashOptions)) ? \json_decode($hashOptions, true) : $hashOptions; // Cast to JSON array @@ -175,15 +175,12 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e throw new Exception(Exception::USER_ALREADY_EXISTS); } - $queueForEvents->setParam('userId', $user->getId()); - return $user; } App::post('/v1/users') ->desc('Create user') ->groups(['api', 'users']) - ->label('event', 'users.[userId].create') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') @@ -202,10 +199,9 @@ App::post('/v1/users') ->inject('response') ->inject('project') ->inject('dbForProject') - ->inject('queueForEvents') ->inject('hooks') - ->action(function (string $userId, ?string $email, ?string $phone, ?string $password, string $name, Response $response, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks) { - $user = createUser('plaintext', '{}', $userId, $email, $password, $phone, $name, $project, $dbForProject, $queueForEvents, $hooks); + ->action(function (string $userId, ?string $email, ?string $phone, ?string $password, string $name, Response $response, Document $project, Database $dbForProject, Hooks $hooks) { + $user = createUser('plaintext', '{}', $userId, $email, $password, $phone, $name, $project, $dbForProject, $hooks); $response ->setStatusCode(Response::STATUS_CODE_CREATED) ->dynamic($user, Response::MODEL_USER); @@ -214,7 +210,6 @@ App::post('/v1/users') App::post('/v1/users/bcrypt') ->desc('Create user with bcrypt password') ->groups(['api', 'users']) - ->label('event', 'users.[userId].create') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') @@ -232,10 +227,9 @@ App::post('/v1/users/bcrypt') ->inject('response') ->inject('project') ->inject('dbForProject') - ->inject('queueForEvents') ->inject('hooks') - ->action(function (string $userId, string $email, string $password, string $name, Response $response, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks) { - $user = createUser('bcrypt', '{}', $userId, $email, $password, null, $name, $project, $dbForProject, $queueForEvents, $hooks); + ->action(function (string $userId, string $email, string $password, string $name, Response $response, Document $project, Database $dbForProject, Hooks $hooks) { + $user = createUser('bcrypt', '{}', $userId, $email, $password, null, $name, $project, $dbForProject, $hooks); $response ->setStatusCode(Response::STATUS_CODE_CREATED) @@ -245,7 +239,6 @@ App::post('/v1/users/bcrypt') App::post('/v1/users/md5') ->desc('Create user with MD5 password') ->groups(['api', 'users']) - ->label('event', 'users.[userId].create') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') @@ -263,10 +256,9 @@ App::post('/v1/users/md5') ->inject('response') ->inject('project') ->inject('dbForProject') - ->inject('queueForEvents') ->inject('hooks') - ->action(function (string $userId, string $email, string $password, string $name, Response $response, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks) { - $user = createUser('md5', '{}', $userId, $email, $password, null, $name, $project, $dbForProject, $queueForEvents, $hooks); + ->action(function (string $userId, string $email, string $password, string $name, Response $response, Document $project, Database $dbForProject, Hooks $hooks) { + $user = createUser('md5', '{}', $userId, $email, $password, null, $name, $project, $dbForProject, $hooks); $response ->setStatusCode(Response::STATUS_CODE_CREATED) @@ -276,7 +268,6 @@ App::post('/v1/users/md5') App::post('/v1/users/argon2') ->desc('Create user with Argon2 password') ->groups(['api', 'users']) - ->label('event', 'users.[userId].create') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') @@ -294,10 +285,9 @@ App::post('/v1/users/argon2') ->inject('response') ->inject('project') ->inject('dbForProject') - ->inject('queueForEvents') ->inject('hooks') - ->action(function (string $userId, string $email, string $password, string $name, Response $response, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks) { - $user = createUser('argon2', '{}', $userId, $email, $password, null, $name, $project, $dbForProject, $queueForEvents, $hooks); + ->action(function (string $userId, string $email, string $password, string $name, Response $response, Document $project, Database $dbForProject, Hooks $hooks) { + $user = createUser('argon2', '{}', $userId, $email, $password, null, $name, $project, $dbForProject, $hooks); $response ->setStatusCode(Response::STATUS_CODE_CREATED) @@ -307,7 +297,6 @@ App::post('/v1/users/argon2') App::post('/v1/users/sha') ->desc('Create user with SHA password') ->groups(['api', 'users']) - ->label('event', 'users.[userId].create') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') @@ -326,16 +315,15 @@ App::post('/v1/users/sha') ->inject('response') ->inject('project') ->inject('dbForProject') - ->inject('queueForEvents') ->inject('hooks') - ->action(function (string $userId, string $email, string $password, string $passwordVersion, string $name, Response $response, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks) { + ->action(function (string $userId, string $email, string $password, string $passwordVersion, string $name, Response $response, Document $project, Database $dbForProject, Hooks $hooks) { $options = '{}'; if (!empty($passwordVersion)) { $options = '{"version":"' . $passwordVersion . '"}'; } - $user = createUser('sha', $options, $userId, $email, $password, null, $name, $project, $dbForProject, $queueForEvents, $hooks); + $user = createUser('sha', $options, $userId, $email, $password, null, $name, $project, $dbForProject, $hooks); $response ->setStatusCode(Response::STATUS_CODE_CREATED) @@ -345,7 +333,6 @@ App::post('/v1/users/sha') App::post('/v1/users/phpass') ->desc('Create user with PHPass password') ->groups(['api', 'users']) - ->label('event', 'users.[userId].create') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') @@ -363,10 +350,9 @@ App::post('/v1/users/phpass') ->inject('response') ->inject('project') ->inject('dbForProject') - ->inject('queueForEvents') ->inject('hooks') - ->action(function (string $userId, string $email, string $password, string $name, Response $response, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks) { - $user = createUser('phpass', '{}', $userId, $email, $password, null, $name, $project, $dbForProject, $queueForEvents, $hooks); + ->action(function (string $userId, string $email, string $password, string $name, Response $response, Document $project, Database $dbForProject, Hooks $hooks) { + $user = createUser('phpass', '{}', $userId, $email, $password, null, $name, $project, $dbForProject, $hooks); $response ->setStatusCode(Response::STATUS_CODE_CREATED) @@ -376,7 +362,6 @@ App::post('/v1/users/phpass') App::post('/v1/users/scrypt') ->desc('Create user with Scrypt password') ->groups(['api', 'users']) - ->label('event', 'users.[userId].create') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') @@ -399,9 +384,8 @@ App::post('/v1/users/scrypt') ->inject('response') ->inject('project') ->inject('dbForProject') - ->inject('queueForEvents') ->inject('hooks') - ->action(function (string $userId, string $email, string $password, string $passwordSalt, int $passwordCpu, int $passwordMemory, int $passwordParallel, int $passwordLength, string $name, Response $response, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks) { + ->action(function (string $userId, string $email, string $password, string $passwordSalt, int $passwordCpu, int $passwordMemory, int $passwordParallel, int $passwordLength, string $name, Response $response, Document $project, Database $dbForProject, Hooks $hooks) { $options = [ 'salt' => $passwordSalt, 'costCpu' => $passwordCpu, @@ -410,7 +394,7 @@ App::post('/v1/users/scrypt') 'length' => $passwordLength ]; - $user = createUser('scrypt', \json_encode($options), $userId, $email, $password, null, $name, $project, $dbForProject, $queueForEvents, $hooks); + $user = createUser('scrypt', \json_encode($options), $userId, $email, $password, null, $name, $project, $dbForProject, $hooks); $response ->setStatusCode(Response::STATUS_CODE_CREATED) @@ -420,7 +404,6 @@ App::post('/v1/users/scrypt') App::post('/v1/users/scrypt-modified') ->desc('Create user with Scrypt modified password') ->groups(['api', 'users']) - ->label('event', 'users.[userId].create') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') @@ -440,11 +423,9 @@ App::post('/v1/users/scrypt-modified') ->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true) ->inject('response') ->inject('project') - ->inject('dbForProject') - ->inject('queueForEvents') ->inject('hooks') - ->action(function (string $userId, string $email, string $password, string $passwordSalt, string $passwordSaltSeparator, string $passwordSignerKey, string $name, Response $response, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks) { - $user = createUser('scryptMod', '{"signerKey":"' . $passwordSignerKey . '","saltSeparator":"' . $passwordSaltSeparator . '","salt":"' . $passwordSalt . '"}', $userId, $email, $password, null, $name, $project, $dbForProject, $queueForEvents, $hooks); + ->action(function (string $userId, string $email, string $password, string $passwordSalt, string $passwordSaltSeparator, string $passwordSignerKey, string $name, Response $response, Document $project, Database $dbForProject, Hooks $hooks) { + $user = createUser('scryptMod', '{"signerKey":"' . $passwordSignerKey . '","saltSeparator":"' . $passwordSaltSeparator . '","salt":"' . $passwordSalt . '"}', $userId, $email, $password, null, $name, $project, $dbForProject, $hooks); $response ->setStatusCode(Response::STATUS_CODE_CREATED) From 3020c0beea46700cc3d280ab73eb6805f8c5cd0c Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:01:29 +0000 Subject: [PATCH 06/66] fix: missing dep --- app/controllers/api/users.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 42d0875720..3beb1526b0 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -423,6 +423,7 @@ App::post('/v1/users/scrypt-modified') ->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true) ->inject('response') ->inject('project') + ->inject('dbForProject') ->inject('hooks') ->action(function (string $userId, string $email, string $password, string $passwordSalt, string $passwordSaltSeparator, string $passwordSignerKey, string $name, Response $response, Document $project, Database $dbForProject, Hooks $hooks) { $user = createUser('scryptMod', '{"signerKey":"' . $passwordSignerKey . '","saltSeparator":"' . $passwordSaltSeparator . '","salt":"' . $passwordSalt . '"}', $userId, $email, $password, null, $name, $project, $dbForProject, $hooks); From 13d1376e282fb592ad4f598d5bb42b288825e01b Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:20:52 +0000 Subject: [PATCH 07/66] fix: type --- app/controllers/shared/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index ceb3ee2f18..a0151ed9ed 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -57,7 +57,7 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$eventDatabaseListener = function (string $event, Document $document, EventDatabase $queueForEvents, Response $response) { +$eventDatabaseListener = function (string $event, Document $document, Event $queueForEvents, Response $response) { if ($document->getCollection() === 'users' && $event === Database::EVENT_DOCUMENT_CREATE) { $queueForEvents ->setEvent('users.[userId].create') From 9d4fd4170158dbd16715f489a48f12220d6c2f51 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:56:41 +0000 Subject: [PATCH 08/66] fix: webhook test --- tests/e2e/Services/Webhooks/WebhooksBase.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index 6be3e16c1f..2ef41003ee 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -901,6 +901,17 @@ trait WebhooksBase $teamId = $data['teamId'] ?? ''; $email = uniqid() . 'friend@localhost.test'; + // Create user to ensure team event is triggered after user event + $user = $this->client->call(Client::METHOD_POST, '/account', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'userId' => ID::unique(), + 'email' => $email, + 'password' => 'password', + 'name' => 'Friend User', + ]); + /** * Test for SUCCESS */ @@ -909,7 +920,6 @@ trait WebhooksBase 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'email' => $email, - 'name' => 'Friend User', 'roles' => ['admin', 'editor'], 'url' => 'http://localhost:5000/join-us#title' ]); From 26c53bcf9cda31f1c2385b49c2c9d4d5011a1b92 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:01:12 +0000 Subject: [PATCH 09/66] feat: clone queue --- app/controllers/shared/api.php | 2 +- src/Appwrite/Event/Event.php | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index c5f0f3ac85..c65f6356a3 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -468,7 +468,7 @@ App::init() $dbForProject ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) - ->on(Database::EVENT_DOCUMENT_CREATE, 'trigger-events', fn ($event, $document) => $eventDatabaseListener($event, $document, $queueForEvents, $response)); + ->on(Database::EVENT_DOCUMENT_CREATE, 'trigger-events', fn ($event, $document) => $eventDatabaseListener($event, $document, clone $queueForEvents, $response)); $useCache = $route->getLabel('cache', false); if ($useCache) { diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index 43eda511df..8e5325545c 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -319,6 +319,10 @@ class Event return false; } + if (empty($this->event)) { + return false; + } + $client = new Client($this->queue, $this->connection); return $client->enqueue([ @@ -546,4 +550,36 @@ class Event return $this; } + + /** + * Clone event. + */ + public function __clone() + { + if ($this->project instanceof Document) { + $this->project = clone $this->project; + } + + if ($this->user instanceof Document) { + $this->user = clone $this->user; + } + + foreach ($this->context as $key => $value) { + if ($value instanceof Document) { + $this->context[$key] = clone $value; + } + } + + foreach ($this->params as $key => $value) { + if (is_object($value)) { + $this->params[$key] = clone $value; + } + } + + foreach ($this->payload as $key => $value) { + if (is_object($value)) { + $this->payload[$key] = clone $value; + } + } + } } From 2736f6009a651e63d90795f9de85019d70efe91a Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:18:37 +0000 Subject: [PATCH 10/66] feat: dirty solution --- app/controllers/shared/api.php | 59 ++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index c65f6356a3..e9a404de48 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -57,7 +57,7 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$eventDatabaseListener = function (string $event, Document $document, Event $queueForEvents, Response $response) { +$eventDatabaseListener = function (string $event, Document $document, Event $queueForEvents, Response $response, Func $queueForFunctions, Document $project) { if ($document->getCollection() === 'users' && $event === Database::EVENT_DOCUMENT_CREATE) { $queueForEvents ->setEvent('users.[userId].create') @@ -65,6 +65,58 @@ $eventDatabaseListener = function (string $event, Document $document, Event $que ->setPayload($response->output($document, Response::MODEL_USER)) ->trigger(); } + + // FIXME: This is a temporary solution, this should be moved to the shutdown hook + /** + * Trigger functions. + */ + if (!$queueForEvents->isPaused()) { + $queueForFunctions + ->from($queueForEvents) + ->trigger(); + } + + /** + * Trigger webhooks. + */ + $queueForEvents + ->setClass(Event::WEBHOOK_CLASS_NAME) + ->setQueue(Event::WEBHOOK_QUEUE_NAME) + ->trigger(); + + /** + * Trigger realtime. + */ + if ($project->getId() !== 'console') { + $allEvents = Event::generateEvents($queueForEvents->getEvent(), $queueForEvents->getParams()); + $payload = new Document($queueForEvents->getPayload()); + + $db = $queueForEvents->getContext('database'); + $collection = $queueForEvents->getContext('collection'); + $bucket = $queueForEvents->getContext('bucket'); + + $target = Realtime::fromPayload( + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $payload, + project: $project, + database: $db, + collection: $collection, + bucket: $bucket, + ); + + Realtime::send( + projectId: $target['projectId'] ?? $project->getId(), + payload: $queueForEvents->getRealtimePayload(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'], + options: [ + 'permissionsChanged' => $target['permissionsChanged'], + 'userId' => $queueForEvents->getParam('userId') + ] + ); + } }; $usageDatabaseListener = function (string $event, Document $document, Usage $queueForUsage) { @@ -369,9 +421,10 @@ App::init() ->inject('queueForDatabase') ->inject('queueForBuilds') ->inject('queueForUsage') + ->inject('queueForFunctions') ->inject('dbForProject') ->inject('mode') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Database $dbForProject, string $mode) use ($usageDatabaseListener, $eventDatabaseListener) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Func $queueForFunctions, Database $dbForProject, string $mode) use ($usageDatabaseListener, $eventDatabaseListener) { $route = $utopia->getRoute(); @@ -468,7 +521,7 @@ App::init() $dbForProject ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) - ->on(Database::EVENT_DOCUMENT_CREATE, 'trigger-events', fn ($event, $document) => $eventDatabaseListener($event, $document, clone $queueForEvents, $response)); + ->on(Database::EVENT_DOCUMENT_CREATE, 'trigger-events', fn ($event, $document) => $eventDatabaseListener($event, $document, clone $queueForEvents, $response, $queueForFunctions, $project)); $useCache = $route->getLabel('cache', false); if ($useCache) { From 51ae3a6475c090715f724d090e309792971f5a42 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:31:14 +0000 Subject: [PATCH 11/66] fix: tests --- app/controllers/shared/api.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index e9a404de48..ea2d03ccf2 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -58,6 +58,9 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar }; $eventDatabaseListener = function (string $event, Document $document, Event $queueForEvents, Response $response, Func $queueForFunctions, Document $project) { + // Set event empty to avoid triggering events by default + $queueForEvents->setEvent(''); + if ($document->getCollection() === 'users' && $event === Database::EVENT_DOCUMENT_CREATE) { $queueForEvents ->setEvent('users.[userId].create') From c9b2d6eb902aa6146a168a1bc97fdbf6472c7bb3 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:38:56 +0000 Subject: [PATCH 12/66] feat: teamHideSensitiveFields --- app/controllers/api/projects.php | 32 ++++++++++ app/controllers/api/teams.php | 38 ++++++------ .../Utopia/Response/Model/Project.php | 7 +++ tests/e2e/Services/Teams/TeamsBaseClient.php | 61 +++++++++++++++++++ 4 files changed, 121 insertions(+), 17 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 5705e7576b..2efee6543e 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -111,6 +111,7 @@ App::post('/v1/projects') 'personalDataCheck' => false, 'mockNumbers' => [], 'sessionAlerts' => false, + 'teamHideSensitiveFields' => false, ]; foreach ($auth as $method) { @@ -648,6 +649,37 @@ App::patch('/v1/projects/:projectId/auth/session-alerts') $response->dynamic($project, Response::MODEL_PROJECT); }); +App::patch('/v1/projects/:projectId/auth/session-alerts') + ->desc('Update project team hide sensitive fields') + ->groups(['api', 'projects']) + ->label('scope', 'projects.write') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'projects') + ->label('sdk.method', 'updateTeamHideSensitiveFields') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_PROJECT) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->param('teamHideSensitiveFields', false, new Boolean(true), 'Set to true to hide sensitive fields from team members.') + ->inject('response') + ->inject('dbForConsole') + ->action(function (string $projectId, bool $alerts, Response $response, Database $dbForConsole) { + + $project = $dbForConsole->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + $auths = $project->getAttribute('auths', []); + $auths['teamShowSensitiveFields'] = $alerts; + + $dbForConsole->updateDocument('projects', $project->getId(), $project + ->setAttribute('auths', $auths)); + + $response->dynamic($project, Response::MODEL_PROJECT); + }); + App::patch('/v1/projects/:projectId/auth/limit') ->desc('Update project users limit') ->groups(['api', 'projects']) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 0b97be0e55..776a2b0046 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -727,8 +727,9 @@ App::get('/v1/teams/:teamId/memberships') ->param('queries', [], new Memberships(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Memberships::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') + ->inject('project') ->inject('dbForProject') - ->action(function (string $teamId, array $queries, string $search, Response $response, Database $dbForProject) { + ->action(function (string $teamId, array $queries, string $search, Response $response, Document $project, Database $dbForProject) { $team = $dbForProject->getDocument('teams', $teamId); @@ -790,27 +791,30 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn (Document $membership) => !empty($membership->getAttribute('userId'))); - $memberships = array_map(function ($membership) use ($dbForProject, $team) { + $hideSensitiveFields = $project->getAttribute('auths', [])['teamHideSensitiveFields'] ?? false; + + $memberships = array_map(function ($membership) use ($dbForProject, $team, $hideSensitiveFields) { $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); + $membership->setAttribute('teamName', $team->getAttribute('name')); - $mfa = $user->getAttribute('mfa', false); - if ($mfa) { - $totp = TOTP::getAuthenticatorFromUser($user); - $totpEnabled = $totp && $totp->getAttribute('verified', false); - $emailEnabled = $user->getAttribute('email', false) && $user->getAttribute('emailVerification', false); - $phoneEnabled = $user->getAttribute('phone', false) && $user->getAttribute('phoneVerification', false); + if (!$hideSensitiveFields) { + $mfa = $user->getAttribute('mfa', false); + if ($mfa) { + $totp = TOTP::getAuthenticatorFromUser($user); + $totpEnabled = $totp && $totp->getAttribute('verified', false); + $emailEnabled = $user->getAttribute('email', false) && $user->getAttribute('emailVerification', false); + $phoneEnabled = $user->getAttribute('phone', false) && $user->getAttribute('phoneVerification', false); - if (!$totpEnabled && !$emailEnabled && !$phoneEnabled) { - $mfa = false; + if (!$totpEnabled && !$emailEnabled && !$phoneEnabled) { + $mfa = false; + } } - } - $membership - ->setAttribute('mfa', $mfa) - ->setAttribute('teamName', $team->getAttribute('name')) - ->setAttribute('userName', $user->getAttribute('name')) - ->setAttribute('userEmail', $user->getAttribute('email')) - ; + $membership + ->setAttribute('mfa', $mfa) + ->setAttribute('userName', $user->getAttribute('name')) + ->setAttribute('userEmail', $user->getAttribute('email')); + } return $membership; }, $memberships); diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index e1d0105587..98a6ef52b7 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -151,6 +151,12 @@ class Project extends Model 'default' => false, 'example' => true, ]) + ->addRule('teamHideSensitiveFields', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Whether or not to hide sensitive data in the teams API.', + 'default' => false, + 'example' => true, + ]) ->addRule('oAuthProviders', [ 'type' => Response::MODEL_AUTH_PROVIDER, 'description' => 'List of Auth Providers.', @@ -348,6 +354,7 @@ class Project extends Model $document->setAttribute('authPersonalDataCheck', $authValues['personalDataCheck'] ?? false); $document->setAttribute('authMockNumbers', $authValues['mockNumbers'] ?? []); $document->setAttribute('authSessionAlerts', $authValues['sessionAlerts'] ?? false); + $document->setAttribute('authTeamHideSensitiveFields', $authValues['teamHideSensitiveFields'] ?? false); foreach ($auth as $index => $method) { $key = $method['key']; diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 8a1fed028e..5993acb639 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -130,6 +130,67 @@ trait TeamsBaseClient $this->assertEmpty($response['body']['memberships']); $this->assertEquals(0, $response['body']['total']); + /** + * Update project settings to hide sensitive fields + */ + $projectId = $this->getProject()['$id']; + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/session-alerts', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + 'x-appwrite-key' => $this->getRoot()['secret'], + ]), [ + 'teamHideSensitiveFields' => true, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + /** + * Test that sensitive fields are hidden + */ + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertIsInt($response['body']['total']); + $this->assertNotEmpty($response['body']['memberships'][0]['$id']); + + // Assert that sensitive fields are not present + $this->assertArrayNotHasKey('userName', $response['body']['memberships'][0]); + $this->assertArrayNotHasKey('userEmail', $response['body']['memberships'][0]); + $this->assertArrayNotHasKey('mfa', $response['body']['memberships'][0]); + + /** + * Update project settings to show sensitive fields + */ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/session-alerts', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + 'x-appwrite-key' => $this->getRoot()['secret'], + ]), [ + 'teamHideSensitiveFields' => false, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + /** + * Test that sensitive fields are shown + */ + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertIsInt($response['body']['total']); + $this->assertNotEmpty($response['body']['memberships'][0]['$id']); + + // Assert that sensitive fields are present + $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); + $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); + $this->assertFalse($response['body']['memberships'][0]['mfa']); + /** * Test for FAILURE */ From f5e2f4acfa203824a455c155f6ebefb07583299c Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 1 Nov 2024 12:53:54 +0000 Subject: [PATCH 13/66] fix: endpoint name --- app/controllers/api/projects.php | 2 +- tests/e2e/Services/Teams/TeamsBaseClient.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 2efee6543e..53b102507f 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -649,7 +649,7 @@ App::patch('/v1/projects/:projectId/auth/session-alerts') $response->dynamic($project, Response::MODEL_PROJECT); }); -App::patch('/v1/projects/:projectId/auth/session-alerts') +App::patch('/v1/projects/:projectId/auth/teams-hide-sensitive-fields') ->desc('Update project team hide sensitive fields') ->groups(['api', 'projects']) ->label('scope', 'projects.write') diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 5993acb639..8bb9be2a21 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -134,7 +134,7 @@ trait TeamsBaseClient * Update project settings to hide sensitive fields */ $projectId = $this->getProject()['$id']; - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/session-alerts', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-hide-sensitive-fields', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', 'x-appwrite-key' => $this->getRoot()['secret'], @@ -164,7 +164,7 @@ trait TeamsBaseClient /** * Update project settings to show sensitive fields */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/session-alerts', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-hide-sensitive-fields', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', 'x-appwrite-key' => $this->getRoot()['secret'], From 37d60e1039788a960f8f263a37f0843487ba6623 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:28:13 +0000 Subject: [PATCH 14/66] fix: var name --- app/controllers/api/projects.php | 12 ++++++------ app/controllers/api/teams.php | 6 +++--- src/Appwrite/Utopia/Response/Model/Project.php | 4 ++-- tests/e2e/Services/Teams/TeamsBaseClient.php | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 53b102507f..1dd4e51c1e 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -111,7 +111,7 @@ App::post('/v1/projects') 'personalDataCheck' => false, 'mockNumbers' => [], 'sessionAlerts' => false, - 'teamHideSensitiveFields' => false, + 'teamsShowSensitiveFields' => false, ]; foreach ($auth as $method) { @@ -650,20 +650,20 @@ App::patch('/v1/projects/:projectId/auth/session-alerts') }); App::patch('/v1/projects/:projectId/auth/teams-hide-sensitive-fields') - ->desc('Update project team hide sensitive fields') + ->desc('Update project team show sensitive fields') ->groups(['api', 'projects']) ->label('scope', 'projects.write') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateTeamHideSensitiveFields') + ->label('sdk.method', 'updateTeamsShowSensitiveFields') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_PROJECT) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('teamHideSensitiveFields', false, new Boolean(true), 'Set to true to hide sensitive fields from team members.') + ->param('teamsShowSensitiveFields', false, new Boolean(true), 'Set to true to hide sensitive fields from team members.') ->inject('response') ->inject('dbForConsole') - ->action(function (string $projectId, bool $alerts, Response $response, Database $dbForConsole) { + ->action(function (string $projectId, bool $teamsShowSensitiveFields, Response $response, Database $dbForConsole) { $project = $dbForConsole->getDocument('projects', $projectId); @@ -672,7 +672,7 @@ App::patch('/v1/projects/:projectId/auth/teams-hide-sensitive-fields') } $auths = $project->getAttribute('auths', []); - $auths['teamShowSensitiveFields'] = $alerts; + $auths['teamsShowSensitiveFields'] = $teamsShowSensitiveFields; $dbForConsole->updateDocument('projects', $project->getId(), $project ->setAttribute('auths', $auths)); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 776a2b0046..2dbb4fb75e 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -791,13 +791,13 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn (Document $membership) => !empty($membership->getAttribute('userId'))); - $hideSensitiveFields = $project->getAttribute('auths', [])['teamHideSensitiveFields'] ?? false; + $showSensitiveFields = $project->getAttribute('auths', [])['teamsShowSensitiveFields'] ?? false; - $memberships = array_map(function ($membership) use ($dbForProject, $team, $hideSensitiveFields) { + $memberships = array_map(function ($membership) use ($dbForProject, $team, $showSensitiveFields) { $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); $membership->setAttribute('teamName', $team->getAttribute('name')); - if (!$hideSensitiveFields) { + if ($showSensitiveFields) { $mfa = $user->getAttribute('mfa', false); if ($mfa) { $totp = TOTP::getAuthenticatorFromUser($user); diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index 98a6ef52b7..23a334c222 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -151,7 +151,7 @@ class Project extends Model 'default' => false, 'example' => true, ]) - ->addRule('teamHideSensitiveFields', [ + ->addRule('teamsShowSensitiveFields', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Whether or not to hide sensitive data in the teams API.', 'default' => false, @@ -354,7 +354,7 @@ class Project extends Model $document->setAttribute('authPersonalDataCheck', $authValues['personalDataCheck'] ?? false); $document->setAttribute('authMockNumbers', $authValues['mockNumbers'] ?? []); $document->setAttribute('authSessionAlerts', $authValues['sessionAlerts'] ?? false); - $document->setAttribute('authTeamHideSensitiveFields', $authValues['teamHideSensitiveFields'] ?? false); + $document->setAttribute('authTeamsShowSensitiveFields', $authValues['teamsShowSensitiveFields'] ?? false); foreach ($auth as $index => $method) { $key = $method['key']; diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 8bb9be2a21..4452293b1d 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -139,7 +139,7 @@ trait TeamsBaseClient 'x-appwrite-project' => 'console', 'x-appwrite-key' => $this->getRoot()['secret'], ]), [ - 'teamHideSensitiveFields' => true, + 'teamsShowSensitiveFields' => true, ]); $this->assertEquals(200, $response['headers']['status-code']); @@ -169,7 +169,7 @@ trait TeamsBaseClient 'x-appwrite-project' => 'console', 'x-appwrite-key' => $this->getRoot()['secret'], ]), [ - 'teamHideSensitiveFields' => false, + 'teamsShowSensitiveFields' => false, ]); $this->assertEquals(200, $response['headers']['status-code']); From 4c14375d89507afc46f3055b94f9652f6e286961 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:31:33 +0000 Subject: [PATCH 15/66] fix: tests --- app/controllers/api/projects.php | 4 ++-- app/controllers/api/teams.php | 2 +- tests/e2e/Services/Teams/TeamsBaseClient.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 1dd4e51c1e..e3dc80e0ff 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -111,7 +111,7 @@ App::post('/v1/projects') 'personalDataCheck' => false, 'mockNumbers' => [], 'sessionAlerts' => false, - 'teamsShowSensitiveFields' => false, + 'teamsShowSensitiveFields' => true, ]; foreach ($auth as $method) { @@ -660,7 +660,7 @@ App::patch('/v1/projects/:projectId/auth/teams-hide-sensitive-fields') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_PROJECT) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('teamsShowSensitiveFields', false, new Boolean(true), 'Set to true to hide sensitive fields from team members.') + ->param('teamsShowSensitiveFields', true, new Boolean(true), 'Set to true to hide sensitive fields from team members.') ->inject('response') ->inject('dbForConsole') ->action(function (string $projectId, bool $teamsShowSensitiveFields, Response $response, Database $dbForConsole) { diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 2dbb4fb75e..b1ffe40c9f 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -791,7 +791,7 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn (Document $membership) => !empty($membership->getAttribute('userId'))); - $showSensitiveFields = $project->getAttribute('auths', [])['teamsShowSensitiveFields'] ?? false; + $showSensitiveFields = $project->getAttribute('auths', [])['teamsShowSensitiveFields'] ?? true; $memberships = array_map(function ($membership) use ($dbForProject, $team, $showSensitiveFields) { $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 4452293b1d..924812b4e5 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -139,7 +139,7 @@ trait TeamsBaseClient 'x-appwrite-project' => 'console', 'x-appwrite-key' => $this->getRoot()['secret'], ]), [ - 'teamsShowSensitiveFields' => true, + 'teamsShowSensitiveFields' => false, ]); $this->assertEquals(200, $response['headers']['status-code']); @@ -169,7 +169,7 @@ trait TeamsBaseClient 'x-appwrite-project' => 'console', 'x-appwrite-key' => $this->getRoot()['secret'], ]), [ - 'teamsShowSensitiveFields' => false, + 'teamsShowSensitiveFields' => true, ]); $this->assertEquals(200, $response['headers']['status-code']); From e87ed0e13a3df31ddec1703811309898dad34e87 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:24:29 +0000 Subject: [PATCH 16/66] chore: refactor use `from` over clonse --- app/controllers/shared/api.php | 46 ++++++++++++++++++---------------- src/Appwrite/Event/Event.php | 40 ++++++++++------------------- src/Appwrite/Event/Func.php | 18 ------------- 3 files changed, 37 insertions(+), 67 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index ea2d03ccf2..392fc85cf5 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -28,6 +28,7 @@ use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; +use Utopia\Queue\Connection; use Utopia\System\System; use Utopia\Validator\WhiteList; @@ -57,31 +58,28 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$eventDatabaseListener = function (string $event, Document $document, Event $queueForEvents, Response $response, Func $queueForFunctions, Document $project) { - // Set event empty to avoid triggering events by default - $queueForEvents->setEvent(''); - - if ($document->getCollection() === 'users' && $event === Database::EVENT_DOCUMENT_CREATE) { - $queueForEvents - ->setEvent('users.[userId].create') - ->setParam('userId', $document->getId()) - ->setPayload($response->output($document, Response::MODEL_USER)) - ->trigger(); +$eventDatabaseListener = function (Document $document, Event $queueForEvents, Response $response, Func $queueForFunctions, Document $project) { + switch ($document->getCollection()) { + case 'users': + $queueForEvents + ->setEvent('users.[userId].update') + ->setParam('userId', $document->getId()) + ->setPayload($response->output($document, Response::MODEL_USER)) + ->trigger(); + break; } // FIXME: This is a temporary solution, this should be moved to the shutdown hook - /** - * Trigger functions. - */ - if (!$queueForEvents->isPaused()) { - $queueForFunctions - ->from($queueForEvents) - ->trigger(); + if (empty($queueForEvents->getEvent())) { + return; } - /** - * Trigger webhooks. - */ + // Trigger functions + $queueForFunctions + ->from($queueForEvents) + ->trigger(); + + // Trigger webhooks $queueForEvents ->setClass(Event::WEBHOOK_CLASS_NAME) ->setQueue(Event::WEBHOOK_QUEUE_NAME) @@ -417,6 +415,7 @@ App::init() ->inject('response') ->inject('project') ->inject('user') + ->inject('queue') ->inject('queueForEvents') ->inject('queueForMessaging') ->inject('queueForAudits') @@ -427,7 +426,7 @@ App::init() ->inject('queueForFunctions') ->inject('dbForProject') ->inject('mode') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Func $queueForFunctions, Database $dbForProject, string $mode) use ($usageDatabaseListener, $eventDatabaseListener) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Connection $queue, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Func $queueForFunctions, Database $dbForProject, string $mode) use ($usageDatabaseListener, $eventDatabaseListener) { $route = $utopia->getRoute(); @@ -521,10 +520,13 @@ App::init() $queueForBuilds->setProject($project); $queueForMessaging->setProject($project); + $queueForEventsClone = new Event($queue); + $queueForEventsClone->from($queueForEvents); + $dbForProject ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) - ->on(Database::EVENT_DOCUMENT_CREATE, 'trigger-events', fn ($event, $document) => $eventDatabaseListener($event, $document, clone $queueForEvents, $response, $queueForFunctions, $project)); + ->on(Database::EVENT_DOCUMENT_CREATE, 'trigger-events', fn ($event, $document) => $eventDatabaseListener($document, clone $queueForEvents, $response, $queueForFunctions, $project)); $useCache = $route->getLabel('cache', false); if ($useCache) { diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index 8e5325545c..14cb1ef4b7 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -552,34 +552,20 @@ class Event } /** - * Clone event. + * Generate a function event from a base event + * + * @param Event $event + * + * @return self + * */ - public function __clone() + public function from(Event $event): self { - if ($this->project instanceof Document) { - $this->project = clone $this->project; - } - - if ($this->user instanceof Document) { - $this->user = clone $this->user; - } - - foreach ($this->context as $key => $value) { - if ($value instanceof Document) { - $this->context[$key] = clone $value; - } - } - - foreach ($this->params as $key => $value) { - if (is_object($value)) { - $this->params[$key] = clone $value; - } - } - - foreach ($this->payload as $key => $value) { - if (is_object($value)) { - $this->payload[$key] = clone $value; - } - } + $this->project = $event->getProject(); + $this->user = $event->getUser(); + $this->payload = $event->getPayload(); + $this->event = $event->getEvent(); + $this->params = $event->getParams(); + return $this; } } diff --git a/src/Appwrite/Event/Func.php b/src/Appwrite/Event/Func.php index 4dad5802f7..0ad639a9f5 100644 --- a/src/Appwrite/Event/Func.php +++ b/src/Appwrite/Event/Func.php @@ -238,22 +238,4 @@ class Func extends Event 'method' => $this->method, ]); } - - /** - * Generate a function event from a base event - * - * @param Event $event - * - * @return self - * - */ - public function from(Event $event): self - { - $this->project = $event->getProject(); - $this->user = $event->getUser(); - $this->payload = $event->getPayload(); - $this->event = $event->getEvent(); - $this->params = $event->getParams(); - return $this; - } } From ff95532ccb7369fc182af8f26c35dcb62906d498 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:29:34 +0000 Subject: [PATCH 17/66] chore: refactor --- app/controllers/shared/api.php | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 392fc85cf5..043c346587 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -59,21 +59,15 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar }; $eventDatabaseListener = function (Document $document, Event $queueForEvents, Response $response, Func $queueForFunctions, Document $project) { - switch ($document->getCollection()) { - case 'users': - $queueForEvents - ->setEvent('users.[userId].update') - ->setParam('userId', $document->getId()) - ->setPayload($response->output($document, Response::MODEL_USER)) - ->trigger(); - break; - } - - // FIXME: This is a temporary solution, this should be moved to the shutdown hook - if (empty($queueForEvents->getEvent())) { + if (!$document->getCollection() === 'users') { return; } + $queueForEvents + ->setEvent('users.[userId].update') + ->setParam('userId', $document->getId()) + ->setPayload($response->output($document, Response::MODEL_USER)); + // Trigger functions $queueForFunctions ->from($queueForEvents) @@ -85,9 +79,7 @@ $eventDatabaseListener = function (Document $document, Event $queueForEvents, Re ->setQueue(Event::WEBHOOK_QUEUE_NAME) ->trigger(); - /** - * Trigger realtime. - */ + // Trigger realtime if ($project->getId() !== 'console') { $allEvents = Event::generateEvents($queueForEvents->getEvent(), $queueForEvents->getParams()); $payload = new Document($queueForEvents->getPayload()); From ca5d9ce96a5b4906b2ec583af7c2b8ffb8bab533 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 4 Nov 2024 15:09:16 +1300 Subject: [PATCH 18/66] Update database --- composer.json | 2 +- composer.lock | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index 04a6af2415..2fc43f7cd0 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/cache": "0.10.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.53.9", + "utopia-php/database": "0.53.10", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index 314ec397f5..aab67e93eb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1529d4abfe0432b2d9c838705220ed4a", + "content-hash": "f77f899f6250f080406151dc4cb29f92", "packages": [ { "name": "adhocore/jwt", @@ -1724,16 +1724,16 @@ }, { "name": "utopia-php/database", - "version": "0.53.9", + "version": "0.53.10", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "19969d2c6d29b5d1cbf4cb1a33e18017a54f30e3" + "reference": "39550cb0e32cac45bf5ea1deb96569b837c028b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/19969d2c6d29b5d1cbf4cb1a33e18017a54f30e3", - "reference": "19969d2c6d29b5d1cbf4cb1a33e18017a54f30e3", + "url": "https://api.github.com/repos/utopia-php/database/zipball/39550cb0e32cac45bf5ea1deb96569b837c028b1", + "reference": "39550cb0e32cac45bf5ea1deb96569b837c028b1", "shasum": "" }, "require": { @@ -1774,9 +1774,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.53.9" + "source": "https://github.com/utopia-php/database/tree/0.53.10" }, - "time": "2024-10-31T08:18:52+00:00" + "time": "2024-11-04T02:02:23+00:00" }, { "name": "utopia-php/domains", @@ -4068,23 +4068,23 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.8.2", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "153ae662783729388a584b4361f2545e4d841e3c" + "reference": "1fb5ba8d045f5dd984ebded5b1cc66f29459422d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", - "reference": "153ae662783729388a584b4361f2545e4d841e3c", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/1fb5ba8d045f5dd984ebded5b1cc66f29459422d", + "reference": "1fb5ba8d045f5dd984ebded5b1cc66f29459422d", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", "php": "^7.3 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.13" + "phpstan/phpdoc-parser": "^1.18" }, "require-dev": { "ext-tokenizer": "*", @@ -4120,9 +4120,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.9.0" }, - "time": "2024-02-23T11:10:43+00:00" + "time": "2024-11-03T20:11:34+00:00" }, { "name": "phpspec/prophecy", @@ -7005,7 +7005,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From c59cd97eb86617857938790410d933aeb9ee8f31 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 4 Nov 2024 20:57:08 +1300 Subject: [PATCH 19/66] Not found exception --- app/controllers/api/databases.php | 163 ++++++++++++++---------------- app/controllers/general.php | 2 + composer.json | 2 +- composer.lock | 24 ++--- 4 files changed, 89 insertions(+), 102 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 5b2c2080cb..13cc4e5ed7 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -3,7 +3,6 @@ use Appwrite\Auth\Auth; use Appwrite\Detector\Detector; use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Delete; use Appwrite\Event\Event; use Appwrite\Event\Usage; use Appwrite\Extend\Exception; @@ -26,6 +25,7 @@ use Utopia\Database\Exception\Authorization as AuthorizationException; use Utopia\Database\Exception\Conflict as ConflictException; use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\Limit as LimitException; +use Utopia\Database\Exception\NotFound as NotFoundException; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Exception\Restricted as RestrictedException; use Utopia\Database\Exception\Structure as StructureException; @@ -352,13 +352,16 @@ function updateAttribute( if ($type === Database::VAR_RELATIONSHIP) { $primaryDocumentOptions = \array_merge($attribute->getAttribute('options', []), $options); $attribute->setAttribute('options', $primaryDocumentOptions); - - $dbForProject->updateRelationship( - collection: $collectionId, - id: $key, - newKey: $newKey, - onDelete: $primaryDocumentOptions['onDelete'], - ); + try { + $dbForProject->updateRelationship( + collection: $collectionId, + id: $key, + newKey: $newKey, + onDelete: $primaryDocumentOptions['onDelete'], + ); + } catch (NotFoundException) { + throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + } if ($primaryDocumentOptions['twoWay']) { $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryDocumentOptions['relatedCollection']); @@ -388,6 +391,8 @@ function updateAttribute( ); } catch (TruncateException) { throw new Exception(Exception::ATTRIBUTE_INVALID_RESIZE); + } catch (NotFoundException) { + throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); } } @@ -530,12 +535,7 @@ App::get('/v1/databases') ->inject('response') ->inject('dbForProject') ->action(function (array $queries, string $search, Response $response, Database $dbForProject) { - - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } + $queries = Query::parseQueries($queries); if (!empty($search)) { $queries[] = Query::search('search', $search); @@ -849,7 +849,7 @@ App::post('/v1/databases/:databaseId/collections') }); App::get('/v1/databases/:databaseId/collections') - ->alias('/v1/database/collections', ['databaseId' => 'default']) + ->alias('/v1/database/collections') ->desc('List collections') ->groups(['api', 'database']) ->label('scope', 'collections.read') @@ -875,11 +875,7 @@ App::get('/v1/databases/:databaseId/collections') throw new Exception(Exception::DATABASE_NOT_FOUND); } - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } + $queries = Query::parseQueries($queries); if (!empty($search)) { $queries[] = Query::search('search', $search); @@ -919,7 +915,7 @@ App::get('/v1/databases/:databaseId/collections') }); App::get('/v1/databases/:databaseId/collections/:collectionId') - ->alias('/v1/database/collections/:collectionId', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId') ->desc('Get collection') ->groups(['api', 'database']) ->label('scope', 'collections.read') @@ -954,7 +950,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId') }); App::get('/v1/databases/:databaseId/collections/:collectionId/logs') - ->alias('/v1/database/collections/:collectionId/logs', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/logs') ->desc('List collection logs') ->groups(['api', 'database']) ->label('scope', 'collections.read') @@ -988,12 +984,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') throw new Exception(Exception::COLLECTION_NOT_FOUND); } - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } - + $queries = Query::parseQueries($queries); $grouped = Query::groupByType($queries); $limit = $grouped['limit'] ?? APP_LIMIT_COUNT; $offset = $grouped['offset'] ?? 0; @@ -1055,7 +1046,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') App::put('/v1/databases/:databaseId/collections/:collectionId') - ->alias('/v1/database/collections/:collectionId', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId') ->desc('Update collection') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -1106,7 +1097,8 @@ App::put('/v1/databases/:databaseId/collections/:collectionId') ->setAttribute('$permissions', $permissions) ->setAttribute('documentSecurity', $documentSecurity) ->setAttribute('enabled', $enabled) - ->setAttribute('search', implode(' ', [$collectionId, $name]))); + ->setAttribute('search', \implode(' ', [$collectionId, $name])) + ); $dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $permissions, $documentSecurity); @@ -1119,7 +1111,7 @@ App::put('/v1/databases/:databaseId/collections/:collectionId') }); App::delete('/v1/databases/:databaseId/collections/:collectionId') - ->alias('/v1/database/collections/:collectionId', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId') ->desc('Delete collection') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -1175,7 +1167,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId') }); App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string') - ->alias('/v1/database/collections/:collectionId/attributes/string', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/string') ->desc('Create string attribute') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') @@ -1226,14 +1218,13 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string 'filters' => $filters, ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) ->dynamic($attribute, Response::MODEL_ATTRIBUTE_STRING); }); App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email') - ->alias('/v1/database/collections/:collectionId/attributes/email', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/email') ->desc('Create email attribute') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') @@ -1276,7 +1267,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email' }); App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') - ->alias('/v1/database/collections/:collectionId/attributes/enum', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/enum') ->desc('Create enum attribute') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') @@ -1324,7 +1315,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') }); App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') - ->alias('/v1/database/collections/:collectionId/attributes/ip', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/ip') ->desc('Create IP address attribute') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') @@ -1367,7 +1358,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') }); App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url') - ->alias('/v1/database/collections/:collectionId/attributes/url', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/url') ->desc('Create URL attribute') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') @@ -1410,7 +1401,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url') }); App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/integer') - ->alias('/v1/database/collections/:collectionId/attributes/integer', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/integer') ->desc('Create integer attribute') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') @@ -1440,8 +1431,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { // Ensure attribute default is within range - $min = (is_null($min)) ? PHP_INT_MIN : \intval($min); - $max = (is_null($max)) ? PHP_INT_MAX : \intval($max); + $min = \is_null($min) ? PHP_INT_MIN : $min; + $max = \is_null($max) ? PHP_INT_MAX : $max; if ($min > $max) { throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); @@ -1482,7 +1473,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege }); App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float') - ->alias('/v1/database/collections/:collectionId/attributes/float', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/float') ->desc('Create float attribute') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') @@ -1512,21 +1503,16 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float' ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { // Ensure attribute default is within range - $min = (is_null($min)) ? -PHP_FLOAT_MAX : \floatval($min); - $max = (is_null($max)) ? PHP_FLOAT_MAX : \floatval($max); + $min = \is_null($min) ? -PHP_FLOAT_MAX : $min; + $max = \is_null($max) ? PHP_FLOAT_MAX : $max; if ($min > $max) { throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); } - // Ensure default value is a float - if (!is_null($default)) { - $default = \floatval($default); - } - $validator = new Range($min, $max, Database::VAR_FLOAT); - if (!is_null($default) && !$validator->isValid($default)) { + if (!\is_null($default) && !$validator->isValid($default)) { throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); } @@ -1557,7 +1543,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float' }); App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean') - ->alias('/v1/database/collections/:collectionId/attributes/boolean', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/boolean') ->desc('Create boolean attribute') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') @@ -1599,7 +1585,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolea }); App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/datetime') - ->alias('/v1/database/collections/:collectionId/attributes/datetime', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/datetime') ->desc('Create datetime attribute') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') @@ -1644,7 +1630,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti }); App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relationship') - ->alias('/v1/database/collections/:collectionId/attributes/relationship', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/relationship') ->desc('Create relationship attribute') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') @@ -1773,7 +1759,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati }); App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') - ->alias('/v1/database/collections/:collectionId/attributes', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes') ->desc('List attributes') ->groups(['api', 'database']) ->label('scope', 'collections.read') @@ -1804,16 +1790,12 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') throw new Exception(Exception::COLLECTION_NOT_FOUND); } - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } + $queries = Query::parseQueries($queries); \array_push( $queries, + Query::equal('databaseInternalId', [$database->getInternalId()]), Query::equal('collectionInternalId', [$collection->getInternalId()]), - Query::equal('databaseInternalId', [$database->getInternalId()]) ); /** @@ -1822,6 +1804,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') $cursor = \array_filter($queries, function ($query) { return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); }); + $cursor = \reset($cursor); if ($cursor) { @@ -1832,8 +1815,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') $attributeId = $cursor->getValue(); $cursorDocument = Authorization::skip(fn () => $dbForProject->find('attributes', [ - Query::equal('collectionInternalId', [$collection->getInternalId()]), Query::equal('databaseInternalId', [$database->getInternalId()]), + Query::equal('collectionInternalId', [$collection->getInternalId()]), Query::equal('key', [$attributeId]), Query::limit(1), ])); @@ -1857,7 +1840,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') }); App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') - ->alias('/v1/database/collections/:collectionId/attributes/:key', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/:key') ->desc('Get attribute') ->groups(['api', 'database']) ->label('scope', 'collections.read') @@ -2390,7 +2373,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/ }); App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') - ->alias('/v1/database/collections/:collectionId/attributes/:key', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/attributes/:key') ->desc('Delete attribute') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -2504,7 +2487,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key }); App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') - ->alias('/v1/database/collections/:collectionId/indexes', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/indexes') ->desc('Create index') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].create') @@ -2675,7 +2658,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') }); App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') - ->alias('/v1/database/collections/:collectionId/indexes', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/indexes') ->desc('List indexes') ->groups(['api', 'database']) ->label('scope', 'collections.read') @@ -2706,13 +2689,13 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') throw new Exception(Exception::COLLECTION_NOT_FOUND); } - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } + $queries = Query::parseQueries($queries); - \array_push($queries, Query::equal('collectionId', [$collectionId]), Query::equal('databaseId', [$databaseId])); + \array_push( + $queries, + Query::equal('databaseId', [$databaseId]), + Query::equal('collectionId', [$collectionId]), + ); /** * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries @@ -3042,10 +3025,12 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') try { $document = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $document); - } catch (StructureException $exception) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $exception->getMessage()); - } catch (DuplicateException $exception) { + } catch (StructureException $e) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); + } catch (DuplicateException $e) { throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); + } catch (NotFoundException $e) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); } // Add $collectionId and $databaseId for all documents @@ -3176,14 +3161,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') $cursor->setValue($cursorDocument); } - try { - $documents = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries); - $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, APP_LIMIT_COUNT); - } catch (AuthorizationException) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } + $documents = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries); + $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, APP_LIMIT_COUNT); // Add $collectionId and $databaseId for all documents $processDocument = (function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database): bool { @@ -3647,8 +3626,10 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum throw new Exception(Exception::USER_UNAUTHORIZED); } catch (DuplicateException) { throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); - } catch (StructureException $exception) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $exception->getMessage()); + } catch (StructureException $e) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); + } catch (NotFoundException $e) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); } // Add $collectionId and $databaseId for all documents @@ -3757,12 +3738,16 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu throw new Exception(Exception::DOCUMENT_NOT_FOUND); } - $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $documentId) { - $dbForProject->deleteDocument( - 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), - $documentId - ); - }); + try { + $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $documentId) { + $dbForProject->deleteDocument( + 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + $documentId + ); + }); + } catch (NotFoundException $e) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } // Add $collectionId and $databaseId for all documents $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { diff --git a/app/controllers/general.php b/app/controllers/general.php index 7763566159..b08ecb3d12 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -775,6 +775,8 @@ App::error() case 'Utopia\Database\Exception\Relationship': $error = new AppwriteException(AppwriteException::RELATIONSHIP_VALUE_INVALID, $error->getMessage(), previous: $error); break; + case 'Utopia\Database\Exception\NotFound': + $error = new AppwriteException(AppwriteException::COLLECTION_NOT_FOUND, $error->getMessage(), previous: $error); } $code = $error->getCode(); diff --git a/composer.json b/composer.json index 2fc43f7cd0..f122149ec2 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/cache": "0.10.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.53.10", + "utopia-php/database": "0.53.12", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index aab67e93eb..0650710611 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f77f899f6250f080406151dc4cb29f92", + "content-hash": "102bab0efa76adc92312b9c5a7f488e3", "packages": [ { "name": "adhocore/jwt", @@ -1724,32 +1724,32 @@ }, { "name": "utopia-php/database", - "version": "0.53.10", + "version": "0.53.12", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "39550cb0e32cac45bf5ea1deb96569b837c028b1" + "reference": "4068d0c5c503ec4562f8c0aa9cfd095889418b83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/39550cb0e32cac45bf5ea1deb96569b837c028b1", - "reference": "39550cb0e32cac45bf5ea1deb96569b837c028b1", + "url": "https://api.github.com/repos/utopia-php/database/zipball/4068d0c5c503ec4562f8c0aa9cfd095889418b83", + "reference": "4068d0c5c503ec4562f8c0aa9cfd095889418b83", "shasum": "" }, "require": { "ext-mbstring": "*", "ext-pdo": "*", - "php": ">=8.0", + "php": ">=8.3", "utopia-php/cache": "0.10.*", "utopia-php/framework": "0.33.*", "utopia-php/mongo": "0.3.*" }, "require-dev": { "fakerphp/faker": "1.23.*", - "laravel/pint": "1.17.*", - "pcov/clobber": "2.0.*", - "phpstan/phpstan": "1.11.*", - "phpunit/phpunit": "9.6.*", + "laravel/pint": "1.*", + "pcov/clobber": "2.*", + "phpstan/phpstan": "1.*", + "phpunit/phpunit": "9.*", "rregeer/phpunit-coverage-check": "0.3.*", "swoole/ide-helper": "5.1.3", "utopia-php/cli": "0.14.*" @@ -1774,9 +1774,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.53.10" + "source": "https://github.com/utopia-php/database/tree/0.53.12" }, - "time": "2024-11-04T02:02:23+00:00" + "time": "2024-11-04T07:51:44+00:00" }, { "name": "utopia-php/domains", From b6287e11a35db76bc1da59ef25c48c969f873375 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 4 Nov 2024 21:40:02 +1300 Subject: [PATCH 20/66] Add storage catches --- app/controllers/api/databases.php | 5 +- app/controllers/api/storage.php | 89 ++++++++++++++++++------------- 2 files changed, 55 insertions(+), 39 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 13cc4e5ed7..7c10662946 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1092,7 +1092,10 @@ App::put('/v1/databases/:databaseId/collections/:collectionId') $enabled ??= $collection->getAttribute('enabled', true); - $collection = $dbForProject->updateDocument('database_' . $database->getInternalId(), $collectionId, $collection + $collection = $dbForProject->updateDocument( + 'database_' . $database->getInternalId(), + $collectionId, + $collection ->setAttribute('name', $name) ->setAttribute('$permissions', $permissions) ->setAttribute('documentSecurity', $documentSecurity) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 23dd21c173..6b8248f101 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -16,7 +16,8 @@ use Utopia\App; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\Document; -use Utopia\Database\Exception\Duplicate; +use Utopia\Database\Exception\Duplicate as DuplicateException; +use Utopia\Database\Exception\NotFound as NotFoundException; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; @@ -131,7 +132,7 @@ App::post('/v1/storage/buckets') $bucket = $dbForProject->getDocument('buckets', $bucketId); $dbForProject->createCollection('bucket_' . $bucket->getInternalId(), $attributes, $indexes, permissions: $permissions ?? [], documentSecurity: $fileSecurity); - } catch (Duplicate) { + } catch (DuplicateException) { throw new Exception(Exception::STORAGE_BUCKET_ALREADY_EXISTS); } @@ -273,10 +274,6 @@ App::put('/v1/storage/buckets/:bucketId') $encryption ??= $bucket->getAttribute('encryption', true); $antivirus ??= $bucket->getAttribute('antivirus', true); - /** - * Map aggregate permissions into the multiple permissions they represent, - * accounting for the resource type given that some types not allowed specific permissions. - */ // Map aggregate permissions into the multiple permissions they represent. $permissions = Permission::aggregate($permissions); @@ -290,11 +287,11 @@ App::put('/v1/storage/buckets/:bucketId') ->setAttribute('encryption', $encryption) ->setAttribute('compression', $compression) ->setAttribute('antivirus', $antivirus)); + $dbForProject->updateCollection('bucket_' . $bucket->getInternalId(), $permissions, $fileSecurity); $queueForEvents - ->setParam('bucketId', $bucket->getId()) - ; + ->setParam('bucketId', $bucket->getId()); $response->dynamic($bucket, Response::MODEL_BUCKET); }); @@ -342,7 +339,7 @@ App::delete('/v1/storage/buckets/:bucketId') }); App::post('/v1/storage/buckets/:bucketId/files') - ->alias('/v1/storage/files', ['bucketId' => 'default']) + ->alias('/v1/storage/files') ->desc('Create file') ->groups(['api', 'storage']) ->label('scope', 'files.write') @@ -670,7 +667,11 @@ App::post('/v1/storage/buckets/:bucketId/files') 'metadata' => $metadata, ]); - $file = $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc); + try { + $file = $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc); + } catch (NotFoundException) { + throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); + } } else { $file = $file ->setAttribute('chunksUploaded', $chunksUploaded) @@ -686,15 +687,19 @@ App::post('/v1/storage/buckets/:bucketId/files') if (!$validator->isValid($bucket->getCreate())) { throw new Exception(Exception::USER_UNAUTHORIZED); } - $file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file)); + + try { + $file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file)); + } catch (NotFoundException) { + throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); + } } } $queueForEvents ->setParam('bucketId', $bucket->getId()) ->setParam('fileId', $file->getId()) - ->setContext('bucket', $bucket) - ; + ->setContext('bucket', $bucket); $metadata = null; // was causing leaks as it was passed by reference @@ -704,7 +709,7 @@ App::post('/v1/storage/buckets/:bucketId/files') }); App::get('/v1/storage/buckets/:bucketId/files') - ->alias('/v1/storage/files', ['bucketId' => 'default']) + ->alias('/v1/storage/files') ->desc('List files') ->groups(['api', 'storage']) ->label('scope', 'files.read') @@ -739,11 +744,7 @@ App::get('/v1/storage/buckets/:bucketId/files') throw new Exception(Exception::USER_UNAUTHORIZED); } - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } + $queries = Query::parseQueries($queries); if (!empty($search)) { $queries[] = Query::search('search', $search); @@ -781,12 +782,16 @@ App::get('/v1/storage/buckets/:bucketId/files') $filterQueries = Query::groupByType($queries)['filters']; - if ($fileSecurity && !$valid) { - $files = $dbForProject->find('bucket_' . $bucket->getInternalId(), $queries); - $total = $dbForProject->count('bucket_' . $bucket->getInternalId(), $filterQueries, APP_LIMIT_COUNT); - } else { - $files = Authorization::skip(fn () => $dbForProject->find('bucket_' . $bucket->getInternalId(), $queries)); - $total = Authorization::skip(fn () => $dbForProject->count('bucket_' . $bucket->getInternalId(), $filterQueries, APP_LIMIT_COUNT)); + try { + if ($fileSecurity && !$valid) { + $files = $dbForProject->find('bucket_' . $bucket->getInternalId(), $queries); + $total = $dbForProject->count('bucket_' . $bucket->getInternalId(), $filterQueries, APP_LIMIT_COUNT); + } else { + $files = Authorization::skip(fn() => $dbForProject->find('bucket_' . $bucket->getInternalId(), $queries)); + $total = Authorization::skip(fn() => $dbForProject->count('bucket_' . $bucket->getInternalId(), $filterQueries, APP_LIMIT_COUNT)); + } + } catch (NotFoundException) { + throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } $response->dynamic(new Document([ @@ -796,7 +801,7 @@ App::get('/v1/storage/buckets/:bucketId/files') }); App::get('/v1/storage/buckets/:bucketId/files/:fileId') - ->alias('/v1/storage/files/:fileId', ['bucketId' => 'default']) + ->alias('/v1/storage/files/:fileId') ->desc('Get file') ->groups(['api', 'storage']) ->label('scope', 'files.read') @@ -844,7 +849,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId') }); App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') - ->alias('/v1/storage/files/:fileId/preview', ['bucketId' => 'default']) + ->alias('/v1/storage/files/:fileId/preview') ->desc('Get file preview') ->groups(['api', 'storage']) ->label('scope', 'files.read') @@ -1017,7 +1022,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') }); App::get('/v1/storage/buckets/:bucketId/files/:fileId/download') - ->alias('/v1/storage/files/:fileId/download', ['bucketId' => 'default']) + ->alias('/v1/storage/files/:fileId/download') ->desc('Get file for download') ->groups(['api', 'storage']) ->label('scope', 'files.read') @@ -1158,7 +1163,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download') }); App::get('/v1/storage/buckets/:bucketId/files/:fileId/view') - ->alias('/v1/storage/files/:fileId/view', ['bucketId' => 'default']) + ->alias('/v1/storage/files/:fileId/view') ->desc('Get file for view') ->groups(['api', 'storage']) ->label('scope', 'files.read') @@ -1465,7 +1470,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/push') }); App::put('/v1/storage/buckets/:bucketId/files/:fileId') - ->alias('/v1/storage/files/:fileId', ['bucketId' => 'default']) + ->alias('/v1/storage/files/:fileId') ->desc('Update file') ->groups(['api', 'storage']) ->label('scope', 'files.write') @@ -1555,10 +1560,14 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') $file->setAttribute('name', $name); } - if ($fileSecurity && !$valid) { - $file = $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file); - } else { - $file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file)); + try { + if ($fileSecurity && !$valid) { + $file = $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file); + } else { + $file = Authorization::skip(fn() => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file)); + } + } catch (NotFoundException) { + throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } $queueForEvents @@ -1641,10 +1650,14 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') ->setResource('file/' . $fileId) ; - if ($fileSecurity && !$valid) { - $deleted = $dbForProject->deleteDocument('bucket_' . $bucket->getInternalId(), $fileId); - } else { - $deleted = Authorization::skip(fn () => $dbForProject->deleteDocument('bucket_' . $bucket->getInternalId(), $fileId)); + try { + if ($fileSecurity && !$valid) { + $deleted = $dbForProject->deleteDocument('bucket_' . $bucket->getInternalId(), $fileId); + } else { + $deleted = Authorization::skip(fn() => $dbForProject->deleteDocument('bucket_' . $bucket->getInternalId(), $fileId)); + } + } catch (NotFoundException) { + throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } if (!$deleted) { From de2ce16f10b165734ed36633f45a639604ddfbcb Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 4 Nov 2024 21:49:20 +1300 Subject: [PATCH 21/66] Fix non-variable passed by reference --- app/controllers/api/functions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 8815611021..544abec317 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -2642,9 +2642,11 @@ App::get('/v1/functions/templates/:templateId') ->action(function (string $templateId, Response $response) { $templates = Config::getParam('function-templates', []); - $template = array_shift(\array_filter($templates, function ($template) use ($templateId) { + $filtered = \array_filter($templates, function ($template) use ($templateId) { return $template['id'] === $templateId; - })); + }); + + $template = array_shift($filtered); if (empty($template)) { throw new Exception(Exception::FUNCTION_TEMPLATE_NOT_FOUND); From 6bba134650c2aeb3015db3963dec24f9d1276365 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 4 Nov 2024 21:50:22 +1300 Subject: [PATCH 22/66] Set min/max for datetime validator --- app/controllers/api/databases.php | 4 ++-- app/controllers/api/functions.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 7c10662946..4a60fbc257 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1607,7 +1607,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new DatetimeValidator(), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.', true) + ->param('default', null, fn(Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMinDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.', true, ['dbForProject']) ->param('array', false, new Boolean(), 'Is attribute an array?', true) ->inject('response') ->inject('dbForProject') @@ -2295,7 +2295,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datet ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Nullable(new DatetimeValidator()), 'Default value for attribute when not provided. Cannot be set when attribute is required.') + ->param('default', null, fn(Database $dbForProject) => new Nullable(new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMinDateTime())), 'Default value for attribute when not provided. Cannot be set when attribute is required.', injections: ['dbForProject']) ->param('newKey', null, new Key(), 'New attribute key.', true) ->inject('response') ->inject('dbForProject') diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 544abec317..0ca73ee6ac 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1753,7 +1753,7 @@ App::post('/v1/functions/:functionId/executions') ->param('path', '/', new Text(2048), 'HTTP path of execution. Path can include query params. Default value is /', true) ->param('method', 'POST', new Whitelist(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], true), 'HTTP method of execution. Default value is GET.', true) ->param('headers', [], new AnyOf([new Assoc(), new Text(65535)], AnyOf::TYPE_MIXED), 'HTTP headers of execution. Defaults to empty.', true) - ->param('scheduledAt', null, new DatetimeValidator(true, DateTimeValidator::PRECISION_MINUTES, 60), 'Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.', true) + ->param('scheduledAt', null, new DatetimeValidator(requireDateInFuture: true, precision: DateTimeValidator::PRECISION_MINUTES, offset: 60), 'Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.', true) ->inject('response') ->inject('request') ->inject('project') From a00671fe2949bab208dfc7ad327cf875fe19ab65 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 4 Nov 2024 21:53:00 +1300 Subject: [PATCH 23/66] Lint --- app/controllers/api/databases.php | 4 ++-- app/controllers/api/storage.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 4a60fbc257..c0c7a09938 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1607,7 +1607,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, fn(Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMinDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.', true, ['dbForProject']) + ->param('default', null, fn (Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMinDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.', true, ['dbForProject']) ->param('array', false, new Boolean(), 'Is attribute an array?', true) ->inject('response') ->inject('dbForProject') @@ -2295,7 +2295,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datet ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, fn(Database $dbForProject) => new Nullable(new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMinDateTime())), 'Default value for attribute when not provided. Cannot be set when attribute is required.', injections: ['dbForProject']) + ->param('default', null, fn (Database $dbForProject) => new Nullable(new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMinDateTime())), 'Default value for attribute when not provided. Cannot be set when attribute is required.', injections: ['dbForProject']) ->param('newKey', null, new Key(), 'New attribute key.', true) ->inject('response') ->inject('dbForProject') diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 6b8248f101..dda39a0db0 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -787,8 +787,8 @@ App::get('/v1/storage/buckets/:bucketId/files') $files = $dbForProject->find('bucket_' . $bucket->getInternalId(), $queries); $total = $dbForProject->count('bucket_' . $bucket->getInternalId(), $filterQueries, APP_LIMIT_COUNT); } else { - $files = Authorization::skip(fn() => $dbForProject->find('bucket_' . $bucket->getInternalId(), $queries)); - $total = Authorization::skip(fn() => $dbForProject->count('bucket_' . $bucket->getInternalId(), $filterQueries, APP_LIMIT_COUNT)); + $files = Authorization::skip(fn () => $dbForProject->find('bucket_' . $bucket->getInternalId(), $queries)); + $total = Authorization::skip(fn () => $dbForProject->count('bucket_' . $bucket->getInternalId(), $filterQueries, APP_LIMIT_COUNT)); } } catch (NotFoundException) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); @@ -1564,7 +1564,7 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') if ($fileSecurity && !$valid) { $file = $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file); } else { - $file = Authorization::skip(fn() => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file)); + $file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file)); } } catch (NotFoundException) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); @@ -1654,7 +1654,7 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') if ($fileSecurity && !$valid) { $deleted = $dbForProject->deleteDocument('bucket_' . $bucket->getInternalId(), $fileId); } else { - $deleted = Authorization::skip(fn() => $dbForProject->deleteDocument('bucket_' . $bucket->getInternalId(), $fileId)); + $deleted = Authorization::skip(fn () => $dbForProject->deleteDocument('bucket_' . $bucket->getInternalId(), $fileId)); } } catch (NotFoundException) { throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); From 4489d5f77f1a95cc3e3b9e4b875110d62f01ac3e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 4 Nov 2024 22:13:38 +1300 Subject: [PATCH 24/66] Fix validator --- app/controllers/api/databases.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index c0c7a09938..84a311e342 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1607,7 +1607,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, fn (Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMinDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.', true, ['dbForProject']) + ->param('default', null, fn (Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.', true, ['dbForProject']) ->param('array', false, new Boolean(), 'Is attribute an array?', true) ->inject('response') ->inject('dbForProject') @@ -2295,7 +2295,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datet ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, fn (Database $dbForProject) => new Nullable(new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMinDateTime())), 'Default value for attribute when not provided. Cannot be set when attribute is required.', injections: ['dbForProject']) + ->param('default', null, fn (Database $dbForProject) => new Nullable(new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime())), 'Default value for attribute when not provided. Cannot be set when attribute is required.', injections: ['dbForProject']) ->param('newKey', null, new Key(), 'New attribute key.', true) ->inject('response') ->inject('dbForProject') @@ -3451,7 +3451,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen }); App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') - ->alias('/v1/database/collections/:collectionId/documents/:documentId', ['databaseId' => 'default']) + ->alias('/v1/database/collections/:collectionId/documents/:documentId') ->desc('Update document') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].update') From d2deca7f1faeb2549ee2c9067454d7e60b0b1ff2 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:05:54 +0000 Subject: [PATCH 25/66] feat: refactor events --- app/controllers/shared/api.php | 154 +++++++++++--------------------- app/init.php | 8 ++ src/Appwrite/Event/Event.php | 13 --- src/Appwrite/Event/Realtime.php | 74 +++++++++++++++ src/Appwrite/Event/Webhook.php | 17 ++++ 5 files changed, 151 insertions(+), 115 deletions(-) create mode 100644 src/Appwrite/Event/Realtime.php create mode 100644 src/Appwrite/Event/Webhook.php diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 043c346587..b2a037d33a 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -12,6 +12,7 @@ use Appwrite\Event\Event; use Appwrite\Event\Func; use Appwrite\Event\Messaging; use Appwrite\Event\Usage; +use Appwrite\Event\Webhook; use Appwrite\Extend\Exception; use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Messaging\Adapter\Realtime; @@ -58,7 +59,8 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$eventDatabaseListener = function (Document $document, Event $queueForEvents, Response $response, Func $queueForFunctions, Document $project) { +$eventDatabaseListener = function (Document $document, Response $response, Event $queueForEvents, Func $queueForFunctions, Webhook $queueForWebhooks, Realtime $queueForRealtime) use ($triggerEventQueues) { + // For now, we only use user creation events with the database listener. if (!$document->getCollection() === 'users') { return; } @@ -68,48 +70,13 @@ $eventDatabaseListener = function (Document $document, Event $queueForEvents, Re ->setParam('userId', $document->getId()) ->setPayload($response->output($document, Response::MODEL_USER)); - // Trigger functions - $queueForFunctions - ->from($queueForEvents) - ->trigger(); - - // Trigger webhooks - $queueForEvents - ->setClass(Event::WEBHOOK_CLASS_NAME) - ->setQueue(Event::WEBHOOK_QUEUE_NAME) - ->trigger(); - - // Trigger realtime - if ($project->getId() !== 'console') { - $allEvents = Event::generateEvents($queueForEvents->getEvent(), $queueForEvents->getParams()); - $payload = new Document($queueForEvents->getPayload()); - - $db = $queueForEvents->getContext('database'); - $collection = $queueForEvents->getContext('collection'); - $bucket = $queueForEvents->getContext('bucket'); - - $target = Realtime::fromPayload( - // Pass first, most verbose event pattern - event: $allEvents[0], - payload: $payload, - project: $project, - database: $db, - collection: $collection, - bucket: $bucket, - ); - - Realtime::send( - projectId: $target['projectId'] ?? $project->getId(), - payload: $queueForEvents->getRealtimePayload(), - events: $allEvents, - channels: $target['channels'], - roles: $target['roles'], - options: [ - 'permissionsChanged' => $target['permissionsChanged'], - 'userId' => $queueForEvents->getParam('userId') - ] - ); - } + // Trigger functions, webhooks, and realtime events + $triggerEventQueues( + $queueForEvents, + $queueForFunctions, + $queueForWebhooks, + $queueForRealtime + ); }; $usageDatabaseListener = function (string $event, Document $document, Usage $queueForUsage) { @@ -400,6 +367,29 @@ App::init() } }); +$triggerEventQueues = function ($queueForEvents, $queueForFunctions, $queueForWebhooks, $queueForRealtime) { + if (empty($queueForEvents->getEvent())) { + return; + } + + $queueForFunctions + ->from($queueForEvents) + ->trigger(); + + $queueForWebhooks + ->from($queueForEvents) + ->trigger(); + + // Console can listen to events from other projects, but it should not trigger events for them. + if ($queueForEvents->getProject()->getId() === 'console') { + return; + } + + $queueForRealtime + ->from($queueForEvents) + ->trigger(); +}; + App::init() ->groups(['api']) ->inject('utopia') @@ -416,9 +406,11 @@ App::init() ->inject('queueForBuilds') ->inject('queueForUsage') ->inject('queueForFunctions') + ->inject('queueForWebhooks') + ->inject('queueForRealtime') ->inject('dbForProject') ->inject('mode') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Connection $queue, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Func $queueForFunctions, Database $dbForProject, string $mode) use ($usageDatabaseListener, $eventDatabaseListener) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Connection $queue, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Func $queueForFunctions, Webhook $queueForWebhooks, Realtime $queueForRealtime, Database $dbForProject, string $mode) use ($usageDatabaseListener, $eventDatabaseListener) { $route = $utopia->getRoute(); @@ -512,13 +504,14 @@ App::init() $queueForBuilds->setProject($project); $queueForMessaging->setProject($project); + // Clone the queueForEvents, to prevent events triggered by the database listener + // from overwriting the events that are supposed to be triggered in the shutdown hook. $queueForEventsClone = new Event($queue); - $queueForEventsClone->from($queueForEvents); $dbForProject ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) - ->on(Database::EVENT_DOCUMENT_CREATE, 'trigger-events', fn ($event, $document) => $eventDatabaseListener($document, clone $queueForEvents, $response, $queueForFunctions, $project)); + ->on(Database::EVENT_DOCUMENT_CREATE, 'create-trigger-events', fn ($event, $document) => $eventDatabaseListener($document, $response, $queueForEventsClone->from($queueForEvents), $queueForFunctions, $queueForWebhooks, $queueForRealtime)); $useCache = $route->getLabel('cache', false); if ($useCache) { @@ -651,70 +644,27 @@ App::shutdown() ->inject('queueForDatabase') ->inject('queueForBuilds') ->inject('queueForMessaging') - ->inject('dbForProject') ->inject('queueForFunctions') + ->inject('queueForWebhooks') + ->inject('queueForRealtime') + ->inject('dbForProject') ->inject('mode') ->inject('dbForConsole') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Audit $queueForAudits, Usage $queueForUsage, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Messaging $queueForMessaging, Database $dbForProject, Func $queueForFunctions, string $mode, Database $dbForConsole) use ($parseLabel) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Audit $queueForAudits, Usage $queueForUsage, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Messaging $queueForMessaging, Func $queueForFunctions, Event $queueForWebhooks, Realtime $queueForRealtime, Database $dbForProject, string $mode, Database $dbForConsole) use ($parseLabel, $triggerEventQueues) { $responsePayload = $response->getPayload(); - if (!empty($queueForEvents->getEvent())) { - if (empty($queueForEvents->getPayload())) { - $queueForEvents->setPayload($responsePayload); - } - - /** - * Trigger functions. - */ - if (!$queueForEvents->isPaused()) { - $queueForFunctions - ->from($queueForEvents) - ->trigger(); - } - /** - * Trigger webhooks. - */ - $queueForEvents - ->setClass(Event::WEBHOOK_CLASS_NAME) - ->setQueue(Event::WEBHOOK_QUEUE_NAME) - ->trigger(); - - /** - * Trigger realtime. - */ - if ($project->getId() !== 'console') { - $allEvents = Event::generateEvents($queueForEvents->getEvent(), $queueForEvents->getParams()); - $payload = new Document($queueForEvents->getPayload()); - - $db = $queueForEvents->getContext('database'); - $collection = $queueForEvents->getContext('collection'); - $bucket = $queueForEvents->getContext('bucket'); - - $target = Realtime::fromPayload( - // Pass first, most verbose event pattern - event: $allEvents[0], - payload: $payload, - project: $project, - database: $db, - collection: $collection, - bucket: $bucket, - ); - - Realtime::send( - projectId: $target['projectId'] ?? $project->getId(), - payload: $queueForEvents->getRealtimePayload(), - events: $allEvents, - channels: $target['channels'], - roles: $target['roles'], - options: [ - 'permissionsChanged' => $target['permissionsChanged'], - 'userId' => $queueForEvents->getParam('userId') - ] - ); - } + if (empty($queueForEvents->getPayload())) { + $queueForEvents->setPayload($responsePayload); } + $triggerEventQueues( + $queueForEvents, + $queueForFunctions, + $queueForWebhooks, + $queueForRealtime + ); + $route = $utopia->getRoute(); $requestParams = $route->getParamsValues(); diff --git a/app/init.php b/app/init.php index e962c58b67..d062e218e9 100644 --- a/app/init.php +++ b/app/init.php @@ -31,7 +31,9 @@ use Appwrite\Event\Func; use Appwrite\Event\Mail; use Appwrite\Event\Messaging; use Appwrite\Event\Migration; +use Appwrite\Event\Realtime; use Appwrite\Event\Usage; +use Appwrite\Event\Webhook; use Appwrite\Extend\Exception; use Appwrite\Functions\Specification; use Appwrite\GraphQL\Promises\Adapter\Swoole; @@ -1134,6 +1136,12 @@ App::setResource('queueForDeletes', function (Connection $queue) { App::setResource('queueForEvents', function (Connection $queue) { return new Event($queue); }, ['queue']); +App::setResource('queueForWebhooks', function (Connection $queue) { + return new Webhook($queue); +}, ['queue']); +App::setResource('queueForRealtime', function () { + return new Realtime(); +}, []); App::setResource('queueForAudits', function (Connection $queue) { return new Audit($queue); }, ['queue']); diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index 14cb1ef4b7..187203b04c 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -204,19 +204,6 @@ class Event return $this->payload; } - public function getRealtimePayload(): array - { - $payload = []; - - foreach ($this->payload as $key => $value) { - if (!isset($this->sensitive[$key])) { - $payload[$key] = $value; - } - } - - return $payload; - } - /** * Set context for this event. * diff --git a/src/Appwrite/Event/Realtime.php b/src/Appwrite/Event/Realtime.php new file mode 100644 index 0000000000..394de9a612 --- /dev/null +++ b/src/Appwrite/Event/Realtime.php @@ -0,0 +1,74 @@ +payload as $key => $value) { + if (!isset($this->sensitive[$key])) { + $payload[$key] = $value; + } + } + + return $payload; + } + + /** + * Execute Event. + * + * @return string|bool + * @throws InvalidArgumentException + */ + public function trigger(): string|bool + { + if ($this->paused) { + return false; + } + + if (empty($this->event)) { + return false; + } + + $allEvents = Event::generateEvents($this->getEvent(), $this->getParams()); + $payload = new Document($this->getPayload()); + + $db = $this->getContext('database'); + $collection = $this->getContext('collection'); + $bucket = $this->getContext('bucket'); + + $target = RealtimeAdapter::fromPayload( + // Pass first, most verbose event pattern + event: $allEvents[0], + payload: $payload, + project: $this->getProject(), + database: $db, + collection: $collection, + bucket: $bucket, + ); + + RealtimeAdapter::send( + projectId: $target['projectId'] ?? $this->getProject()->getId(), + payload: $this->getRealtimePayload(), + events: $allEvents, + channels: $target['channels'], + roles: $target['roles'], + options: [ + 'permissionsChanged' => $target['permissionsChanged'], + 'userId' => $this->getParam('userId') + ] + ); + + return true; + } +} diff --git a/src/Appwrite/Event/Webhook.php b/src/Appwrite/Event/Webhook.php new file mode 100644 index 0000000000..125c9a78d5 --- /dev/null +++ b/src/Appwrite/Event/Webhook.php @@ -0,0 +1,17 @@ +setQueue(Event::WEBHOOK_QUEUE_NAME) + ->setClass(Event::WEBHOOK_CLASS_NAME); + } +} From 20d8a702a126b31eaaab18598864632a14bab56c Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:20:43 +0000 Subject: [PATCH 26/66] chore: refactor --- app/controllers/shared/api.php | 81 ++++++++++++++++----------------- src/Appwrite/Event/Event.php | 22 --------- src/Appwrite/Event/Func.php | 4 -- src/Appwrite/Event/Realtime.php | 4 -- 4 files changed, 38 insertions(+), 73 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index b2a037d33a..56137631e8 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -11,11 +11,11 @@ use Appwrite\Event\Delete; use Appwrite\Event\Event; use Appwrite\Event\Func; use Appwrite\Event\Messaging; +use Appwrite\Event\Realtime; use Appwrite\Event\Usage; use Appwrite\Event\Webhook; use Appwrite\Extend\Exception; use Appwrite\Extend\Exception as AppwriteException; -use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Utopia\Abuse\Abuse; @@ -59,9 +59,9 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$eventDatabaseListener = function (Document $document, Response $response, Event $queueForEvents, Func $queueForFunctions, Webhook $queueForWebhooks, Realtime $queueForRealtime) use ($triggerEventQueues) { - // For now, we only use user creation events with the database listener. - if (!$document->getCollection() === 'users') { +$eventDatabaseListener = function (Document $document, Response $response, Event $queueForEvents, Func $queueForFunctions, Webhook $queueForWebhooks, Realtime $queueForRealtime) { + // Only trigger events for user creation with the database listener. + if ($document->getCollection() !== 'users') { return; } @@ -71,12 +71,21 @@ $eventDatabaseListener = function (Document $document, Response $response, Event ->setPayload($response->output($document, Response::MODEL_USER)); // Trigger functions, webhooks, and realtime events - $triggerEventQueues( - $queueForEvents, - $queueForFunctions, - $queueForWebhooks, - $queueForRealtime - ); + $queueForFunctions + ->from($queueForEvents) + ->trigger(); + + $queueForWebhooks + ->from($queueForEvents) + ->trigger(); + + if ($queueForEvents->getProject()->getId() === 'console') { + return; + } + + $queueForRealtime + ->from($queueForEvents) + ->trigger(); }; $usageDatabaseListener = function (string $event, Document $document, Usage $queueForUsage) { @@ -367,29 +376,6 @@ App::init() } }); -$triggerEventQueues = function ($queueForEvents, $queueForFunctions, $queueForWebhooks, $queueForRealtime) { - if (empty($queueForEvents->getEvent())) { - return; - } - - $queueForFunctions - ->from($queueForEvents) - ->trigger(); - - $queueForWebhooks - ->from($queueForEvents) - ->trigger(); - - // Console can listen to events from other projects, but it should not trigger events for them. - if ($queueForEvents->getProject()->getId() === 'console') { - return; - } - - $queueForRealtime - ->from($queueForEvents) - ->trigger(); -}; - App::init() ->groups(['api']) ->inject('utopia') @@ -650,20 +636,29 @@ App::shutdown() ->inject('dbForProject') ->inject('mode') ->inject('dbForConsole') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Audit $queueForAudits, Usage $queueForUsage, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Messaging $queueForMessaging, Func $queueForFunctions, Event $queueForWebhooks, Realtime $queueForRealtime, Database $dbForProject, string $mode, Database $dbForConsole) use ($parseLabel, $triggerEventQueues) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Audit $queueForAudits, Usage $queueForUsage, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Messaging $queueForMessaging, Func $queueForFunctions, Event $queueForWebhooks, Realtime $queueForRealtime, Database $dbForProject, string $mode, Database $dbForConsole) use ($parseLabel) { $responsePayload = $response->getPayload(); - if (empty($queueForEvents->getPayload())) { - $queueForEvents->setPayload($responsePayload); - } + if (!empty($queueForEvents->getEvent())) { + if (empty($queueForEvents->getPayload())) { + $queueForEvents->setPayload($responsePayload); + } - $triggerEventQueues( - $queueForEvents, - $queueForFunctions, - $queueForWebhooks, - $queueForRealtime - ); + $queueForWebhooks + ->from($queueForEvents) + ->trigger(); + + $queueForFunctions + ->from($queueForEvents) + ->trigger(); + + if ($project->getId() !== 'console') { + $queueForRealtime + ->from($queueForEvents) + ->trigger(); + } + } $route = $utopia->getRoute(); $requestParams = $route->getParamsValues(); diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index 187203b04c..d15ccc39bc 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -302,10 +302,6 @@ class Event */ public function trigger(): string|bool { - if ($this->paused) { - return false; - } - if (empty($this->event)) { return false; } @@ -520,24 +516,6 @@ class Event return \array_values($events); } - /** - * Get the value of paused - */ - public function isPaused(): bool - { - return $this->paused; - } - - /** - * Set the value of paused - */ - public function setPaused(bool $paused): self - { - $this->paused = $paused; - - return $this; - } - /** * Generate a function event from a base event * diff --git a/src/Appwrite/Event/Func.php b/src/Appwrite/Event/Func.php index 0ad639a9f5..11a445d8ed 100644 --- a/src/Appwrite/Event/Func.php +++ b/src/Appwrite/Event/Func.php @@ -213,10 +213,6 @@ class Func extends Event */ public function trigger(): string|bool { - if ($this->paused) { - return false; - } - $client = new Client($this->queue, $this->connection); $events = $this->getEvent() ? Event::generateEvents($this->getEvent(), $this->getParams()) : null; diff --git a/src/Appwrite/Event/Realtime.php b/src/Appwrite/Event/Realtime.php index 394de9a612..e158076f9b 100644 --- a/src/Appwrite/Event/Realtime.php +++ b/src/Appwrite/Event/Realtime.php @@ -32,10 +32,6 @@ class Realtime extends Event */ public function trigger(): string|bool { - if ($this->paused) { - return false; - } - if (empty($this->event)) { return false; } From cca0c3ae45864421295b3b48d41998ff36e6680c Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 5 Nov 2024 12:59:11 +0545 Subject: [PATCH 27/66] Make compression param whitelist strict --- app/controllers/api/storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index dda39a0db0..ed10c84912 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -68,7 +68,7 @@ App::post('/v1/storage/buckets') ->param('enabled', true, new Boolean(true), 'Is bucket enabled? When set to \'disabled\', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.', true) ->param('maximumFileSize', fn (array $plan) => empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1000 * 1000, fn (array $plan) => new Range(1, empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1000 * 1000), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(System::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true, ['plan']) ->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true) - ->param('compression', Compression::NONE, new WhiteList([Compression::NONE, Compression::GZIP, Compression::ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . Compression::NONE . ', [' . Compression::GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . Compression::ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true) + ->param('compression', Compression::NONE, new WhiteList([Compression::NONE, Compression::GZIP, Compression::ZSTD], true), 'Compression algorithm choosen for compression. Can be one of ' . Compression::NONE . ', [' . Compression::GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . Compression::ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true) ->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true) ->param('antivirus', true, new Boolean(true), 'Is virus scanning enabled? For file size above ' . Storage::human(APP_LIMIT_ANTIVIRUS, 0) . ' AntiVirus scanning is skipped even if it\'s enabled', true) ->inject('response') From 028c5366c20b9a88699f88cdf72d1f4627dd9d1e Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 5 Nov 2024 08:12:58 +0000 Subject: [PATCH 28/66] make compression nullable and assign default in action - also update the `update bucket` endpoint --- app/controllers/api/storage.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index ed10c84912..911481a1c0 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -74,13 +74,13 @@ App::post('/v1/storage/buckets') ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $bucketId, string $name, ?array $permissions, bool $fileSecurity, bool $enabled, int $maximumFileSize, array $allowedFileExtensions, string $compression, bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Event $queueForEvents) { + ->action(function (string $bucketId, string $name, ?array $permissions, bool $fileSecurity, bool $enabled, int $maximumFileSize, array $allowedFileExtensions, ?string $compression, bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Event $queueForEvents) { $bucketId = $bucketId === 'unique()' ? ID::unique() : $bucketId; // Map aggregate permissions into the multiple permissions they represent. $permissions = Permission::aggregate($permissions); - + $compression ??= Compression::NONE; try { $files = (Config::getParam('collections', [])['buckets'] ?? [])['files'] ?? []; if (empty($files)) { @@ -254,13 +254,13 @@ App::put('/v1/storage/buckets/:bucketId') ->param('enabled', true, new Boolean(true), 'Is bucket enabled? When set to \'disabled\', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.', true) ->param('maximumFileSize', fn (array $plan) => empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1000 * 1000, fn (array $plan) => new Range(1, empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1000 * 1000), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(System::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true, ['plan']) ->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true) - ->param('compression', Compression::NONE, new WhiteList([Compression::NONE, Compression::GZIP, Compression::ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . Compression::NONE . ', [' . Compression::GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . Compression::ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true) + ->param('compression', Compression::NONE, new WhiteList([Compression::NONE, Compression::GZIP, Compression::ZSTD], true), 'Compression algorithm choosen for compression. Can be one of ' . Compression::NONE . ', [' . Compression::GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . Compression::ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true) ->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true) ->param('antivirus', true, new Boolean(true), 'Is virus scanning enabled? For file size above ' . Storage::human(APP_LIMIT_ANTIVIRUS, 0) . ' AntiVirus scanning is skipped even if it\'s enabled', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $bucketId, string $name, ?array $permissions, bool $fileSecurity, bool $enabled, ?int $maximumFileSize, array $allowedFileExtensions, string $compression, bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Event $queueForEvents) { + ->action(function (string $bucketId, string $name, ?array $permissions, bool $fileSecurity, bool $enabled, ?int $maximumFileSize, array $allowedFileExtensions, ?string $compression, bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Event $queueForEvents) { $bucket = $dbForProject->getDocument('buckets', $bucketId); if ($bucket->isEmpty()) { @@ -273,6 +273,7 @@ App::put('/v1/storage/buckets/:bucketId') $enabled ??= $bucket->getAttribute('enabled', true); $encryption ??= $bucket->getAttribute('encryption', true); $antivirus ??= $bucket->getAttribute('antivirus', true); + $compression ??= $bucket->getAttribute('compression', Compression::NONE); // Map aggregate permissions into the multiple permissions they represent. $permissions = Permission::aggregate($permissions); From e9a0f47711d1a2eddbc7a2bcab1c8b9139449b27 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 09:55:56 +0100 Subject: [PATCH 29/66] fix: event test --- src/Appwrite/Event/Event.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index d15ccc39bc..325aca8c62 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -302,10 +302,6 @@ class Event */ public function trigger(): string|bool { - if (empty($this->event)) { - return false; - } - $client = new Client($this->queue, $this->connection); return $client->enqueue([ From 540e997fdbce9cdc7b874ab43e1af4c43ed135a6 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 5 Nov 2024 23:15:08 +1300 Subject: [PATCH 30/66] Update database --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index f122149ec2..5a2df912fd 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/cache": "0.10.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.53.12", + "utopia-php/database": "0.53.13", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index 0650710611..452aefd26f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "102bab0efa76adc92312b9c5a7f488e3", + "content-hash": "f6eb364e8504ebc2f6c9fe38d75f7e86", "packages": [ { "name": "adhocore/jwt", @@ -1724,16 +1724,16 @@ }, { "name": "utopia-php/database", - "version": "0.53.12", + "version": "0.53.13", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "4068d0c5c503ec4562f8c0aa9cfd095889418b83" + "reference": "a7e5de257e36e1b804d35b307865dd4036baa33e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/4068d0c5c503ec4562f8c0aa9cfd095889418b83", - "reference": "4068d0c5c503ec4562f8c0aa9cfd095889418b83", + "url": "https://api.github.com/repos/utopia-php/database/zipball/a7e5de257e36e1b804d35b307865dd4036baa33e", + "reference": "a7e5de257e36e1b804d35b307865dd4036baa33e", "shasum": "" }, "require": { @@ -1774,9 +1774,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.53.12" + "source": "https://github.com/utopia-php/database/tree/0.53.13" }, - "time": "2024-11-04T07:51:44+00:00" + "time": "2024-11-05T10:08:05+00:00" }, { "name": "utopia-php/domains", From 2dea9b1f51a1cfde8c0437b2eaf8b53b165164fe Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:35:35 +0100 Subject: [PATCH 31/66] chore: clone --- app/controllers/shared/api.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 56137631e8..a07bc06a91 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -490,14 +490,24 @@ App::init() $queueForBuilds->setProject($project); $queueForMessaging->setProject($project); - // Clone the queueForEvents, to prevent events triggered by the database listener + // Clone the queues, to prevent events triggered by the database listener // from overwriting the events that are supposed to be triggered in the shutdown hook. $queueForEventsClone = new Event($queue); + $queueForFunctionsClone = new Func($queue); + $queueForWebhooksClone = new Webhook($queue); + $queueForRealtimeClone = new Realtime($queue); $dbForProject ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) - ->on(Database::EVENT_DOCUMENT_CREATE, 'create-trigger-events', fn ($event, $document) => $eventDatabaseListener($document, $response, $queueForEventsClone->from($queueForEvents), $queueForFunctions, $queueForWebhooks, $queueForRealtime)); + ->on(Database::EVENT_DOCUMENT_CREATE, 'create-trigger-events', fn ($event, $document) => $eventDatabaseListener( + $document, + $response, + $queueForEventsClone->from($queueForEvents), + $queueForFunctionsClone->from($queueForEvents), + $queueForWebhooksClone->from($queueForEvents), + $queueForRealtimeClone->from($queueForEvents) + )); $useCache = $route->getLabel('cache', false); if ($useCache) { From ab7e45429222e36150a0c74ee234badcf554db1f Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:17:41 +0100 Subject: [PATCH 32/66] fix: event name --- app/controllers/shared/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index a07bc06a91..8835247574 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -66,7 +66,7 @@ $eventDatabaseListener = function (Document $document, Response $response, Event } $queueForEvents - ->setEvent('users.[userId].update') + ->setEvent('users.[userId].create') ->setParam('userId', $document->getId()) ->setPayload($response->output($document, Response::MODEL_USER)); From 229fe9ecd5b37b1fc5db664c3b5d7f311da81b53 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:50:32 +0100 Subject: [PATCH 33/66] fix: tests --- app/controllers/shared/api.php | 17 +++++++---------- src/Appwrite/Event/Event.php | 1 + 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 8835247574..f5921bf6e8 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -391,12 +391,9 @@ App::init() ->inject('queueForDatabase') ->inject('queueForBuilds') ->inject('queueForUsage') - ->inject('queueForFunctions') - ->inject('queueForWebhooks') - ->inject('queueForRealtime') ->inject('dbForProject') ->inject('mode') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Connection $queue, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Func $queueForFunctions, Webhook $queueForWebhooks, Realtime $queueForRealtime, Database $dbForProject, string $mode) use ($usageDatabaseListener, $eventDatabaseListener) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Connection $queue, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Database $dbForProject, string $mode) use ($usageDatabaseListener, $eventDatabaseListener) { $route = $utopia->getRoute(); @@ -493,9 +490,9 @@ App::init() // Clone the queues, to prevent events triggered by the database listener // from overwriting the events that are supposed to be triggered in the shutdown hook. $queueForEventsClone = new Event($queue); - $queueForFunctionsClone = new Func($queue); - $queueForWebhooksClone = new Webhook($queue); - $queueForRealtimeClone = new Realtime($queue); + $queueForFunctions = new Func($queue); + $queueForWebhooks = new Webhook($queue); + $queueForRealtime = new Realtime(); $dbForProject ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForUsage)) @@ -504,9 +501,9 @@ App::init() $document, $response, $queueForEventsClone->from($queueForEvents), - $queueForFunctionsClone->from($queueForEvents), - $queueForWebhooksClone->from($queueForEvents), - $queueForRealtimeClone->from($queueForEvents) + $queueForFunctions->from($queueForEvents), + $queueForWebhooks->from($queueForEvents), + $queueForRealtime->from($queueForEvents) )); $useCache = $route->getLabel('cache', false); diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index 325aca8c62..3f166ad7a4 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -527,6 +527,7 @@ class Event $this->payload = $event->getPayload(); $this->event = $event->getEvent(); $this->params = $event->getParams(); + $this->context = $event->context; return $this; } } From 69e8fdf0770f94f4c2151c915cf70d07004225e4 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 17:05:21 +0100 Subject: [PATCH 34/66] chore: refactor --- app/controllers/api/projects.php | 17 ++++++++++------- app/controllers/api/teams.php | 6 +++--- src/Appwrite/Utopia/Response/Model/Project.php | 4 ++-- tests/e2e/Services/Teams/TeamsBaseClient.php | 11 +++++------ 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index e3dc80e0ff..d1d4227f6f 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -111,7 +111,9 @@ App::post('/v1/projects') 'personalDataCheck' => false, 'mockNumbers' => [], 'sessionAlerts' => false, - 'teamsShowSensitiveFields' => true, + 'teamsShowMfa' => true, + 'teamsShowName' => true, + 'teamsShowEmail' => true, ]; foreach ($auth as $method) { @@ -649,21 +651,21 @@ App::patch('/v1/projects/:projectId/auth/session-alerts') $response->dynamic($project, Response::MODEL_PROJECT); }); -App::patch('/v1/projects/:projectId/auth/teams-hide-sensitive-fields') - ->desc('Update project team show sensitive fields') +App::patch('/v1/projects/:projectId/auth/teams-sensitive-attributes') + ->desc('Update project team sensitive attributes') ->groups(['api', 'projects']) ->label('scope', 'projects.write') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateTeamsShowSensitiveFields') + ->label('sdk.method', 'updateTeamsSensitiveAttributes') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_PROJECT) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('teamsShowSensitiveFields', true, new Boolean(true), 'Set to true to hide sensitive fields from team members.') + ->param('enabled', true, new Boolean(true), 'Set to true to show sensitive attributes to team members.') ->inject('response') ->inject('dbForConsole') - ->action(function (string $projectId, bool $teamsShowSensitiveFields, Response $response, Database $dbForConsole) { + ->action(function (string $projectId, bool $enabled, Response $response, Database $dbForConsole) { $project = $dbForConsole->getDocument('projects', $projectId); @@ -672,7 +674,8 @@ App::patch('/v1/projects/:projectId/auth/teams-hide-sensitive-fields') } $auths = $project->getAttribute('auths', []); - $auths['teamsShowSensitiveFields'] = $teamsShowSensitiveFields; + + $auths['teamsSensitiveAttributes'] = $enabled; $dbForConsole->updateDocument('projects', $project->getId(), $project ->setAttribute('auths', $auths)); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index b1ffe40c9f..8320f3de9f 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -791,13 +791,13 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn (Document $membership) => !empty($membership->getAttribute('userId'))); - $showSensitiveFields = $project->getAttribute('auths', [])['teamsShowSensitiveFields'] ?? true; + $sensitiveAttributes = $project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true; - $memberships = array_map(function ($membership) use ($dbForProject, $team, $showSensitiveFields) { + $memberships = array_map(function ($membership) use ($dbForProject, $team, $sensitiveAttributes) { $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); $membership->setAttribute('teamName', $team->getAttribute('name')); - if ($showSensitiveFields) { + if ($sensitiveAttributes) { $mfa = $user->getAttribute('mfa', false); if ($mfa) { $totp = TOTP::getAuthenticatorFromUser($user); diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index 23a334c222..c6f44df3f5 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -151,9 +151,9 @@ class Project extends Model 'default' => false, 'example' => true, ]) - ->addRule('teamsShowSensitiveFields', [ + ->addRule('teamsSensitiveAttributes', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Whether or not to hide sensitive data in the teams API.', + 'description' => 'Whether or not to show sensitive attributes in the teams API.', 'default' => false, 'example' => true, ]) diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 924812b4e5..463f6ecf66 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -134,16 +134,15 @@ trait TeamsBaseClient * Update project settings to hide sensitive fields */ $projectId = $this->getProject()['$id']; - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-hide-sensitive-fields', array_merge([ + + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', 'x-appwrite-key' => $this->getRoot()['secret'], ]), [ - 'teamsShowSensitiveFields' => false, + 'enabled' => false, ]); - $this->assertEquals(200, $response['headers']['status-code']); - /** * Test that sensitive fields are hidden */ @@ -164,12 +163,12 @@ trait TeamsBaseClient /** * Update project settings to show sensitive fields */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-hide-sensitive-fields', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', 'x-appwrite-key' => $this->getRoot()['secret'], ]), [ - 'teamsShowSensitiveFields' => true, + 'enabled' => true, ]); $this->assertEquals(200, $response['headers']['status-code']); From 8ecc2058a16ac9c552c0ca5bf71d51c9dd043a6b Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 17:19:56 +0100 Subject: [PATCH 35/66] fix: tests --- tests/e2e/Services/Teams/TeamsBaseClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 463f6ecf66..911157b4ad 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -138,7 +138,7 @@ trait TeamsBaseClient $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', - 'x-appwrite-key' => $this->getRoot()['secret'], + 'x-appwrite-key' => $this->getProject()['apiKey'], ]), [ 'enabled' => false, ]); @@ -166,7 +166,7 @@ trait TeamsBaseClient $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', - 'x-appwrite-key' => $this->getRoot()['secret'], + 'x-appwrite-key' => $this->getProject()['apiKey'], ]), [ 'enabled' => true, ]); From 71879236b8f2c401a5432961094833b666b2a22c Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 17:42:01 +0100 Subject: [PATCH 36/66] fix: disable test --- app/controllers/api/projects.php | 4 +--- tests/e2e/Services/Teams/TeamsBaseClient.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index d1d4227f6f..59817edddc 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -111,9 +111,7 @@ App::post('/v1/projects') 'personalDataCheck' => false, 'mockNumbers' => [], 'sessionAlerts' => false, - 'teamsShowMfa' => true, - 'teamsShowName' => true, - 'teamsShowEmail' => true, + 'teamsSensitiveAttributes' => true, ]; foreach ($auth as $method) { diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 911157b4ad..750b55b798 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -140,7 +140,7 @@ trait TeamsBaseClient 'x-appwrite-project' => 'console', 'x-appwrite-key' => $this->getProject()['apiKey'], ]), [ - 'enabled' => false, + 'enabled' => 'false', ]); /** From 9d1f366161d581a844dfca98f57e4bf29aae9846 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 17:59:14 +0100 Subject: [PATCH 37/66] fix: console --- app/controllers/api/teams.php | 14 ++++++++++---- tests/e2e/Services/Teams/TeamsBaseClient.php | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 8320f3de9f..a9e5117a02 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -728,15 +728,23 @@ App::get('/v1/teams/:teamId/memberships') ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('project') + ->inject('dbForConsole') ->inject('dbForProject') - ->action(function (string $teamId, array $queries, string $search, Response $response, Document $project, Database $dbForProject) { - + ->action(function (string $teamId, array $queries, string $search, Response $response, Document $project, Database $dbForConsole, Database $dbForProject) { $team = $dbForProject->getDocument('teams', $teamId); if ($team->isEmpty()) { throw new Exception(Exception::TEAM_NOT_FOUND); } + $project = $dbForConsole->getDocument('projects', $project->getId()); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + $sensitiveAttributes = $project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true; + try { $queries = Query::parseQueries($queries); } catch (QueryException $e) { @@ -791,8 +799,6 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn (Document $membership) => !empty($membership->getAttribute('userId'))); - $sensitiveAttributes = $project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true; - $memberships = array_map(function ($membership) use ($dbForProject, $team, $sensitiveAttributes) { $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); $membership->setAttribute('teamName', $team->getAttribute('name')); diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 750b55b798..ab29de8c26 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -140,7 +140,7 @@ trait TeamsBaseClient 'x-appwrite-project' => 'console', 'x-appwrite-key' => $this->getProject()['apiKey'], ]), [ - 'enabled' => 'false', + 'enabled' => false, ]); /** @@ -156,7 +156,7 @@ trait TeamsBaseClient $this->assertNotEmpty($response['body']['memberships'][0]['$id']); // Assert that sensitive fields are not present - $this->assertArrayNotHasKey('userName', $response['body']['memberships'][0]); + $this->assertArrayNotHasKey('userName', $response['body']['memberships'][0], 'userName was present: ' . $response['body']['memberships'][0]['userName']); $this->assertArrayNotHasKey('userEmail', $response['body']['memberships'][0]); $this->assertArrayNotHasKey('mfa', $response['body']['memberships'][0]); From 6fd54d646a0b4ae7a00e0173f258e17de1a7e345 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 18:05:33 +0100 Subject: [PATCH 38/66] fix: tests --- app/controllers/api/teams.php | 9 +-------- src/Appwrite/Utopia/Response/Model/Project.php | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index a9e5117a02..3cdbc76599 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -728,21 +728,14 @@ App::get('/v1/teams/:teamId/memberships') ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('project') - ->inject('dbForConsole') ->inject('dbForProject') - ->action(function (string $teamId, array $queries, string $search, Response $response, Document $project, Database $dbForConsole, Database $dbForProject) { + ->action(function (string $teamId, array $queries, string $search, Response $response, Document $project, Database $dbForProject) { $team = $dbForProject->getDocument('teams', $teamId); if ($team->isEmpty()) { throw new Exception(Exception::TEAM_NOT_FOUND); } - $project = $dbForConsole->getDocument('projects', $project->getId()); - - if ($project->isEmpty()) { - throw new Exception(Exception::PROJECT_NOT_FOUND); - } - $sensitiveAttributes = $project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true; try { diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index c6f44df3f5..78e36c5f92 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -354,7 +354,7 @@ class Project extends Model $document->setAttribute('authPersonalDataCheck', $authValues['personalDataCheck'] ?? false); $document->setAttribute('authMockNumbers', $authValues['mockNumbers'] ?? []); $document->setAttribute('authSessionAlerts', $authValues['sessionAlerts'] ?? false); - $document->setAttribute('authTeamsShowSensitiveFields', $authValues['teamsShowSensitiveFields'] ?? false); + $document->setAttribute('authTeamsSensistiveAttributes', $authValues['teamsSensistiveAttributes'] ?? true); foreach ($auth as $index => $method) { $key = $method['key']; From bd940254027c37b9a8ac283bb62164c9590b2d4c Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 18:07:08 +0100 Subject: [PATCH 39/66] fix: typo --- src/Appwrite/Utopia/Response/Model/Project.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index 78e36c5f92..95c18cbcdf 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -354,7 +354,7 @@ class Project extends Model $document->setAttribute('authPersonalDataCheck', $authValues['personalDataCheck'] ?? false); $document->setAttribute('authMockNumbers', $authValues['mockNumbers'] ?? []); $document->setAttribute('authSessionAlerts', $authValues['sessionAlerts'] ?? false); - $document->setAttribute('authTeamsSensistiveAttributes', $authValues['teamsSensistiveAttributes'] ?? true); + $document->setAttribute('authTeamsSensitiveAttributes', $authValues['teamsSensitiveAttributes'] ?? false); foreach ($auth as $index => $method) { $key = $method['key']; From 6bd641d70ebed21f0972cb150d50b891132bd2b0 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 18:11:06 +0100 Subject: [PATCH 40/66] fix: default --- src/Appwrite/Utopia/Response/Model/Project.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index 95c18cbcdf..50bc1f300f 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -354,7 +354,7 @@ class Project extends Model $document->setAttribute('authPersonalDataCheck', $authValues['personalDataCheck'] ?? false); $document->setAttribute('authMockNumbers', $authValues['mockNumbers'] ?? []); $document->setAttribute('authSessionAlerts', $authValues['sessionAlerts'] ?? false); - $document->setAttribute('authTeamsSensitiveAttributes', $authValues['teamsSensitiveAttributes'] ?? false); + $document->setAttribute('authTeamsSensitiveAttributes', $authValues['teamsSensitiveAttributes'] ?? true); foreach ($auth as $index => $method) { $key = $method['key']; From 0e254618f6617056cebbd036821b719a588f513c Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 18:37:48 +0100 Subject: [PATCH 41/66] fix: tests --- app/controllers/api/projects.php | 3 +++ app/controllers/api/teams.php | 11 +++++++---- src/Appwrite/Utopia/Response.php | 3 +-- src/Appwrite/Utopia/Response/Model/Membership.php | 6 +++--- tests/e2e/Services/Teams/TeamsBaseClient.php | 8 +++++--- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 59817edddc..8c23cd8e0d 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -20,6 +20,7 @@ use Utopia\Abuse\Adapters\Database\TimeLimit; use Utopia\App; use Utopia\Audit\Audit; use Utopia\Cache\Cache; +use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\DateTime; @@ -664,6 +665,8 @@ App::patch('/v1/projects/:projectId/auth/teams-sensitive-attributes') ->inject('response') ->inject('dbForConsole') ->action(function (string $projectId, bool $enabled, Response $response, Database $dbForConsole) { + $enabled = \strval($enabled) === 'true' || \strval($enabled) === '1'; + Console::log('enabled was set to: ' . strval($enabled)); $project = $dbForConsole->getDocument('projects', $projectId); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 3cdbc76599..5d5ba27361 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -20,6 +20,7 @@ use Appwrite\Utopia\Response; use MaxMind\Db\Reader; use Utopia\App; use Utopia\Audit\Audit; +use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\DateTime; @@ -809,12 +810,14 @@ App::get('/v1/teams/:teamId/memberships') } } - $membership - ->setAttribute('mfa', $mfa) - ->setAttribute('userName', $user->getAttribute('name')) - ->setAttribute('userEmail', $user->getAttribute('email')); + } + $membership + ->setAttribute('mfa', $sensitiveAttributes ? $mfa : null) + ->setAttribute('userName', $sensitiveAttributes ? $user->getAttribute('name') : null) + ->setAttribute('userEmail', $sensitiveAttributes ? $user->getAttribute('email') : null); + return $membership; }, $memberships); diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 6cc2639f51..7b28e6ba0c 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -625,8 +625,7 @@ class Response extends SwooleResponse } } - if (!$data->isSet($key) && !$rule['required']) { // set output key null if data key is not set and required is false - $output[$key] = null; + if (!$data->isSet($key) && !$rule['required']) { // do nothing data key is not set and required is false continue; } diff --git a/src/Appwrite/Utopia/Response/Model/Membership.php b/src/Appwrite/Utopia/Response/Model/Membership.php index 64283bd4a8..42dfb602d6 100644 --- a/src/Appwrite/Utopia/Response/Model/Membership.php +++ b/src/Appwrite/Utopia/Response/Model/Membership.php @@ -37,14 +37,14 @@ class Membership extends Model ->addRule('userName', [ 'type' => self::TYPE_STRING, 'description' => 'User name.', - 'default' => '', 'example' => 'John Doe', + 'required' => false, ]) ->addRule('userEmail', [ 'type' => self::TYPE_STRING, 'description' => 'User email address.', - 'default' => '', 'example' => 'john@appwrite.io', + 'required' => false, ]) ->addRule('teamId', [ 'type' => self::TYPE_STRING, @@ -79,8 +79,8 @@ class Membership extends Model ->addRule('mfa', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Multi factor authentication status, true if the user has MFA enabled or false otherwise.', - 'default' => false, 'example' => false, + 'required' => false, ]) ->addRule('roles', [ 'type' => self::TYPE_STRING, diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index ab29de8c26..e8ec350fc5 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -138,11 +138,13 @@ trait TeamsBaseClient $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', - 'x-appwrite-key' => $this->getProject()['apiKey'], + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], ]), [ 'enabled' => false, ]); + $this->assertEquals(200, $response['headers']['status-code']); + /** * Test that sensitive fields are hidden */ @@ -156,7 +158,7 @@ trait TeamsBaseClient $this->assertNotEmpty($response['body']['memberships'][0]['$id']); // Assert that sensitive fields are not present - $this->assertArrayNotHasKey('userName', $response['body']['memberships'][0], 'userName was present: ' . $response['body']['memberships'][0]['userName']); + $this->assertArrayNotHasKey('userName', $response['body']['memberships'][0]); $this->assertArrayNotHasKey('userEmail', $response['body']['memberships'][0]); $this->assertArrayNotHasKey('mfa', $response['body']['memberships'][0]); @@ -166,7 +168,7 @@ trait TeamsBaseClient $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', - 'x-appwrite-key' => $this->getProject()['apiKey'], + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], ]), [ 'enabled' => true, ]); From d27a7189c733d38f9b6c7afcaa5e99b1ea1a1569 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 5 Nov 2024 19:46:22 +0100 Subject: [PATCH 42/66] fix: stash --- app/controllers/api/teams.php | 61 +++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 5d5ba27361..cd6f40ee1c 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -737,8 +737,6 @@ App::get('/v1/teams/:teamId/memberships') throw new Exception(Exception::TEAM_NOT_FOUND); } - $sensitiveAttributes = $project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true; - try { $queries = Query::parseQueries($queries); } catch (QueryException $e) { @@ -793,11 +791,16 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn (Document $membership) => !empty($membership->getAttribute('userId'))); - $memberships = array_map(function ($membership) use ($dbForProject, $team, $sensitiveAttributes) { - $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); - $membership->setAttribute('teamName', $team->getAttribute('name')); + $roles = Authorization::getRoles(); + $isPrivilegedUser = Auth::isPrivilegedUser($roles); + $isAppUser = Auth::isAppUser($roles); + $sensitiveAttributes = ($isPrivilegedUser || $isAppUser) || $project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true; + + $memberships = array_map(function ($membership) use ($dbForProject, $team, $sensitiveAttributes) { if ($sensitiveAttributes) { + $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); + $mfa = $user->getAttribute('mfa', false); if ($mfa) { $totp = TOTP::getAuthenticatorFromUser($user); @@ -808,16 +811,16 @@ App::get('/v1/teams/:teamId/memberships') if (!$totpEnabled && !$emailEnabled && !$phoneEnabled) { $mfa = false; } + + $membership->setAttribute('mfa', $mfa); } - + $membership + ->setAttribute('userName', $user->getAttribute('name')) + ->setAttribute('userEmail', $user->getAttribute('email')); } - $membership - ->setAttribute('mfa', $sensitiveAttributes ? $mfa : null) - ->setAttribute('userName', $sensitiveAttributes ? $user->getAttribute('name') : null) - ->setAttribute('userEmail', $sensitiveAttributes ? $user->getAttribute('email') : null); - + $membership->setAttribute('teamName', $team->getAttribute('name')); return $membership; }, $memberships); @@ -843,8 +846,9 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') ->param('teamId', '', new UID(), 'Team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') ->inject('response') + ->inject('project') ->inject('dbForProject') - ->action(function (string $teamId, string $membershipId, Response $response, Database $dbForProject) { + ->action(function (string $teamId, string $membershipId, Response $response, Document $project, Database $dbForProject) { $team = $dbForProject->getDocument('teams', $teamId); @@ -858,27 +862,30 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') throw new Exception(Exception::MEMBERSHIP_NOT_FOUND); } - $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); + $roles = Authorization::getRoles(); + $isPrivilegedUser = Auth::isPrivilegedUser($roles); + $isAppUser = Auth::isAppUser($roles); - $mfa = $user->getAttribute('mfa', false); + $sensitiveAttributes = ($isPrivilegedUser || $isAppUser) || $project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true; - if ($mfa) { - $totp = TOTP::getAuthenticatorFromUser($user); - $totpEnabled = $totp && $totp->getAttribute('verified', false); - $emailEnabled = $user->getAttribute('email', false) && $user->getAttribute('emailVerification', false); - $phoneEnabled = $user->getAttribute('phone', false) && $user->getAttribute('phoneVerification', false); + if ($sensitiveAttributes) { + $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); - if (!$totpEnabled && !$emailEnabled && !$phoneEnabled) { - $mfa = false; + $mfa = $user->getAttribute('mfa', false); + + if ($mfa) { + $totp = TOTP::getAuthenticatorFromUser($user); + $totpEnabled = $totp && $totp->getAttribute('verified', false); + $emailEnabled = $user->getAttribute('email', false) && $user->getAttribute('emailVerification', false); + $phoneEnabled = $user->getAttribute('phone', false) && $user->getAttribute('phoneVerification', false); + + if (!$totpEnabled && !$emailEnabled && !$phoneEnabled) { + $mfa = false; + } } } - $membership - ->setAttribute('mfa', $mfa) - ->setAttribute('teamName', $team->getAttribute('name')) - ->setAttribute('userName', $user->getAttribute('name')) - ->setAttribute('userEmail', $user->getAttribute('email')) - ; + $membership->setAttribute('teamName', $team->getAttribute('name')); $response->dynamic($membership, Response::MODEL_MEMBERSHIP); }); From c6b297dc82064f785b6cb32986d578b01e4f1c9c Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 6 Nov 2024 15:05:04 +1300 Subject: [PATCH 43/66] Update database for transaction counter fixes with retries --- composer.json | 4 +-- composer.lock | 72 +++++++++++++++++++++++++-------------------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/composer.json b/composer.json index 5a2df912fd..dbd1575919 100644 --- a/composer.json +++ b/composer.json @@ -48,10 +48,10 @@ "utopia-php/abuse": "0.43.0", "utopia-php/analytics": "0.10.*", "utopia-php/audit": "0.43.0", - "utopia-php/cache": "0.10.*", + "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.53.13", + "utopia-php/database": "0.53.15", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index 452aefd26f..995afcd426 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f6eb364e8504ebc2f6c9fe38d75f7e86", + "content-hash": "fb924a3640fb2c2e6e273718415f8205", "packages": [ { "name": "adhocore/jwt", @@ -1574,16 +1574,16 @@ }, { "name": "utopia-php/cache", - "version": "0.10.2", + "version": "0.11.0", "source": { "type": "git", "url": "https://github.com/utopia-php/cache.git", - "reference": "b22c6eb6d308de246b023efd0fc9758aee8b8247" + "reference": "8ebcab5aac7606331cef69b0081f6c9eff2e58bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/b22c6eb6d308de246b023efd0fc9758aee8b8247", - "reference": "b22c6eb6d308de246b023efd0fc9758aee8b8247", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/8ebcab5aac7606331cef69b0081f6c9eff2e58bc", + "reference": "8ebcab5aac7606331cef69b0081f6c9eff2e58bc", "shasum": "" }, "require": { @@ -1594,7 +1594,7 @@ }, "require-dev": { "laravel/pint": "1.2.*", - "phpstan/phpstan": "1.9.x-dev", + "phpstan/phpstan": "^1.12", "phpunit/phpunit": "^9.3", "vimeo/psalm": "4.13.1" }, @@ -1618,9 +1618,9 @@ ], "support": { "issues": "https://github.com/utopia-php/cache/issues", - "source": "https://github.com/utopia-php/cache/tree/0.10.2" + "source": "https://github.com/utopia-php/cache/tree/0.11.0" }, - "time": "2024-06-25T20:36:35+00:00" + "time": "2024-11-05T16:53:58+00:00" }, { "name": "utopia-php/cli", @@ -1724,23 +1724,23 @@ }, { "name": "utopia-php/database", - "version": "0.53.13", + "version": "0.53.15", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "a7e5de257e36e1b804d35b307865dd4036baa33e" + "reference": "2ed56d0e889f4612e54339cf55c1b751e5fe8d8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/a7e5de257e36e1b804d35b307865dd4036baa33e", - "reference": "a7e5de257e36e1b804d35b307865dd4036baa33e", + "url": "https://api.github.com/repos/utopia-php/database/zipball/2ed56d0e889f4612e54339cf55c1b751e5fe8d8f", + "reference": "2ed56d0e889f4612e54339cf55c1b751e5fe8d8f", "shasum": "" }, "require": { "ext-mbstring": "*", "ext-pdo": "*", "php": ">=8.3", - "utopia-php/cache": "0.10.*", + "utopia-php/cache": "0.11.*", "utopia-php/framework": "0.33.*", "utopia-php/mongo": "0.3.*" }, @@ -1774,9 +1774,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.53.13" + "source": "https://github.com/utopia-php/database/tree/0.53.15" }, - "time": "2024-11-05T10:08:05+00:00" + "time": "2024-11-06T01:48:19+00:00" }, { "name": "utopia-php/domains", @@ -2495,16 +2495,16 @@ }, { "name": "utopia-php/queue", - "version": "0.7.0", + "version": "0.7.1", "source": { "type": "git", "url": "https://github.com/utopia-php/queue.git", - "reference": "917565256eb94bcab7246f7a746b1a486813761b" + "reference": "94c240d9f6383829807ce7b2d737f04b159fd3e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/917565256eb94bcab7246f7a746b1a486813761b", - "reference": "917565256eb94bcab7246f7a746b1a486813761b", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/94c240d9f6383829807ce7b2d737f04b159fd3e8", + "reference": "94c240d9f6383829807ce7b2d737f04b159fd3e8", "shasum": "" }, "require": { @@ -2550,9 +2550,9 @@ ], "support": { "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/0.7.0" + "source": "https://github.com/utopia-php/queue/tree/0.7.1" }, - "time": "2024-01-17T19:00:43+00:00" + "time": "2024-11-05T17:00:38+00:00" }, { "name": "utopia-php/registry", @@ -2770,22 +2770,22 @@ }, { "name": "utopia-php/vcs", - "version": "0.8.2", + "version": "0.8.3", "source": { "type": "git", "url": "https://github.com/utopia-php/vcs.git", - "reference": "eb9b7eade1a46a4f660e0d5a6304f7fa26ec9d18" + "reference": "a032ed0611a8f4467aeaa9484f73223074457337" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/vcs/zipball/eb9b7eade1a46a4f660e0d5a6304f7fa26ec9d18", - "reference": "eb9b7eade1a46a4f660e0d5a6304f7fa26ec9d18", + "url": "https://api.github.com/repos/utopia-php/vcs/zipball/a032ed0611a8f4467aeaa9484f73223074457337", + "reference": "a032ed0611a8f4467aeaa9484f73223074457337", "shasum": "" }, "require": { "adhocore/jwt": "^1.1", "php": ">=8.0", - "utopia-php/cache": "^0.10.0", + "utopia-php/cache": "^0.11.0", "utopia-php/framework": "0.*.*" }, "require-dev": { @@ -2813,9 +2813,9 @@ ], "support": { "issues": "https://github.com/utopia-php/vcs/issues", - "source": "https://github.com/utopia-php/vcs/tree/0.8.2" + "source": "https://github.com/utopia-php/vcs/tree/0.8.3" }, - "time": "2024-08-13T14:36:30+00:00" + "time": "2024-11-05T17:10:09+00:00" }, { "name": "utopia-php/websocket", @@ -4004,16 +4004,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.4.1", + "version": "5.5.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" + "reference": "54e10d44fc1a84e2598d26f70d4f6f1f233e228a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/54e10d44fc1a84e2598d26f70d4f6f1f233e228a", + "reference": "54e10d44fc1a84e2598d26f70d4f6f1f233e228a", "shasum": "" }, "require": { @@ -4026,13 +4026,13 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.5", + "mockery/mockery": "~1.3.5 || ~1.6.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.8", "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-webmozart-assert": "^1.2", "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^5.13" + "psalm/phar": "^5.26" }, "type": "library", "extra": { @@ -4062,9 +4062,9 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.5.0" }, - "time": "2024-05-21T05:55:05+00:00" + "time": "2024-11-04T21:26:31+00:00" }, { "name": "phpdocumentor/type-resolver", From 0f6aa3d5b1ebfef6b8f8536b5cf204f13d32853b Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 6 Nov 2024 15:45:26 +1300 Subject: [PATCH 44/66] Fix trivy scans --- .github/workflows/nightly.yml | 45 +++++++++++++++++++++++++++++++++-- .github/workflows/pr-scan.yml | 10 ++++++-- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 80d880244c..22e28f01b8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,6 +5,36 @@ on: workflow_dispatch: jobs: + update-trivy-db: + runs-on: ubuntu-latest + steps: + - name: Setup oras + uses: oras-project/setup-oras@v1 + + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Download and extract the vulnerability DB + run: | + mkdir -p $GITHUB_WORKSPACE/.cache/trivy/db + oras pull ghcr.io/aquasecurity/trivy-db:2 + tar -xzf db.tar.gz -C $GITHUB_WORKSPACE/.cache/trivy/db + rm db.tar.gz + + - name: Download and extract the Java DB + run: | + mkdir -p $GITHUB_WORKSPACE/.cache/trivy/java-db + oras pull ghcr.io/aquasecurity/trivy-java-db:1 + tar -xzf javadb.tar.gz -C $GITHUB_WORKSPACE/.cache/trivy/java-db + rm javadb.tar.gz + + - name: Cache DBs + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/.cache/trivy + key: cache-trivy-${{ steps.date.outputs.date }} + scan-image: name: Scan Docker Image runs-on: ubuntu-latest @@ -13,16 +43,22 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + - name: Build the Docker image run: docker build . -t appwrite_image:latest + - name: Run Trivy vulnerability scanner on image - uses: aquasecurity/trivy-action@0.20.0 + uses: aquasecurity/trivy-action@0.28.0 with: image-ref: 'appwrite_image:latest' format: 'sarif' output: 'trivy-image-results.sarif' ignore-unfixed: 'false' severity: 'CRITICAL,HIGH' + env: + TRIVY_SKIP_DB_UPDATE: true + TRIVY_SKIP_JAVA_DB_UPDATE: true + - name: Upload Docker Image Scan Results uses: github/codeql-action/upload-sarif@v2 with: @@ -34,13 +70,18 @@ jobs: steps: - name: Check out code uses: actions/checkout@v4 + - name: Run Trivy vulnerability scanner on filesystem - uses: aquasecurity/trivy-action@0.20.0 + uses: aquasecurity/trivy-action@0.28.0 with: scan-type: 'fs' format: 'sarif' output: 'trivy-fs-results.sarif' severity: 'CRITICAL,HIGH' + env: + TRIVY_SKIP_DB_UPDATE: true + TRIVY_SKIP_JAVA_DB_UPDATE: true + - name: Upload Code Scan Results uses: github/codeql-action/upload-sarif@v2 with: diff --git a/.github/workflows/pr-scan.yml b/.github/workflows/pr-scan.yml index eded58985d..1289efce11 100644 --- a/.github/workflows/pr-scan.yml +++ b/.github/workflows/pr-scan.yml @@ -26,21 +26,27 @@ jobs: tags: pr_image:${{ github.sha }} - name: Run Trivy vulnerability scanner on image - uses: aquasecurity/trivy-action@0.20.0 + uses: aquasecurity/trivy-action@0.28.0 with: image-ref: 'pr_image:${{ github.sha }}' format: 'json' output: 'trivy-image-results.json' severity: 'CRITICAL,HIGH' + env: + TRIVY_SKIP_DB_UPDATE: true + TRIVY_SKIP_JAVA_DB_UPDATE: true - name: Run Trivy vulnerability scanner on source code - uses: aquasecurity/trivy-action@0.20.0 + uses: aquasecurity/trivy-action@0.28.0 with: scan-type: 'fs' scan-ref: '.' format: 'json' output: 'trivy-fs-results.json' severity: 'CRITICAL,HIGH' + env: + TRIVY_SKIP_DB_UPDATE: true + TRIVY_SKIP_JAVA_DB_UPDATE: true - name: Process Trivy scan results id: process-results From 90f63a30f61097d1c33ace3eac284953209c8956 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 6 Nov 2024 16:24:55 +1300 Subject: [PATCH 45/66] Revert "Fix trivy scans" This reverts commit 0f6aa3d5b1ebfef6b8f8536b5cf204f13d32853b. --- .github/workflows/nightly.yml | 45 ++--------------------------------- .github/workflows/pr-scan.yml | 10 ++------ 2 files changed, 4 insertions(+), 51 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 22e28f01b8..80d880244c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,36 +5,6 @@ on: workflow_dispatch: jobs: - update-trivy-db: - runs-on: ubuntu-latest - steps: - - name: Setup oras - uses: oras-project/setup-oras@v1 - - - name: Get current date - id: date - run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT - - - name: Download and extract the vulnerability DB - run: | - mkdir -p $GITHUB_WORKSPACE/.cache/trivy/db - oras pull ghcr.io/aquasecurity/trivy-db:2 - tar -xzf db.tar.gz -C $GITHUB_WORKSPACE/.cache/trivy/db - rm db.tar.gz - - - name: Download and extract the Java DB - run: | - mkdir -p $GITHUB_WORKSPACE/.cache/trivy/java-db - oras pull ghcr.io/aquasecurity/trivy-java-db:1 - tar -xzf javadb.tar.gz -C $GITHUB_WORKSPACE/.cache/trivy/java-db - rm javadb.tar.gz - - - name: Cache DBs - uses: actions/cache/save@v4 - with: - path: ${{ github.workspace }}/.cache/trivy - key: cache-trivy-${{ steps.date.outputs.date }} - scan-image: name: Scan Docker Image runs-on: ubuntu-latest @@ -43,22 +13,16 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - - name: Build the Docker image run: docker build . -t appwrite_image:latest - - name: Run Trivy vulnerability scanner on image - uses: aquasecurity/trivy-action@0.28.0 + uses: aquasecurity/trivy-action@0.20.0 with: image-ref: 'appwrite_image:latest' format: 'sarif' output: 'trivy-image-results.sarif' ignore-unfixed: 'false' severity: 'CRITICAL,HIGH' - env: - TRIVY_SKIP_DB_UPDATE: true - TRIVY_SKIP_JAVA_DB_UPDATE: true - - name: Upload Docker Image Scan Results uses: github/codeql-action/upload-sarif@v2 with: @@ -70,18 +34,13 @@ jobs: steps: - name: Check out code uses: actions/checkout@v4 - - name: Run Trivy vulnerability scanner on filesystem - uses: aquasecurity/trivy-action@0.28.0 + uses: aquasecurity/trivy-action@0.20.0 with: scan-type: 'fs' format: 'sarif' output: 'trivy-fs-results.sarif' severity: 'CRITICAL,HIGH' - env: - TRIVY_SKIP_DB_UPDATE: true - TRIVY_SKIP_JAVA_DB_UPDATE: true - - name: Upload Code Scan Results uses: github/codeql-action/upload-sarif@v2 with: diff --git a/.github/workflows/pr-scan.yml b/.github/workflows/pr-scan.yml index 1289efce11..eded58985d 100644 --- a/.github/workflows/pr-scan.yml +++ b/.github/workflows/pr-scan.yml @@ -26,27 +26,21 @@ jobs: tags: pr_image:${{ github.sha }} - name: Run Trivy vulnerability scanner on image - uses: aquasecurity/trivy-action@0.28.0 + uses: aquasecurity/trivy-action@0.20.0 with: image-ref: 'pr_image:${{ github.sha }}' format: 'json' output: 'trivy-image-results.json' severity: 'CRITICAL,HIGH' - env: - TRIVY_SKIP_DB_UPDATE: true - TRIVY_SKIP_JAVA_DB_UPDATE: true - name: Run Trivy vulnerability scanner on source code - uses: aquasecurity/trivy-action@0.28.0 + uses: aquasecurity/trivy-action@0.20.0 with: scan-type: 'fs' scan-ref: '.' format: 'json' output: 'trivy-fs-results.json' severity: 'CRITICAL,HIGH' - env: - TRIVY_SKIP_DB_UPDATE: true - TRIVY_SKIP_JAVA_DB_UPDATE: true - name: Process Trivy scan results id: process-results From 59674fa90891f6065f79499432916e6d3c883e79 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 6 Nov 2024 16:32:31 +1300 Subject: [PATCH 46/66] Update database --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index dbd1575919..a04ca51d43 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.53.15", + "utopia-php/database": "0.53.16", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index 995afcd426..6dce436601 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fb924a3640fb2c2e6e273718415f8205", + "content-hash": "b358198535c1867eabed7c0f99135a57", "packages": [ { "name": "adhocore/jwt", @@ -1724,16 +1724,16 @@ }, { "name": "utopia-php/database", - "version": "0.53.15", + "version": "0.53.16", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "2ed56d0e889f4612e54339cf55c1b751e5fe8d8f" + "reference": "6661edffeef05b59e16d102b989a72f7f78cf7de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/2ed56d0e889f4612e54339cf55c1b751e5fe8d8f", - "reference": "2ed56d0e889f4612e54339cf55c1b751e5fe8d8f", + "url": "https://api.github.com/repos/utopia-php/database/zipball/6661edffeef05b59e16d102b989a72f7f78cf7de", + "reference": "6661edffeef05b59e16d102b989a72f7f78cf7de", "shasum": "" }, "require": { @@ -1774,9 +1774,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.53.15" + "source": "https://github.com/utopia-php/database/tree/0.53.16" }, - "time": "2024-11-06T01:48:19+00:00" + "time": "2024-11-06T03:07:16+00:00" }, { "name": "utopia-php/domains", From 46af6dc3f02e8a30a73e32664801ee860351f446 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 6 Nov 2024 09:36:27 +0200 Subject: [PATCH 47/66] Fix permissions --- app/controllers/api/databases.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 84a311e342..0114fd343c 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -816,22 +816,21 @@ App::post('/v1/databases/:databaseId/collections') $collectionId = $collectionId == 'unique()' ? ID::unique() : $collectionId; // Map aggregate permissions into the multiple permissions they represent. - $permissions = Permission::aggregate($permissions); + $permissions = Permission::aggregate($permissions) ?? []; try { - $dbForProject->createDocument('database_' . $database->getInternalId(), new Document([ + $collection = $dbForProject->createDocument('database_' . $database->getInternalId(), new Document([ '$id' => $collectionId, 'databaseInternalId' => $database->getInternalId(), 'databaseId' => $databaseId, - '$permissions' => $permissions ?? [], + '$permissions' => $permissions, 'documentSecurity' => $documentSecurity, 'enabled' => $enabled, 'name' => $name, 'search' => implode(' ', [$collectionId, $name]), ])); - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), permissions: $permissions ?? [], documentSecurity: $documentSecurity); + $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), permissions: $permissions, documentSecurity: $documentSecurity); } catch (DuplicateException) { throw new Exception(Exception::COLLECTION_ALREADY_EXISTS); } catch (LimitException) { From e219ee2d842317fc6200a5556307eadcb5db6fdd Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 6 Nov 2024 10:02:11 +0000 Subject: [PATCH 48/66] upgrade utopia storage --- composer.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/composer.lock b/composer.lock index 6dce436601..39f5753510 100644 --- a/composer.lock +++ b/composer.lock @@ -2608,16 +2608,16 @@ }, { "name": "utopia-php/storage", - "version": "0.18.5", + "version": "0.18.6", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "7d355c5e3ccc8ecebc0266f8ddd30088a43be919" + "reference": "893ccf06e183f8ece2aed8dbf14d64d6ba036071" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/7d355c5e3ccc8ecebc0266f8ddd30088a43be919", - "reference": "7d355c5e3ccc8ecebc0266f8ddd30088a43be919", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/893ccf06e183f8ece2aed8dbf14d64d6ba036071", + "reference": "893ccf06e183f8ece2aed8dbf14d64d6ba036071", "shasum": "" }, "require": { @@ -2657,9 +2657,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.18.5" + "source": "https://github.com/utopia-php/storage/tree/0.18.6" }, - "time": "2024-09-04T08:57:27+00:00" + "time": "2024-11-06T09:58:50+00:00" }, { "name": "utopia-php/swoole", @@ -5875,16 +5875,16 @@ }, { "name": "symfony/console", - "version": "v7.1.6", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57" + "reference": "3284aafcac338b6e86fd955ee4d794cbe434151a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", - "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", + "url": "https://api.github.com/repos/symfony/console/zipball/3284aafcac338b6e86fd955ee4d794cbe434151a", + "reference": "3284aafcac338b6e86fd955ee4d794cbe434151a", "shasum": "" }, "require": { @@ -5948,7 +5948,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.6" + "source": "https://github.com/symfony/console/tree/v7.1.7" }, "funding": [ { @@ -5964,7 +5964,7 @@ "type": "tidelift" } ], - "time": "2024-10-09T08:46:59+00:00" + "time": "2024-11-05T15:34:55+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6546,16 +6546,16 @@ }, { "name": "symfony/process", - "version": "v7.1.6", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e" + "reference": "9b8a40b7289767aa7117e957573c2a535efe6585" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", - "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", + "url": "https://api.github.com/repos/symfony/process/zipball/9b8a40b7289767aa7117e957573c2a535efe6585", + "reference": "9b8a40b7289767aa7117e957573c2a535efe6585", "shasum": "" }, "require": { @@ -6587,7 +6587,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.6" + "source": "https://github.com/symfony/process/tree/v7.1.7" }, "funding": [ { @@ -6603,7 +6603,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-06T09:25:12+00:00" }, { "name": "symfony/service-contracts", From b410b17ba61e451c0430c7fe5b3f28bec4236c95 Mon Sep 17 00:00:00 2001 From: Fabian Gruber Date: Thu, 31 Oct 2024 13:12:03 +0100 Subject: [PATCH 49/66] feat: redis-cluster support --- app/controllers/api/health.php | 6 ++-- app/init.php | 6 +++- app/realtime.php | 9 +++--- docker-compose.yml | 2 +- src/Appwrite/Messaging/Adapter/Realtime.php | 35 ++++++++++++--------- src/Appwrite/Platform/Tasks/Doctor.php | 2 ++ src/Appwrite/PubSub/Adapter.php | 13 ++++++++ src/Appwrite/PubSub/Adapter/Redis.php | 31 ++++++++++++++++++ tests/unit/Event/EventTest.php | 19 ++--------- tests/unit/Usage/StatsTest.php | 19 ++--------- 10 files changed, 85 insertions(+), 57 deletions(-) create mode 100644 src/Appwrite/PubSub/Adapter.php create mode 100644 src/Appwrite/PubSub/Adapter/Redis.php diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index f4581df8e4..60a8c0ca97 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -135,6 +135,7 @@ App::get('/v1/health/cache') foreach ($configs as $key => $config) { foreach ($config as $database) { try { + /** @var \Utopia\Cache\Adapter $adapter */ $adapter = $pools->get($database)->pop()->getResource(); $checkStart = \microtime(true); @@ -191,11 +192,11 @@ App::get('/v1/health/queue') foreach ($configs as $key => $config) { foreach ($config as $database) { + $checkStart = \microtime(true); try { + /** @var Connection $adapter */ $adapter = $pools->get($database)->pop()->getResource(); - $checkStart = \microtime(true); - if ($adapter->ping()) { $output[] = new Document([ 'name' => $key . " ($database)", @@ -249,6 +250,7 @@ App::get('/v1/health/pubsub') foreach ($configs as $key => $config) { foreach ($config as $database) { try { + /** @var \Appwrite\PubSub\Adapter $adapter */ $adapter = $pools->get($database)->pop()->getResource(); $checkStart = \microtime(true); diff --git a/app/init.php b/app/init.php index d062e218e9..c9ec2e0061 100644 --- a/app/init.php +++ b/app/init.php @@ -42,6 +42,7 @@ use Appwrite\Hooks\Hooks; use Appwrite\Network\Validator\Email; use Appwrite\Network\Validator\Origin; use Appwrite\OpenSSL\OpenSSL; +use Appwrite\PubSub\Adapter\Redis as PubSub; use Appwrite\URL\URL as AppwriteURL; use Appwrite\Utopia\Request; use MaxMind\Db\Reader; @@ -973,7 +974,10 @@ $register->set('pools', function () { $adapter->setDatabase($dsn->getPath()); break; case 'pubsub': - $adapter = $resource(); + $adapter = match ($dsn->getScheme()) { + 'redis' => new PubSub($resource()), + default => null + }; break; case 'queue': $adapter = match ($dsn->getScheme()) { diff --git a/app/realtime.php b/app/realtime.php index 1b59eb3bc7..d38192b83c 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -365,17 +365,16 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, } $start = time(); - $redis = $register->get('pools')->get('pubsub')->pop()->getResource(); /** @var Redis $redis */ - $redis->setOption(Redis::OPT_READ_TIMEOUT, -1); - - if ($redis->ping(true)) { + /** @var \Appwrite\PubSub\Adapter $pubsub */ + $pubsub = $register->get('pools')->get('pubsub')->pop()->getResource(); + if ($pubsub->ping(true)) { $attempts = 0; Console::success('Pub/sub connection established (worker: ' . $workerId . ')'); } else { Console::error('Pub/sub failed (worker: ' . $workerId . ')'); } - $redis->subscribe(['realtime'], function (Redis $redis, string $channel, string $payload) use ($server, $workerId, $stats, $register, $realtime) { + $pubsub->subscribe(['realtime'], function (mixed $redis, string $channel, string $payload) use ($server, $workerId, $stats, $register, $realtime) { $event = json_decode($payload, true); if ($event['permissionsChanged'] && isset($event['userId'])) { diff --git a/docker-compose.yml b/docker-compose.yml index 479ca38b8f..f2845dc137 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1053,4 +1053,4 @@ volumes: appwrite-certificates: appwrite-functions: appwrite-builds: - appwrite-config: + appwrite-config: \ No newline at end of file diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index c437d4d487..dceafacf6e 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -7,7 +7,6 @@ use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Role; -use Utopia\System\System; class Realtime extends Adapter { @@ -139,20 +138,26 @@ class Realtime extends Adapter $permissionsChanged = array_key_exists('permissionsChanged', $options) && $options['permissionsChanged']; $userId = array_key_exists('userId', $options) ? $options['userId'] : null; - $redis = new \Redis(); //TODO: make this part of the constructor - $redis->connect(System::getEnv('_APP_REDIS_HOST', ''), System::getEnv('_APP_REDIS_PORT', '')); - $redis->publish('realtime', json_encode([ - 'project' => $projectId, - 'roles' => $roles, - 'permissionsChanged' => $permissionsChanged, - 'userId' => $userId, - 'data' => [ - 'events' => $events, - 'channels' => $channels, - 'timestamp' => DateTime::formatTz(DateTime::now()), - 'payload' => $payload - ] - ])); + global $register; + $pubsub = $register->get('pools')->get('pubsub')->pop(); + try { + /** @var \Appwrite\PubSub\Adapter $redis */ + $redis = $pubsub->getResource(); + $redis->publish('realtime', json_encode([ + 'project' => $projectId, + 'roles' => $roles, + 'permissionsChanged' => $permissionsChanged, + 'userId' => $userId, + 'data' => [ + 'events' => $events, + 'channels' => $channels, + 'timestamp' => DateTime::formatTz(DateTime::now()), + 'payload' => $payload + ] + ])); + } finally { + $pubsub->reclaim(); + } } /** diff --git a/src/Appwrite/Platform/Tasks/Doctor.php b/src/Appwrite/Platform/Tasks/Doctor.php index 82d1ca2d59..c43afea527 100644 --- a/src/Appwrite/Platform/Tasks/Doctor.php +++ b/src/Appwrite/Platform/Tasks/Doctor.php @@ -3,6 +3,7 @@ namespace Appwrite\Platform\Tasks; use Appwrite\ClamAV\Network; +use Appwrite\PubSub\Adapter; use Utopia\App; use Utopia\CLI\Console; use Utopia\Config\Config; @@ -158,6 +159,7 @@ class Doctor extends Action foreach ($configs as $key => $config) { foreach ($config as $pool) { try { + /** @var Adapter $adapter */ $adapter = $pools->get($pool)->pop()->getResource(); if ($adapter->ping()) { diff --git a/src/Appwrite/PubSub/Adapter.php b/src/Appwrite/PubSub/Adapter.php new file mode 100644 index 0000000000..e5ddbe5e62 --- /dev/null +++ b/src/Appwrite/PubSub/Adapter.php @@ -0,0 +1,13 @@ +client = $client; + + } + + public function ping($message = null): bool + { + return $this->client->ping($message); + } + + public function subscribe($channels, $callback) + { + return $this->client->subscribe($channels, $callback); + } + + public function publish($channel, $message) + { + return $this->client->publish($channel, $message); + } +} diff --git a/tests/unit/Event/EventTest.php b/tests/unit/Event/EventTest.php index dd9833378f..079bb47b65 100644 --- a/tests/unit/Event/EventTest.php +++ b/tests/unit/Event/EventTest.php @@ -3,13 +3,9 @@ namespace Tests\Unit\Event; use Appwrite\Event\Event; -use Appwrite\URL\URL; use InvalidArgumentException; use PHPUnit\Framework\TestCase; -use Utopia\DSN\DSN; -use Utopia\Queue; use Utopia\Queue\Client; -use Utopia\System\System; require_once __DIR__ . '/../../../app/init.php'; @@ -20,19 +16,8 @@ class EventTest extends TestCase public function setUp(): void { - $fallbackForRedis = 'redis_main=' . URL::unparse([ - 'scheme' => 'redis', - 'host' => System::getEnv('_APP_REDIS_HOST', 'redis'), - 'port' => System::getEnv('_APP_REDIS_PORT', '6379'), - 'user' => System::getEnv('_APP_REDIS_USER', ''), - 'pass' => System::getEnv('_APP_REDIS_PASS', ''), - ]); - - $dsn = System::getEnv('_APP_CONNECTIONS_QUEUE', $fallbackForRedis); - $dsn = explode('=', $dsn); - $dsn = $dsn[1] ?? ''; - $dsn = new DSN($dsn); - $connection = new Queue\Connection\Redis($dsn->getHost(), $dsn->getPort()); + global $register; + $connection = $register->get('pools')->get('queue')->pop()->getResource(); $this->queue = 'v1-tests' . uniqid(); $this->object = new Event($connection); $this->object->setClass('TestsV1'); diff --git a/tests/unit/Usage/StatsTest.php b/tests/unit/Usage/StatsTest.php index 67e39d8974..79fa1f58ec 100644 --- a/tests/unit/Usage/StatsTest.php +++ b/tests/unit/Usage/StatsTest.php @@ -2,13 +2,9 @@ namespace Tests\Unit\Usage; -use Appwrite\URL\URL as AppwriteURL; use PHPUnit\Framework\TestCase; -use Utopia\DSN\DSN; -use Utopia\Queue; use Utopia\Queue\Client; use Utopia\Queue\Connection; -use Utopia\System\System; class StatsTest extends TestCase { @@ -19,18 +15,9 @@ class StatsTest extends TestCase public function setUp(): void { - $env = System::getEnv('_APP_CONNECTIONS_QUEUE', 'redis_main=' . AppwriteURL::unparse([ - 'scheme' => 'redis', - 'host' => System::getEnv('_APP_REDIS_HOST', 'redis'), - 'port' => System::getEnv('_APP_REDIS_PORT', '6379'), - 'user' => System::getEnv('_APP_REDIS_USER', ''), - 'pass' => System::getEnv('_APP_REDIS_PASS', ''), - ])); - - $dsn = explode('=', $env); - $dsn = count($dsn) > 1 ? $dsn[1] : $dsn[0]; - $dsn = new DSN($dsn); - $this->connection = new Queue\Connection\Redis($dsn->getHost(), $dsn->getPort()); + global $register; + $connection = $register->get('pools')->get('queue')->pop()->getResource(); + $this->connection = $connection; $this->client = new Client(self::QUEUE_NAME, $this->connection); } From 12b60e01cf19e38252663526b9df04a79750400b Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:51:15 +0100 Subject: [PATCH 50/66] fix: tests --- app/controllers/api/projects.php | 2 -- app/controllers/api/teams.php | 1 - src/Appwrite/Utopia/Response.php | 3 ++- src/Appwrite/Utopia/Response/Model/Membership.php | 6 +++--- tests/e2e/Services/Teams/TeamsBaseClient.php | 6 +++--- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 8c23cd8e0d..5fb774d12e 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -20,7 +20,6 @@ use Utopia\Abuse\Adapters\Database\TimeLimit; use Utopia\App; use Utopia\Audit\Audit; use Utopia\Cache\Cache; -use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\DateTime; @@ -666,7 +665,6 @@ App::patch('/v1/projects/:projectId/auth/teams-sensitive-attributes') ->inject('dbForConsole') ->action(function (string $projectId, bool $enabled, Response $response, Database $dbForConsole) { $enabled = \strval($enabled) === 'true' || \strval($enabled) === '1'; - Console::log('enabled was set to: ' . strval($enabled)); $project = $dbForConsole->getDocument('projects', $projectId); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index cd6f40ee1c..0051f14537 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -20,7 +20,6 @@ use Appwrite\Utopia\Response; use MaxMind\Db\Reader; use Utopia\App; use Utopia\Audit\Audit; -use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\DateTime; diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 7b28e6ba0c..6cc2639f51 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -625,7 +625,8 @@ class Response extends SwooleResponse } } - if (!$data->isSet($key) && !$rule['required']) { // do nothing data key is not set and required is false + if (!$data->isSet($key) && !$rule['required']) { // set output key null if data key is not set and required is false + $output[$key] = null; continue; } diff --git a/src/Appwrite/Utopia/Response/Model/Membership.php b/src/Appwrite/Utopia/Response/Model/Membership.php index 42dfb602d6..64283bd4a8 100644 --- a/src/Appwrite/Utopia/Response/Model/Membership.php +++ b/src/Appwrite/Utopia/Response/Model/Membership.php @@ -37,14 +37,14 @@ class Membership extends Model ->addRule('userName', [ 'type' => self::TYPE_STRING, 'description' => 'User name.', + 'default' => '', 'example' => 'John Doe', - 'required' => false, ]) ->addRule('userEmail', [ 'type' => self::TYPE_STRING, 'description' => 'User email address.', + 'default' => '', 'example' => 'john@appwrite.io', - 'required' => false, ]) ->addRule('teamId', [ 'type' => self::TYPE_STRING, @@ -79,8 +79,8 @@ class Membership extends Model ->addRule('mfa', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Multi factor authentication status, true if the user has MFA enabled or false otherwise.', + 'default' => false, 'example' => false, - 'required' => false, ]) ->addRule('roles', [ 'type' => self::TYPE_STRING, diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index e8ec350fc5..3d4a8c48e4 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -158,9 +158,9 @@ trait TeamsBaseClient $this->assertNotEmpty($response['body']['memberships'][0]['$id']); // Assert that sensitive fields are not present - $this->assertArrayNotHasKey('userName', $response['body']['memberships'][0]); - $this->assertArrayNotHasKey('userEmail', $response['body']['memberships'][0]); - $this->assertArrayNotHasKey('mfa', $response['body']['memberships'][0]); + $this->assertEmpty($response['body']['memberships'][0]['userName']); + $this->assertEmpty($response['body']['memberships'][0]['userEmail']); + $this->assertFalse($response['body']['memberships'][0]['mfa']); /** * Update project settings to show sensitive fields From 7fd5f8c93428f02e7b75e9a3ddab2b83a0b2f807 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:00:27 +0100 Subject: [PATCH 51/66] docs --- app/controllers/api/teams.php | 8 ++++++-- docs/references/teams/get-team-member.md | 2 +- docs/references/teams/list-team-members.md | 2 +- src/Appwrite/Utopia/Response/Model/Membership.php | 6 +++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 0051f14537..a12c8f5f9f 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -810,11 +810,10 @@ App::get('/v1/teams/:teamId/memberships') if (!$totpEnabled && !$emailEnabled && !$phoneEnabled) { $mfa = false; } - - $membership->setAttribute('mfa', $mfa); } $membership + ->setAttribute('mfa', $mfa) ->setAttribute('userName', $user->getAttribute('name')) ->setAttribute('userEmail', $user->getAttribute('email')); } @@ -882,6 +881,11 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') $mfa = false; } } + + $membership + ->setAttribute('mfa', $mfa) + ->setAttribute('userName', $user->getAttribute('name')) + ->setAttribute('userEmail', $user->getAttribute('email')); } $membership->setAttribute('teamName', $team->getAttribute('name')); diff --git a/docs/references/teams/get-team-member.md b/docs/references/teams/get-team-member.md index fab52c1a75..c3293be2ac 100644 --- a/docs/references/teams/get-team-member.md +++ b/docs/references/teams/get-team-member.md @@ -1 +1 @@ -Get a team member by the membership unique id. All team members have read access for this resource. \ No newline at end of file +Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console. \ No newline at end of file diff --git a/docs/references/teams/list-team-members.md b/docs/references/teams/list-team-members.md index d7dd04977f..af2645ac44 100644 --- a/docs/references/teams/list-team-members.md +++ b/docs/references/teams/list-team-members.md @@ -1 +1 @@ -Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. \ No newline at end of file +Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console. \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Model/Membership.php b/src/Appwrite/Utopia/Response/Model/Membership.php index 64283bd4a8..bafbc67118 100644 --- a/src/Appwrite/Utopia/Response/Model/Membership.php +++ b/src/Appwrite/Utopia/Response/Model/Membership.php @@ -36,13 +36,13 @@ class Membership extends Model ]) ->addRule('userName', [ 'type' => self::TYPE_STRING, - 'description' => 'User name.', + 'description' => 'User name. Hide this attribute by disabling teams sensitive data in the Console.', 'default' => '', 'example' => 'John Doe', ]) ->addRule('userEmail', [ 'type' => self::TYPE_STRING, - 'description' => 'User email address.', + 'description' => 'User email address. Hide this attribute by disabling teams sensitive data in the Console.', 'default' => '', 'example' => 'john@appwrite.io', ]) @@ -78,7 +78,7 @@ class Membership extends Model ]) ->addRule('mfa', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Multi factor authentication status, true if the user has MFA enabled or false otherwise.', + 'description' => 'Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.', 'default' => false, 'example' => false, ]) From cb70a51adbb0fd2f500a854b9d571b0fdbc29cba Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:35:31 +0100 Subject: [PATCH 52/66] fix: tests --- tests/e2e/Services/Teams/TeamsBaseClient.php | 62 ----------------- .../Services/Teams/TeamsConsoleClientTest.php | 67 +++++++++++++++++++ .../Services/Teams/TeamsCustomClientTest.php | 67 +++++++++++++++++++ 3 files changed, 134 insertions(+), 62 deletions(-) diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 3d4a8c48e4..8a1fed028e 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -130,68 +130,6 @@ trait TeamsBaseClient $this->assertEmpty($response['body']['memberships']); $this->assertEquals(0, $response['body']['total']); - /** - * Update project settings to hide sensitive fields - */ - $projectId = $this->getProject()['$id']; - - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => 'console', - 'cookie' => 'a_session_console=' . $this->getRoot()['session'], - ]), [ - 'enabled' => false, - ]); - - $this->assertEquals(200, $response['headers']['status-code']); - - /** - * Test that sensitive fields are hidden - */ - $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - ], $this->getHeaders())); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertIsInt($response['body']['total']); - $this->assertNotEmpty($response['body']['memberships'][0]['$id']); - - // Assert that sensitive fields are not present - $this->assertEmpty($response['body']['memberships'][0]['userName']); - $this->assertEmpty($response['body']['memberships'][0]['userEmail']); - $this->assertFalse($response['body']['memberships'][0]['mfa']); - - /** - * Update project settings to show sensitive fields - */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => 'console', - 'cookie' => 'a_session_console=' . $this->getRoot()['session'], - ]), [ - 'enabled' => true, - ]); - - $this->assertEquals(200, $response['headers']['status-code']); - - /** - * Test that sensitive fields are shown - */ - $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - ], $this->getHeaders())); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertIsInt($response['body']['total']); - $this->assertNotEmpty($response['body']['memberships'][0]['$id']); - - // Assert that sensitive fields are present - $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); - $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); - $this->assertFalse($response['body']['memberships'][0]['mfa']); - /** * Test for FAILURE */ diff --git a/tests/e2e/Services/Teams/TeamsConsoleClientTest.php b/tests/e2e/Services/Teams/TeamsConsoleClientTest.php index 4b5ade7cbf..0032f360b5 100644 --- a/tests/e2e/Services/Teams/TeamsConsoleClientTest.php +++ b/tests/e2e/Services/Teams/TeamsConsoleClientTest.php @@ -14,6 +14,73 @@ class TeamsConsoleClientTest extends Scope use ProjectConsole; use SideClient; + /** + * @depends testGetTeamMemberships + */ + public function testSensitiveFieldsGetMembership($data) + { + $teamUid = $data['teamUid'] ?? ''; + + $projectId = $this->getProject()['$id']; + + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + ]), [ + 'enabled' => false, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + /** + * Test that sensitive fields are not hidden, as we are on console + */ + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertIsInt($response['body']['total']); + $this->assertNotEmpty($response['body']['memberships'][0]['$id']); + + // Assert that sensitive fields are present + $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); + $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); + $this->assertFalse($response['body']['memberships'][0]['mfa']); + + /** + * Update project settings to show sensitive fields + */ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + ]), [ + 'enabled' => true, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + /** + * Test that sensitive fields are shown + */ + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertIsInt($response['body']['total']); + $this->assertNotEmpty($response['body']['memberships'][0]['$id']); + + // Assert that sensitive fields are present + $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); + $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); + $this->assertFalse($response['body']['memberships'][0]['mfa']); + } + /** * @depends testCreateTeam */ diff --git a/tests/e2e/Services/Teams/TeamsCustomClientTest.php b/tests/e2e/Services/Teams/TeamsCustomClientTest.php index 1de22f743f..0ab912f710 100644 --- a/tests/e2e/Services/Teams/TeamsCustomClientTest.php +++ b/tests/e2e/Services/Teams/TeamsCustomClientTest.php @@ -14,6 +14,73 @@ class TeamsCustomClientTest extends Scope use ProjectCustom; use SideClient; + /** + * @depends testGetTeamMemberships + */ + public function testSensitiveFieldsGetMembership($data) + { + $teamUid = $data['teamUid'] ?? ''; + + $projectId = $this->getProject()['$id']; + + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + ]), [ + 'enabled' => false, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + /** + * Test that sensitive fields are hidden + */ + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertIsInt($response['body']['total']); + $this->assertNotEmpty($response['body']['memberships'][0]['$id']); + + // Assert that sensitive fields are not present + $this->assertEmpty($response['body']['memberships'][0]['userName']); + $this->assertEmpty($response['body']['memberships'][0]['userEmail']); + $this->assertFalse($response['body']['memberships'][0]['mfa']); + + /** + * Update project settings to show sensitive fields + */ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + ]), [ + 'enabled' => true, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + /** + * Test that sensitive fields are shown + */ + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertIsInt($response['body']['total']); + $this->assertNotEmpty($response['body']['memberships'][0]['$id']); + + // Assert that sensitive fields are present + $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); + $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); + $this->assertFalse($response['body']['memberships'][0]['mfa']); + } + /** * @depends testUpdateTeamMembership */ From ff711d5ff91e73e34048069686d3ab185b186605 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:52:37 +0100 Subject: [PATCH 53/66] chore: update specs --- app/config/specs/open-api3-1.6.x-client.json | 76 +- app/config/specs/open-api3-1.6.x-console.json | 571 +++++---- app/config/specs/open-api3-1.6.x-server.json | 312 ++--- app/config/specs/open-api3-latest-client.json | 254 ++-- .../specs/open-api3-latest-console.json | 1008 ++++++++------- app/config/specs/open-api3-latest-server.json | 688 +++++----- app/config/specs/swagger2-1.6.x-client.json | 76 +- app/config/specs/swagger2-1.6.x-console.json | 574 +++++---- app/config/specs/swagger2-1.6.x-server.json | 316 ++--- app/config/specs/swagger2-latest-client.json | 368 +++--- app/config/specs/swagger2-latest-console.json | 1125 +++++++++-------- app/config/specs/swagger2-latest-server.json | 806 ++++++------ 12 files changed, 3352 insertions(+), 2822 deletions(-) diff --git a/app/config/specs/open-api3-1.6.x-client.json b/app/config/specs/open-api3-1.6.x-client.json index c00d4e2d07..7018a07040 100644 --- a/app/config/specs/open-api3-1.6.x-client.json +++ b/app/config/specs/open-api3-1.6.x-client.json @@ -4945,7 +4945,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -5033,7 +5033,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -5150,7 +5150,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -5226,7 +5226,7 @@ }, "x-appwrite": { "method": "query", - "weight": 330, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -5280,7 +5280,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 329, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -5766,7 +5766,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -5851,7 +5851,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -5928,7 +5928,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -6016,7 +6016,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 206, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -6116,7 +6116,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -6190,7 +6190,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 213, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -6281,7 +6281,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 214, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -6350,7 +6350,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 210, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -6419,7 +6419,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 209, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -6637,7 +6637,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6713,7 +6713,7 @@ }, "x-appwrite": { "method": "list", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6791,7 +6791,7 @@ }, "x-appwrite": { "method": "create", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -6878,7 +6878,7 @@ }, "x-appwrite": { "method": "get", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -6942,7 +6942,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -7018,7 +7018,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7069,7 +7069,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -7084,7 +7084,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7172,7 +7172,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7270,7 +7270,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -7285,7 +7285,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7359,7 +7359,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7448,7 +7448,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7524,7 +7524,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7624,7 +7624,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -7687,7 +7687,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -9266,12 +9266,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -9301,7 +9301,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -9826,7 +9826,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -9848,6 +9848,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -9857,7 +9862,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] } }, diff --git a/app/config/specs/open-api3-1.6.x-console.json b/app/config/specs/open-api3-1.6.x-console.json index 87c61ada7b..ecd295509f 100644 --- a/app/config/specs/open-api3-1.6.x-console.json +++ b/app/config/specs/open-api3-1.6.x-console.json @@ -4465,7 +4465,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4534,7 +4534,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -7477,7 +7477,7 @@ "size": { "type": "integer", "description": "Maximum size of the string attribute.", - "x-example": null + "x-example": 1 }, "newKey": { "type": "string", @@ -9308,7 +9308,7 @@ }, "x-appwrite": { "method": "list", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -9383,7 +9383,7 @@ }, "x-appwrite": { "method": "create", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -9487,7 +9487,8 @@ "cpp-20", "bun-1.0", "bun-1.1", - "go-1.23" + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -9630,7 +9631,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9681,7 +9682,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9733,7 +9734,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -9835,7 +9836,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -9897,7 +9898,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -9971,7 +9972,7 @@ }, "x-appwrite": { "method": "get", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -10032,7 +10033,7 @@ }, "x-appwrite": { "method": "update", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -10143,7 +10144,8 @@ "cpp-20", "bun-1.0", "bun-1.1", - "go-1.23" + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -10256,7 +10258,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -10319,7 +10321,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10404,7 +10406,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 298, + "weight": 299, "cookies": false, "type": "upload", "deprecated": false, @@ -10502,7 +10504,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -10573,7 +10575,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10637,7 +10639,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10703,7 +10705,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10790,7 +10792,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10856,7 +10858,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 295, + "weight": 296, "cookies": false, "type": "location", "deprecated": false, @@ -10931,7 +10933,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -11019,7 +11021,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -11136,7 +11138,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -11203,7 +11205,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -11276,7 +11278,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -11360,7 +11362,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -11421,7 +11423,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -11509,7 +11511,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11580,7 +11582,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11668,7 +11670,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11741,7 +11743,7 @@ }, "x-appwrite": { "method": "query", - "weight": 330, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -11795,7 +11797,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 329, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -13671,7 +13673,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13749,7 +13751,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 386, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -13895,7 +13897,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -14043,7 +14045,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14200,7 +14202,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -14359,7 +14361,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -14470,7 +14472,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -14584,7 +14586,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14639,7 +14641,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -14703,7 +14705,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -14780,7 +14782,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -14857,7 +14859,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14935,7 +14937,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15042,7 +15044,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -15152,7 +15154,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15239,7 +15241,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -15329,7 +15331,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -15446,7 +15448,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15566,7 +15568,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15663,7 +15665,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -15763,7 +15765,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -15870,7 +15872,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -15980,7 +15982,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16125,7 +16127,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -16272,7 +16274,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -16369,7 +16371,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -16469,7 +16471,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -16566,7 +16568,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -16666,7 +16668,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -16763,7 +16765,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16863,7 +16865,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16960,7 +16962,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -17060,7 +17062,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -17115,7 +17117,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -17179,7 +17181,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -17256,7 +17258,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -17333,7 +17335,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17409,7 +17411,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -17494,7 +17496,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17556,7 +17558,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 379, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -17635,7 +17637,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17699,7 +17701,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17776,7 +17778,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -17862,7 +17864,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17954,7 +17956,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -18019,7 +18021,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -18096,7 +18098,7 @@ }, "x-appwrite": { "method": "list", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -18125,7 +18127,7 @@ "parameters": [ { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors", "required": false, "schema": { "type": "array", @@ -18172,7 +18174,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -18262,7 +18264,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18357,7 +18359,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18428,7 +18430,7 @@ }, "x-appwrite": { "method": "deleteFirebaseAuth", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -18478,7 +18480,7 @@ }, "x-appwrite": { "method": "createFirebaseOAuthMigration", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -18556,7 +18558,7 @@ }, "x-appwrite": { "method": "listFirebaseProjects", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -18606,7 +18608,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -18680,7 +18682,7 @@ }, "x-appwrite": { "method": "getFirebaseReportOAuth", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -18754,7 +18756,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18867,7 +18869,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -19002,7 +19004,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -19109,7 +19111,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -19235,7 +19237,7 @@ }, "x-appwrite": { "method": "get", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -19295,7 +19297,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -19348,7 +19350,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -19410,7 +19412,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 195, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -19500,7 +19502,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 197, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19548,7 +19550,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 196, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -19623,7 +19625,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 198, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -19683,7 +19685,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 199, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19760,7 +19762,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 200, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -20210,7 +20212,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 169, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20447,7 +20449,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 162, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20528,7 +20530,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 161, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20609,7 +20611,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 167, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20690,7 +20692,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 168, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -20774,7 +20776,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 165, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20855,7 +20857,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 164, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20936,7 +20938,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 166, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -21076,6 +21078,87 @@ } } }, + "\/projects\/{projectId}\/auth\/teams-sensitive-attributes": { + "patch": { + "summary": "Update project team sensitive attributes", + "operationId": "projectsUpdateTeamsSensitiveAttributes", + "tags": [ + "projects" + ], + "description": "", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "x-appwrite": { + "method": "updateTeamsSensitiveAttributes", + "weight": 161, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-teams-sensitive-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "offline-model": "", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Set to true to show sensitive attributes to team members.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21098,7 +21181,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 163, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21200,7 +21283,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 181, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21289,7 +21372,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 177, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21349,7 +21432,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 176, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21444,7 +21527,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 178, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21514,7 +21597,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 179, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21610,7 +21693,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 180, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21821,7 +21904,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 183, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -21881,7 +21964,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 182, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22002,7 +22085,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 184, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22072,7 +22155,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 185, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22169,7 +22252,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 186, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22424,7 +22507,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 187, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22544,7 +22627,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 188, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22758,7 +22841,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 190, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22984,7 +23067,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 192, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23250,7 +23333,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 194, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23478,7 +23561,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 189, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23701,7 +23784,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 191, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23943,7 +24026,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 193, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24168,7 +24251,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 171, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -24228,7 +24311,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 170, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -24345,7 +24428,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 172, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -24415,7 +24498,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 173, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -24533,7 +24616,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 175, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24605,7 +24688,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 174, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24677,7 +24760,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -24751,7 +24834,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -24837,7 +24920,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -24890,7 +24973,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -24952,7 +25035,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -25014,7 +25097,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 202, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25089,7 +25172,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 201, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -25218,7 +25301,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -25279,7 +25362,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25405,7 +25488,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -25468,7 +25551,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -25556,7 +25639,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 206, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -25656,7 +25739,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -25730,7 +25813,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 213, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -25821,7 +25904,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 214, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -25890,7 +25973,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 210, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -25959,7 +26042,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 209, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -26177,7 +26260,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -26253,7 +26336,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 215, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -26327,7 +26410,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 216, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -26411,7 +26494,7 @@ }, "x-appwrite": { "method": "list", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -26489,7 +26572,7 @@ }, "x-appwrite": { "method": "create", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -26576,7 +26659,7 @@ }, "x-appwrite": { "method": "get", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -26640,7 +26723,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -26716,7 +26799,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -26782,7 +26865,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -26842,7 +26925,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -26857,7 +26940,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -26945,7 +27028,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -27043,7 +27126,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -27058,7 +27141,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -27132,7 +27215,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -27221,7 +27304,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -27297,7 +27380,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -27396,7 +27479,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -27458,7 +27541,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -27541,7 +27624,7 @@ }, "x-appwrite": { "method": "list", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -27616,7 +27699,7 @@ }, "x-appwrite": { "method": "create", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -27706,7 +27789,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -27793,7 +27876,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -27880,7 +27963,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -27950,7 +28033,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -28013,7 +28096,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -28100,7 +28183,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -28187,7 +28270,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -28304,7 +28387,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -28409,7 +28492,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -28516,7 +28599,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -28590,7 +28673,7 @@ }, "x-appwrite": { "method": "get", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -28644,7 +28727,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -28707,7 +28790,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -28789,7 +28872,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -28873,7 +28956,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -28958,7 +29041,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -29034,7 +29117,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -29097,7 +29180,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -29179,7 +29262,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -29257,7 +29340,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -29320,7 +29403,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -29381,7 +29464,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -29442,7 +29525,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -29505,7 +29588,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -29587,7 +29670,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -29669,7 +29752,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -29751,7 +29834,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -29812,7 +29895,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -29894,7 +29977,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -29955,7 +30038,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -30009,7 +30092,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -30065,7 +30148,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -30138,7 +30221,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -30220,7 +30303,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -30295,7 +30378,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -30407,7 +30490,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -30479,7 +30562,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -30570,7 +30653,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -30644,7 +30727,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -30728,7 +30811,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -30810,7 +30893,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -30892,7 +30975,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -30963,7 +31046,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -31050,7 +31133,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -31122,7 +31205,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -31194,7 +31277,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -31277,7 +31360,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -31358,7 +31441,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -31449,7 +31532,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -31525,7 +31608,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -31578,7 +31661,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -34866,12 +34949,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -34901,7 +34984,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -35066,7 +35149,7 @@ "specification": { "type": "string", "description": "Machine specification for builds and executions.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -35982,6 +36065,11 @@ "description": "Whether or not to send session alert emails to users.", "x-example": true }, + "teamsSensitiveAttributes": { + "type": "boolean", + "description": "Whether or not to show sensitive attributes in the teams API.", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -36187,6 +36275,7 @@ "authPersonalDataCheck", "authMockNumbers", "authSessionAlerts", + "teamsSensitiveAttributes", "oAuthProviders", "platforms", "webhooks", @@ -37765,7 +37854,7 @@ "slug": { "type": "string", "description": "Size slug.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -38403,7 +38492,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -38425,6 +38514,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -38434,7 +38528,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] }, "migration": { @@ -38471,9 +38566,14 @@ "description": "A string containing the type of source of the migration.", "x-example": "Appwrite" }, + "destination": { + "type": "string", + "description": "A string containing the type of destination of the migration.", + "x-example": "Appwrite" + }, "resources": { "type": "array", - "description": "Resources to migration.", + "description": "Resources to migrate.", "items": { "type": "string" }, @@ -38507,6 +38607,7 @@ "status", "stage", "source", + "destination", "resources", "statusCounters", "resourceData", diff --git a/app/config/specs/open-api3-1.6.x-server.json b/app/config/specs/open-api3-1.6.x-server.json index 44270f16af..b49e5b9616 100644 --- a/app/config/specs/open-api3-1.6.x-server.json +++ b/app/config/specs/open-api3-1.6.x-server.json @@ -6997,7 +6997,7 @@ "size": { "type": "integer", "description": "Maximum size of the string attribute.", - "x-example": null + "x-example": 1 }, "newKey": { "type": "string", @@ -8414,7 +8414,7 @@ }, "x-appwrite": { "method": "list", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -8490,7 +8490,7 @@ }, "x-appwrite": { "method": "create", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -8595,7 +8595,8 @@ "cpp-20", "bun-1.0", "bun-1.1", - "go-1.23" + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -8738,7 +8739,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8790,7 +8791,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8843,7 +8844,7 @@ }, "x-appwrite": { "method": "get", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -8905,7 +8906,7 @@ }, "x-appwrite": { "method": "update", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -9017,7 +9018,8 @@ "cpp-20", "bun-1.0", "bun-1.1", - "go-1.23" + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -9130,7 +9132,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -9194,7 +9196,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9280,7 +9282,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 298, + "weight": 299, "cookies": false, "type": "upload", "deprecated": false, @@ -9379,7 +9381,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -9451,7 +9453,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9516,7 +9518,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9583,7 +9585,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9671,7 +9673,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9738,7 +9740,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 295, + "weight": 296, "cookies": false, "type": "location", "deprecated": false, @@ -9814,7 +9816,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -9904,7 +9906,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -10023,7 +10025,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10092,7 +10094,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10166,7 +10168,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10228,7 +10230,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -10317,7 +10319,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -10389,7 +10391,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -10478,7 +10480,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10552,7 +10554,7 @@ }, "x-appwrite": { "method": "query", - "weight": 330, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -10608,7 +10610,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 329, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -12525,7 +12527,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -12604,7 +12606,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 386, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -12751,7 +12753,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -12900,7 +12902,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -13058,7 +13060,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -13218,7 +13220,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -13330,7 +13332,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -13445,7 +13447,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13501,7 +13503,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -13566,7 +13568,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13644,7 +13646,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -13722,7 +13724,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -13801,7 +13803,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -13909,7 +13911,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -14020,7 +14022,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -14108,7 +14110,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -14199,7 +14201,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -14317,7 +14319,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -14438,7 +14440,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -14536,7 +14538,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -14637,7 +14639,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -14745,7 +14747,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -14856,7 +14858,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15002,7 +15004,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15150,7 +15152,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15248,7 +15250,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15349,7 +15351,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -15447,7 +15449,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -15548,7 +15550,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -15646,7 +15648,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -15747,7 +15749,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -15845,7 +15847,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -15946,7 +15948,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -16002,7 +16004,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -16067,7 +16069,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -16145,7 +16147,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -16223,7 +16225,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16300,7 +16302,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -16386,7 +16388,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16449,7 +16451,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 379, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -16529,7 +16531,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -16594,7 +16596,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -16672,7 +16674,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -16759,7 +16761,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -16853,7 +16855,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -16919,7 +16921,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -16998,7 +17000,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 202, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -17074,7 +17076,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 201, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -17204,7 +17206,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -17266,7 +17268,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -17393,7 +17395,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -17457,7 +17459,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -17547,7 +17549,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 206, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -17649,7 +17651,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -17725,7 +17727,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 213, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -17818,7 +17820,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 214, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -17889,7 +17891,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 210, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -17960,7 +17962,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 209, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -18180,7 +18182,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -18258,7 +18260,7 @@ }, "x-appwrite": { "method": "list", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -18338,7 +18340,7 @@ }, "x-appwrite": { "method": "create", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -18427,7 +18429,7 @@ }, "x-appwrite": { "method": "get", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -18493,7 +18495,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -18571,7 +18573,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -18624,7 +18626,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -18639,7 +18641,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -18729,7 +18731,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -18829,7 +18831,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -18844,7 +18846,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -18920,7 +18922,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -19011,7 +19013,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -19089,7 +19091,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -19190,7 +19192,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -19254,7 +19256,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19339,7 +19341,7 @@ }, "x-appwrite": { "method": "list", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -19415,7 +19417,7 @@ }, "x-appwrite": { "method": "create", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -19506,7 +19508,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -19594,7 +19596,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -19682,7 +19684,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -19753,7 +19755,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -19817,7 +19819,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -19905,7 +19907,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -19993,7 +19995,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -20111,7 +20113,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -20217,7 +20219,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -20325,7 +20327,7 @@ }, "x-appwrite": { "method": "get", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -20380,7 +20382,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -20444,7 +20446,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -20527,7 +20529,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -20612,7 +20614,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -20698,7 +20700,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -20775,7 +20777,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -20839,7 +20841,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -20922,7 +20924,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -21001,7 +21003,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -21065,7 +21067,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -21127,7 +21129,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -21189,7 +21191,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -21253,7 +21255,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -21336,7 +21338,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -21419,7 +21421,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -21502,7 +21504,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -21564,7 +21566,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -21647,7 +21649,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -21709,7 +21711,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -21764,7 +21766,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -21821,7 +21823,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -21895,7 +21897,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -21978,7 +21980,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -22054,7 +22056,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -22167,7 +22169,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -22240,7 +22242,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -22332,7 +22334,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -22407,7 +22409,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -22492,7 +22494,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -22575,7 +22577,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -25596,12 +25598,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -25631,7 +25633,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -25796,7 +25798,7 @@ "specification": { "type": "string", "description": "Machine specification for builds and executions.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -26608,7 +26610,7 @@ "slug": { "type": "string", "description": "Size slug.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -27056,7 +27058,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -27078,6 +27080,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -27087,7 +27094,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] } }, diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 021ae27c45..7018a07040 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -43,7 +43,7 @@ }, "x-appwrite": { "method": "get", - "weight": 8, + "weight": 9, "cookies": false, "type": "", "deprecated": false, @@ -94,7 +94,7 @@ }, "x-appwrite": { "method": "create", - "weight": 7, + "weight": 8, "cookies": false, "type": "", "deprecated": false, @@ -166,7 +166,7 @@ "tags": [ "account" ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\r\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\r\n", + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", "responses": { "200": { "description": "User", @@ -181,7 +181,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 33, + "weight": 34, "cookies": false, "type": "", "deprecated": false, @@ -259,7 +259,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 56, + "weight": 57, "cookies": false, "type": "", "deprecated": false, @@ -320,7 +320,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 57, + "weight": 58, "cookies": false, "type": "", "deprecated": false, @@ -385,7 +385,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 28, + "weight": 29, "cookies": false, "type": "", "deprecated": false, @@ -436,7 +436,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 30, + "weight": 31, "cookies": false, "type": "", "deprecated": false, @@ -504,7 +504,7 @@ }, "x-appwrite": { "method": "updateMFA", - "weight": 43, + "weight": 44, "cookies": false, "type": "", "deprecated": false, @@ -576,7 +576,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", - "weight": 45, + "weight": 46, "cookies": false, "type": "", "deprecated": false, @@ -644,7 +644,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", - "weight": 46, + "weight": 47, "cookies": false, "type": "", "deprecated": false, @@ -724,7 +724,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 50, + "weight": 51, "cookies": false, "type": "", "deprecated": false, @@ -794,7 +794,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", - "weight": 51, + "weight": 52, "cookies": false, "type": "", "deprecated": false, @@ -870,7 +870,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", - "weight": 52, + "weight": 53, "cookies": false, "type": "", "deprecated": false, @@ -948,7 +948,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 44, + "weight": 45, "cookies": false, "type": "", "deprecated": false, @@ -1001,7 +1001,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 49, + "weight": 50, "cookies": false, "type": "", "deprecated": false, @@ -1052,7 +1052,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 47, + "weight": 48, "cookies": false, "type": "", "deprecated": false, @@ -1103,7 +1103,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 48, + "weight": 49, "cookies": false, "type": "", "deprecated": false, @@ -1156,7 +1156,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 31, + "weight": 32, "cookies": false, "type": "", "deprecated": false, @@ -1228,7 +1228,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 32, + "weight": 33, "cookies": false, "type": "", "deprecated": false, @@ -1305,7 +1305,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 34, + "weight": 35, "cookies": false, "type": "", "deprecated": false, @@ -1383,7 +1383,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 29, + "weight": 30, "cookies": false, "type": "", "deprecated": false, @@ -1434,7 +1434,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 35, + "weight": 36, "cookies": false, "type": "", "deprecated": false, @@ -1506,7 +1506,7 @@ }, "x-appwrite": { "method": "createRecovery", - "weight": 37, + "weight": 38, "cookies": false, "type": "", "deprecated": false, @@ -1570,7 +1570,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", "responses": { "200": { "description": "Token", @@ -1585,7 +1585,7 @@ }, "x-appwrite": { "method": "updateRecovery", - "weight": 38, + "weight": 39, "cookies": false, "type": "", "deprecated": false, @@ -1669,7 +1669,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 10, + "weight": 11, "cookies": false, "type": "", "deprecated": false, @@ -1713,7 +1713,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 11, + "weight": 12, "cookies": false, "type": "", "deprecated": false, @@ -1766,7 +1766,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", - "weight": 16, + "weight": 17, "cookies": false, "type": "", "deprecated": false, @@ -1802,7 +1802,7 @@ "tags": [ "account" ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Session", @@ -1817,7 +1817,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", - "weight": 15, + "weight": 16, "cookies": false, "type": "", "deprecated": false, @@ -1893,7 +1893,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", - "weight": 25, + "weight": 26, "cookies": false, "type": "", "deprecated": true, @@ -1954,7 +1954,7 @@ "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\r\n\r\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\r\n", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "301": { "description": "File" @@ -1962,7 +1962,7 @@ }, "x-appwrite": { "method": "createOAuth2Session", - "weight": 18, + "weight": 19, "cookies": false, "type": "webAuth", "deprecated": false, @@ -2105,7 +2105,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", - "weight": 26, + "weight": 27, "cookies": false, "type": "", "deprecated": true, @@ -2181,7 +2181,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 17, + "weight": 18, "cookies": false, "type": "", "deprecated": false, @@ -2257,7 +2257,7 @@ }, "x-appwrite": { "method": "getSession", - "weight": 12, + "weight": 13, "cookies": false, "type": "", "deprecated": false, @@ -2320,7 +2320,7 @@ }, "x-appwrite": { "method": "updateSession", - "weight": 14, + "weight": 15, "cookies": false, "type": "", "deprecated": false, @@ -2376,7 +2376,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 13, + "weight": 14, "cookies": false, "type": "", "deprecated": false, @@ -2441,7 +2441,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 36, + "weight": 37, "cookies": false, "type": "", "deprecated": false, @@ -2494,7 +2494,7 @@ }, "x-appwrite": { "method": "createPushTarget", - "weight": 53, + "weight": 54, "cookies": false, "type": "", "deprecated": false, @@ -2575,7 +2575,7 @@ }, "x-appwrite": { "method": "updatePushTarget", - "weight": 54, + "weight": 55, "cookies": false, "type": "", "deprecated": false, @@ -2655,7 +2655,7 @@ }, "x-appwrite": { "method": "deletePushTarget", - "weight": 55, + "weight": 56, "cookies": false, "type": "", "deprecated": false, @@ -2703,7 +2703,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -2718,7 +2718,7 @@ }, "x-appwrite": { "method": "createEmailToken", - "weight": 24, + "weight": 25, "cookies": false, "type": "", "deprecated": false, @@ -2784,7 +2784,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\r\n", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2799,7 +2799,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", - "weight": 23, + "weight": 24, "cookies": false, "type": "", "deprecated": false, @@ -2873,7 +2873,7 @@ "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \r\n\r\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "301": { "description": "File" @@ -2881,7 +2881,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", - "weight": 22, + "weight": 23, "cookies": false, "type": "webAuth", "deprecated": false, @@ -3009,7 +3009,7 @@ "tags": [ "account" ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -3024,7 +3024,7 @@ }, "x-appwrite": { "method": "createPhoneToken", - "weight": 27, + "weight": 28, "cookies": false, "type": "", "deprecated": false, @@ -3088,7 +3088,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\r\n", + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", "responses": { "201": { "description": "Token", @@ -3103,7 +3103,7 @@ }, "x-appwrite": { "method": "createVerification", - "weight": 39, + "weight": 40, "cookies": false, "type": "", "deprecated": false, @@ -3173,7 +3173,7 @@ }, "x-appwrite": { "method": "updateVerification", - "weight": 40, + "weight": 41, "cookies": false, "type": "", "deprecated": false, @@ -3251,7 +3251,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", - "weight": 41, + "weight": 42, "cookies": false, "type": "", "deprecated": false, @@ -3305,7 +3305,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 42, + "weight": 43, "cookies": false, "type": "", "deprecated": false, @@ -3368,7 +3368,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", "responses": { "200": { "description": "Image" @@ -3376,7 +3376,7 @@ }, "x-appwrite": { "method": "getBrowser", - "weight": 59, + "weight": 60, "cookies": false, "type": "location", "deprecated": false, @@ -3496,7 +3496,7 @@ "tags": [ "avatars" ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image" @@ -3504,7 +3504,7 @@ }, "x-appwrite": { "method": "getCreditCard", - "weight": 58, + "weight": 59, "cookies": false, "type": "location", "deprecated": false, @@ -3628,7 +3628,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image" @@ -3636,7 +3636,7 @@ }, "x-appwrite": { "method": "getFavicon", - "weight": 62, + "weight": 63, "cookies": false, "type": "location", "deprecated": false, @@ -3688,7 +3688,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image" @@ -3696,7 +3696,7 @@ }, "x-appwrite": { "method": "getFlag", - "weight": 60, + "weight": 61, "cookies": false, "type": "location", "deprecated": false, @@ -4178,7 +4178,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image" @@ -4186,7 +4186,7 @@ }, "x-appwrite": { "method": "getImage", - "weight": 61, + "weight": 62, "cookies": false, "type": "location", "deprecated": false, @@ -4262,7 +4262,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\r\n\r\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image" @@ -4270,7 +4270,7 @@ }, "x-appwrite": { "method": "getInitials", - "weight": 64, + "weight": 65, "cookies": false, "type": "location", "deprecated": false, @@ -4356,7 +4356,7 @@ "tags": [ "avatars" ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\r\n", + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", "responses": { "200": { "description": "Image" @@ -4364,7 +4364,7 @@ }, "x-appwrite": { "method": "getQR", - "weight": 63, + "weight": 64, "cookies": false, "type": "location", "deprecated": false, @@ -4465,7 +4465,7 @@ }, "x-appwrite": { "method": "listDocuments", - "weight": 108, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -4552,7 +4552,7 @@ }, "x-appwrite": { "method": "createDocument", - "weight": 107, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -4661,7 +4661,7 @@ }, "x-appwrite": { "method": "getDocument", - "weight": 109, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -4758,7 +4758,7 @@ }, "x-appwrite": { "method": "updateDocument", - "weight": 111, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -4859,7 +4859,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 112, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -4945,7 +4945,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -5033,7 +5033,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -5084,7 +5084,7 @@ "body": { "type": "string", "description": "HTTP body of execution. Default value is empty string.", - "x-example": null + "x-example": "" }, "async": { "type": "boolean", @@ -5150,7 +5150,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -5226,7 +5226,7 @@ }, "x-appwrite": { "method": "query", - "weight": 329, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -5280,7 +5280,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 328, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -5319,7 +5319,7 @@ "tags": [ "locale" ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\r\n\r\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", "responses": { "200": { "description": "Locale", @@ -5334,7 +5334,7 @@ }, "x-appwrite": { "method": "get", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -5388,7 +5388,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -5442,7 +5442,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5496,7 +5496,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -5550,7 +5550,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -5604,7 +5604,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -5658,7 +5658,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5712,7 +5712,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5766,7 +5766,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -5851,7 +5851,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -5928,7 +5928,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -6001,7 +6001,7 @@ "tags": [ "storage" ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\r\n\r\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\r\n\r\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\r\n\r\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\r\n", + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", "responses": { "201": { "description": "File", @@ -6016,7 +6016,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 205, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -6116,7 +6116,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -6190,7 +6190,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 212, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -6281,7 +6281,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 213, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -6350,7 +6350,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 209, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -6419,7 +6419,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 208, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -6637,7 +6637,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6713,7 +6713,7 @@ }, "x-appwrite": { "method": "list", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6791,7 +6791,7 @@ }, "x-appwrite": { "method": "create", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -6878,7 +6878,7 @@ }, "x-appwrite": { "method": "get", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -6942,7 +6942,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -7018,7 +7018,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7069,7 +7069,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -7084,7 +7084,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7157,7 +7157,7 @@ "tags": [ "teams" ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\r\n\r\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\r\n\r\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \r\n\r\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\r\n", + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", "responses": { "201": { "description": "Membership", @@ -7172,7 +7172,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7270,7 +7270,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -7285,7 +7285,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7344,7 +7344,7 @@ "tags": [ "teams" ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\r\n", + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", "responses": { "200": { "description": "Membership", @@ -7359,7 +7359,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7448,7 +7448,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7509,7 +7509,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\r\n\r\nIf the request is successful, a session for the user is automatically created.\r\n", + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", "responses": { "200": { "description": "Membership", @@ -7524,7 +7524,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7624,7 +7624,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -7687,7 +7687,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -9266,12 +9266,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -9301,7 +9301,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -9826,7 +9826,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -9848,6 +9848,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -9857,7 +9862,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] } }, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 04e7c76e13..ecd295509f 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -43,7 +43,7 @@ }, "x-appwrite": { "method": "get", - "weight": 8, + "weight": 9, "cookies": false, "type": "", "deprecated": false, @@ -93,7 +93,7 @@ }, "x-appwrite": { "method": "create", - "weight": 7, + "weight": 8, "cookies": false, "type": "", "deprecated": false, @@ -171,7 +171,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 9, + "weight": 10, "cookies": false, "type": "", "deprecated": false, @@ -206,7 +206,7 @@ "tags": [ "account" ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\r\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\r\n", + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", "responses": { "200": { "description": "User", @@ -221,7 +221,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 33, + "weight": 34, "cookies": false, "type": "", "deprecated": false, @@ -298,7 +298,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 56, + "weight": 57, "cookies": false, "type": "", "deprecated": false, @@ -358,7 +358,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 57, + "weight": 58, "cookies": false, "type": "", "deprecated": false, @@ -422,7 +422,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 28, + "weight": 29, "cookies": false, "type": "", "deprecated": false, @@ -473,7 +473,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 30, + "weight": 31, "cookies": false, "type": "", "deprecated": false, @@ -540,7 +540,7 @@ }, "x-appwrite": { "method": "updateMFA", - "weight": 43, + "weight": 44, "cookies": false, "type": "", "deprecated": false, @@ -611,7 +611,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", - "weight": 45, + "weight": 46, "cookies": false, "type": "", "deprecated": false, @@ -678,7 +678,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", - "weight": 46, + "weight": 47, "cookies": false, "type": "", "deprecated": false, @@ -757,7 +757,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 50, + "weight": 51, "cookies": false, "type": "", "deprecated": false, @@ -826,7 +826,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", - "weight": 51, + "weight": 52, "cookies": false, "type": "", "deprecated": false, @@ -902,7 +902,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", - "weight": 52, + "weight": 53, "cookies": false, "type": "", "deprecated": false, @@ -979,7 +979,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 44, + "weight": 45, "cookies": false, "type": "", "deprecated": false, @@ -1031,7 +1031,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 49, + "weight": 50, "cookies": false, "type": "", "deprecated": false, @@ -1081,7 +1081,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 47, + "weight": 48, "cookies": false, "type": "", "deprecated": false, @@ -1131,7 +1131,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 48, + "weight": 49, "cookies": false, "type": "", "deprecated": false, @@ -1183,7 +1183,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 31, + "weight": 32, "cookies": false, "type": "", "deprecated": false, @@ -1254,7 +1254,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 32, + "weight": 33, "cookies": false, "type": "", "deprecated": false, @@ -1330,7 +1330,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 34, + "weight": 35, "cookies": false, "type": "", "deprecated": false, @@ -1407,7 +1407,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 29, + "weight": 30, "cookies": false, "type": "", "deprecated": false, @@ -1457,7 +1457,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 35, + "weight": 36, "cookies": false, "type": "", "deprecated": false, @@ -1528,7 +1528,7 @@ }, "x-appwrite": { "method": "createRecovery", - "weight": 37, + "weight": 38, "cookies": false, "type": "", "deprecated": false, @@ -1591,7 +1591,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", "responses": { "200": { "description": "Token", @@ -1606,7 +1606,7 @@ }, "x-appwrite": { "method": "updateRecovery", - "weight": 38, + "weight": 39, "cookies": false, "type": "", "deprecated": false, @@ -1689,7 +1689,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 10, + "weight": 11, "cookies": false, "type": "", "deprecated": false, @@ -1732,7 +1732,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 11, + "weight": 12, "cookies": false, "type": "", "deprecated": false, @@ -1784,7 +1784,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", - "weight": 16, + "weight": 17, "cookies": false, "type": "", "deprecated": false, @@ -1820,7 +1820,7 @@ "tags": [ "account" ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Session", @@ -1835,7 +1835,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", - "weight": 15, + "weight": 16, "cookies": false, "type": "", "deprecated": false, @@ -1911,7 +1911,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", - "weight": 25, + "weight": 26, "cookies": false, "type": "", "deprecated": true, @@ -1972,7 +1972,7 @@ "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\r\n\r\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\r\n", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "301": { "description": "File" @@ -1980,7 +1980,7 @@ }, "x-appwrite": { "method": "createOAuth2Session", - "weight": 18, + "weight": 19, "cookies": false, "type": "webAuth", "deprecated": false, @@ -2123,7 +2123,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", - "weight": 26, + "weight": 27, "cookies": false, "type": "", "deprecated": true, @@ -2199,7 +2199,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 17, + "weight": 18, "cookies": false, "type": "", "deprecated": false, @@ -2275,7 +2275,7 @@ }, "x-appwrite": { "method": "getSession", - "weight": 12, + "weight": 13, "cookies": false, "type": "", "deprecated": false, @@ -2337,7 +2337,7 @@ }, "x-appwrite": { "method": "updateSession", - "weight": 14, + "weight": 15, "cookies": false, "type": "", "deprecated": false, @@ -2392,7 +2392,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 13, + "weight": 14, "cookies": false, "type": "", "deprecated": false, @@ -2456,7 +2456,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 36, + "weight": 37, "cookies": false, "type": "", "deprecated": false, @@ -2508,7 +2508,7 @@ }, "x-appwrite": { "method": "createPushTarget", - "weight": 53, + "weight": 54, "cookies": false, "type": "", "deprecated": false, @@ -2588,7 +2588,7 @@ }, "x-appwrite": { "method": "updatePushTarget", - "weight": 54, + "weight": 55, "cookies": false, "type": "", "deprecated": false, @@ -2667,7 +2667,7 @@ }, "x-appwrite": { "method": "deletePushTarget", - "weight": 55, + "weight": 56, "cookies": false, "type": "", "deprecated": false, @@ -2714,7 +2714,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -2729,7 +2729,7 @@ }, "x-appwrite": { "method": "createEmailToken", - "weight": 24, + "weight": 25, "cookies": false, "type": "", "deprecated": false, @@ -2795,7 +2795,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\r\n", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2810,7 +2810,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", - "weight": 23, + "weight": 24, "cookies": false, "type": "", "deprecated": false, @@ -2884,7 +2884,7 @@ "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \r\n\r\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "301": { "description": "File" @@ -2892,7 +2892,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", - "weight": 22, + "weight": 23, "cookies": false, "type": "webAuth", "deprecated": false, @@ -3020,7 +3020,7 @@ "tags": [ "account" ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -3035,7 +3035,7 @@ }, "x-appwrite": { "method": "createPhoneToken", - "weight": 27, + "weight": 28, "cookies": false, "type": "", "deprecated": false, @@ -3099,7 +3099,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\r\n", + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", "responses": { "201": { "description": "Token", @@ -3114,7 +3114,7 @@ }, "x-appwrite": { "method": "createVerification", - "weight": 39, + "weight": 40, "cookies": false, "type": "", "deprecated": false, @@ -3183,7 +3183,7 @@ }, "x-appwrite": { "method": "updateVerification", - "weight": 40, + "weight": 41, "cookies": false, "type": "", "deprecated": false, @@ -3260,7 +3260,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", - "weight": 41, + "weight": 42, "cookies": false, "type": "", "deprecated": false, @@ -3313,7 +3313,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 42, + "weight": 43, "cookies": false, "type": "", "deprecated": false, @@ -3375,7 +3375,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", "responses": { "200": { "description": "Image" @@ -3383,7 +3383,7 @@ }, "x-appwrite": { "method": "getBrowser", - "weight": 59, + "weight": 60, "cookies": false, "type": "location", "deprecated": false, @@ -3503,7 +3503,7 @@ "tags": [ "avatars" ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image" @@ -3511,7 +3511,7 @@ }, "x-appwrite": { "method": "getCreditCard", - "weight": 58, + "weight": 59, "cookies": false, "type": "location", "deprecated": false, @@ -3635,7 +3635,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image" @@ -3643,7 +3643,7 @@ }, "x-appwrite": { "method": "getFavicon", - "weight": 62, + "weight": 63, "cookies": false, "type": "location", "deprecated": false, @@ -3695,7 +3695,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image" @@ -3703,7 +3703,7 @@ }, "x-appwrite": { "method": "getFlag", - "weight": 60, + "weight": 61, "cookies": false, "type": "location", "deprecated": false, @@ -4185,7 +4185,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image" @@ -4193,7 +4193,7 @@ }, "x-appwrite": { "method": "getImage", - "weight": 61, + "weight": 62, "cookies": false, "type": "location", "deprecated": false, @@ -4269,7 +4269,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\r\n\r\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image" @@ -4277,7 +4277,7 @@ }, "x-appwrite": { "method": "getInitials", - "weight": 64, + "weight": 65, "cookies": false, "type": "location", "deprecated": false, @@ -4363,7 +4363,7 @@ "tags": [ "avatars" ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\r\n", + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", "responses": { "200": { "description": "Image" @@ -4371,7 +4371,7 @@ }, "x-appwrite": { "method": "getQR", - "weight": 63, + "weight": 64, "cookies": false, "type": "location", "deprecated": false, @@ -4465,7 +4465,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 331, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4534,7 +4534,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 330, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4584,7 +4584,7 @@ }, "x-appwrite": { "method": "list", - "weight": 69, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -4644,7 +4644,7 @@ "tags": [ "databases" ], - "description": "Create a new Database.\r\n", + "description": "Create a new Database.\n", "responses": { "201": { "description": "Database", @@ -4659,7 +4659,7 @@ }, "x-appwrite": { "method": "create", - "weight": 68, + "weight": 69, "cookies": false, "type": "", "deprecated": false, @@ -4740,7 +4740,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -4814,7 +4814,7 @@ }, "x-appwrite": { "method": "get", - "weight": 70, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -4875,7 +4875,7 @@ }, "x-appwrite": { "method": "update", - "weight": 72, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -4953,7 +4953,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 73, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -5016,7 +5016,7 @@ }, "x-appwrite": { "method": "listCollections", - "weight": 75, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -5101,7 +5101,7 @@ }, "x-appwrite": { "method": "createCollection", - "weight": 74, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -5207,7 +5207,7 @@ }, "x-appwrite": { "method": "getCollection", - "weight": 76, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -5278,7 +5278,7 @@ }, "x-appwrite": { "method": "updateCollection", - "weight": 78, + "weight": 79, "cookies": false, "type": "", "deprecated": false, @@ -5379,7 +5379,7 @@ }, "x-appwrite": { "method": "deleteCollection", - "weight": 79, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -5452,7 +5452,7 @@ }, "x-appwrite": { "method": "listAttributes", - "weight": 90, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -5523,7 +5523,7 @@ "tags": [ "databases" ], - "description": "Create a boolean attribute.\r\n", + "description": "Create a boolean attribute.\n", "responses": { "202": { "description": "AttributeBoolean", @@ -5538,7 +5538,7 @@ }, "x-appwrite": { "method": "createBooleanAttribute", - "weight": 87, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -5646,7 +5646,7 @@ }, "x-appwrite": { "method": "updateBooleanAttribute", - "weight": 99, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -5759,7 +5759,7 @@ }, "x-appwrite": { "method": "createDatetimeAttribute", - "weight": 88, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -5867,7 +5867,7 @@ }, "x-appwrite": { "method": "updateDatetimeAttribute", - "weight": 100, + "weight": 101, "cookies": false, "type": "", "deprecated": false, @@ -5965,7 +5965,7 @@ "tags": [ "databases" ], - "description": "Create an email attribute.\r\n", + "description": "Create an email attribute.\n", "responses": { "202": { "description": "AttributeEmail", @@ -5980,7 +5980,7 @@ }, "x-appwrite": { "method": "createEmailAttribute", - "weight": 81, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -6073,7 +6073,7 @@ "tags": [ "databases" ], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeEmail", @@ -6088,7 +6088,7 @@ }, "x-appwrite": { "method": "updateEmailAttribute", - "weight": 93, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -6186,7 +6186,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \r\n", + "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -6201,7 +6201,7 @@ }, "x-appwrite": { "method": "createEnumAttribute", - "weight": 82, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -6303,7 +6303,7 @@ "tags": [ "databases" ], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeEnum", @@ -6318,7 +6318,7 @@ }, "x-appwrite": { "method": "updateEnumAttribute", - "weight": 94, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -6425,7 +6425,7 @@ "tags": [ "databases" ], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\r\n", + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { "202": { "description": "AttributeFloat", @@ -6440,7 +6440,7 @@ }, "x-appwrite": { "method": "createFloatAttribute", - "weight": 86, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -6543,7 +6543,7 @@ "tags": [ "databases" ], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeFloat", @@ -6558,7 +6558,7 @@ }, "x-appwrite": { "method": "updateFloatAttribute", - "weight": 98, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -6668,7 +6668,7 @@ "tags": [ "databases" ], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\r\n", + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { "202": { "description": "AttributeInteger", @@ -6683,7 +6683,7 @@ }, "x-appwrite": { "method": "createIntegerAttribute", - "weight": 85, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -6786,7 +6786,7 @@ "tags": [ "databases" ], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeInteger", @@ -6801,7 +6801,7 @@ }, "x-appwrite": { "method": "updateIntegerAttribute", - "weight": 97, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -6911,7 +6911,7 @@ "tags": [ "databases" ], - "description": "Create IP address attribute.\r\n", + "description": "Create IP address attribute.\n", "responses": { "202": { "description": "AttributeIP", @@ -6926,7 +6926,7 @@ }, "x-appwrite": { "method": "createIpAttribute", - "weight": 83, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -7019,7 +7019,7 @@ "tags": [ "databases" ], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeIP", @@ -7034,7 +7034,7 @@ }, "x-appwrite": { "method": "updateIpAttribute", - "weight": 95, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -7132,7 +7132,7 @@ "tags": [ "databases" ], - "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\r\n", + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", "responses": { "202": { "description": "AttributeRelationship", @@ -7147,7 +7147,7 @@ }, "x-appwrite": { "method": "createRelationshipAttribute", - "weight": 89, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -7265,7 +7265,7 @@ "tags": [ "databases" ], - "description": "Create a string attribute.\r\n", + "description": "Create a string attribute.\n", "responses": { "202": { "description": "AttributeString", @@ -7280,7 +7280,7 @@ }, "x-appwrite": { "method": "createStringAttribute", - "weight": 80, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -7384,7 +7384,7 @@ "tags": [ "databases" ], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeString", @@ -7399,7 +7399,7 @@ }, "x-appwrite": { "method": "updateStringAttribute", - "weight": 92, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -7477,7 +7477,7 @@ "size": { "type": "integer", "description": "Maximum size of the string attribute.", - "x-example": null + "x-example": 1 }, "newKey": { "type": "string", @@ -7502,7 +7502,7 @@ "tags": [ "databases" ], - "description": "Create a URL attribute.\r\n", + "description": "Create a URL attribute.\n", "responses": { "202": { "description": "AttributeURL", @@ -7517,7 +7517,7 @@ }, "x-appwrite": { "method": "createUrlAttribute", - "weight": 84, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -7610,7 +7610,7 @@ "tags": [ "databases" ], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeURL", @@ -7625,7 +7625,7 @@ }, "x-appwrite": { "method": "updateUrlAttribute", - "weight": 96, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -7769,7 +7769,7 @@ }, "x-appwrite": { "method": "getAttribute", - "weight": 91, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -7842,7 +7842,7 @@ }, "x-appwrite": { "method": "deleteAttribute", - "weight": 102, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -7909,7 +7909,7 @@ "tags": [ "databases" ], - "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\r\n", + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", "responses": { "200": { "description": "AttributeRelationship", @@ -7924,7 +7924,7 @@ }, "x-appwrite": { "method": "updateRelationshipAttribute", - "weight": 101, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -8034,7 +8034,7 @@ }, "x-appwrite": { "method": "listDocuments", - "weight": 108, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -8121,7 +8121,7 @@ }, "x-appwrite": { "method": "createDocument", - "weight": 107, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -8230,7 +8230,7 @@ }, "x-appwrite": { "method": "getDocument", - "weight": 109, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -8327,7 +8327,7 @@ }, "x-appwrite": { "method": "updateDocument", - "weight": 111, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -8428,7 +8428,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 112, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -8514,7 +8514,7 @@ }, "x-appwrite": { "method": "listDocumentLogs", - "weight": 110, + "weight": 111, "cookies": false, "type": "", "deprecated": false, @@ -8609,7 +8609,7 @@ }, "x-appwrite": { "method": "listIndexes", - "weight": 104, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -8678,7 +8678,7 @@ "tags": [ "databases" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\r\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -8693,7 +8693,7 @@ }, "x-appwrite": { "method": "createIndex", - "weight": 103, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -8815,7 +8815,7 @@ }, "x-appwrite": { "method": "getIndex", - "weight": 105, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -8888,7 +8888,7 @@ }, "x-appwrite": { "method": "deleteIndex", - "weight": 106, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -8970,7 +8970,7 @@ }, "x-appwrite": { "method": "listCollectionLogs", - "weight": 77, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -9055,7 +9055,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -9149,7 +9149,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 71, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -9224,7 +9224,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", - "weight": 114, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -9308,7 +9308,7 @@ }, "x-appwrite": { "method": "list", - "weight": 287, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -9383,7 +9383,7 @@ }, "x-appwrite": { "method": "create", - "weight": 286, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -9437,6 +9437,7 @@ "node-19.0", "node-20.0", "node-21.0", + "node-22", "php-8.0", "php-8.1", "php-8.2", @@ -9455,6 +9456,8 @@ "deno-1.24", "deno-1.35", "deno-1.40", + "deno-1.46", + "deno-2.0", "dart-2.15", "dart-2.16", "dart-2.17", @@ -9462,24 +9465,30 @@ "dart-3.0", "dart-3.1", "dart-3.3", - "dotnet-3.1", + "dart-3.5", "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", - "go-1.23" + "bun-1.1", + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -9622,7 +9631,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9658,7 +9667,7 @@ "tags": [ "functions" ], - "description": "List allowed function specifications for this instance.\r\n", + "description": "List allowed function specifications for this instance.\n", "responses": { "200": { "description": "Specifications List", @@ -9673,7 +9682,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9725,7 +9734,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -9827,7 +9836,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -9889,7 +9898,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -9963,7 +9972,7 @@ }, "x-appwrite": { "method": "get", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -10024,7 +10033,7 @@ }, "x-appwrite": { "method": "update", - "weight": 293, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -10085,6 +10094,7 @@ "node-19.0", "node-20.0", "node-21.0", + "node-22", "php-8.0", "php-8.1", "php-8.2", @@ -10103,6 +10113,8 @@ "deno-1.24", "deno-1.35", "deno-1.40", + "deno-1.46", + "deno-2.0", "dart-2.15", "dart-2.16", "dart-2.17", @@ -10110,24 +10122,30 @@ "dart-3.0", "dart-3.1", "dart-3.3", - "dotnet-3.1", + "dart-3.5", "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", - "go-1.23" + "bun-1.1", + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -10240,7 +10258,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 296, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -10303,7 +10321,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10373,7 +10391,7 @@ "tags": [ "functions" ], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\r\n\r\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\r\n\r\nUse the \"command\" param to set the entrypoint used to execute your code.", + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "responses": { "202": { "description": "Deployment", @@ -10388,7 +10406,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "upload", "deprecated": false, @@ -10486,7 +10504,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -10557,7 +10575,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10621,7 +10639,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10687,7 +10705,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10774,7 +10792,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10840,7 +10858,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 294, + "weight": 296, "cookies": false, "type": "location", "deprecated": false, @@ -10915,7 +10933,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -11003,7 +11021,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -11054,7 +11072,7 @@ "body": { "type": "string", "description": "HTTP body of execution. Default value is empty string.", - "x-example": null + "x-example": "" }, "async": { "type": "boolean", @@ -11120,7 +11138,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -11179,7 +11197,7 @@ "tags": [ "functions" ], - "description": "Delete a function execution by its unique ID.\r\n", + "description": "Delete a function execution by its unique ID.\n", "responses": { "204": { "description": "No content" @@ -11187,7 +11205,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -11260,7 +11278,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -11344,7 +11362,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -11405,7 +11423,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -11493,7 +11511,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11564,7 +11582,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11652,7 +11670,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11725,7 +11743,7 @@ }, "x-appwrite": { "method": "query", - "weight": 329, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -11779,7 +11797,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 328, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -11833,7 +11851,7 @@ }, "x-appwrite": { "method": "get", - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -11884,7 +11902,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -11935,7 +11953,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -11986,7 +12004,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12048,7 +12066,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -12099,7 +12117,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12150,7 +12168,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -12201,7 +12219,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12265,7 +12283,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -12329,7 +12347,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -12404,7 +12422,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12453,7 +12471,7 @@ "tags": [ "health" ], - "description": "Returns the amount of failed jobs in a given queue.\r\n", + "description": "Returns the amount of failed jobs in a given queue.\n", "responses": { "200": { "description": "Health Queue", @@ -12468,7 +12486,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12558,7 +12576,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12622,7 +12640,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12686,7 +12704,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12750,7 +12768,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12814,7 +12832,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12878,7 +12896,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -12942,7 +12960,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -13006,7 +13024,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -13070,7 +13088,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -13121,7 +13139,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13172,7 +13190,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -13208,7 +13226,7 @@ "tags": [ "locale" ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\r\n\r\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", "responses": { "200": { "description": "Locale", @@ -13223,7 +13241,7 @@ }, "x-appwrite": { "method": "get", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -13277,7 +13295,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -13331,7 +13349,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13385,7 +13403,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -13439,7 +13457,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -13493,7 +13511,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -13547,7 +13565,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13601,7 +13619,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13655,7 +13673,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13733,7 +13751,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -13864,7 +13882,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\r\n", + "description": "Update an email message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -13879,7 +13897,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 392, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -14027,7 +14045,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14169,7 +14187,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\r\n", + "description": "Update a push notification by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -14184,7 +14202,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 394, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -14343,7 +14361,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -14439,7 +14457,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\r\n", + "description": "Update an email message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -14454,7 +14472,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 393, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -14553,7 +14571,7 @@ "tags": [ "messaging" ], - "description": "Get a message by its unique ID.\r\n", + "description": "Get a message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -14568,7 +14586,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14623,7 +14641,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 395, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -14687,7 +14705,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -14764,7 +14782,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -14841,7 +14859,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14919,7 +14937,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15026,7 +15044,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -15136,7 +15154,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15223,7 +15241,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -15313,7 +15331,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -15430,7 +15448,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15550,7 +15568,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15647,7 +15665,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -15747,7 +15765,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -15854,7 +15872,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -15964,7 +15982,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16109,7 +16127,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -16256,7 +16274,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -16353,7 +16371,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -16453,7 +16471,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -16550,7 +16568,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -16650,7 +16668,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -16747,7 +16765,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16847,7 +16865,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16944,7 +16962,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -17029,7 +17047,7 @@ "tags": [ "messaging" ], - "description": "Get a provider by its unique ID.\r\n", + "description": "Get a provider by its unique ID.\n", "responses": { "200": { "description": "Provider", @@ -17044,7 +17062,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -17099,7 +17117,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -17163,7 +17181,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -17240,7 +17258,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -17317,7 +17335,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17393,7 +17411,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -17463,7 +17481,7 @@ "tags": [ "messaging" ], - "description": "Get a topic by its unique ID.\r\n", + "description": "Get a topic by its unique ID.\n", "responses": { "200": { "description": "Topic", @@ -17478,7 +17496,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17525,7 +17543,7 @@ "tags": [ "messaging" ], - "description": "Update a topic by its unique ID.\r\n", + "description": "Update a topic by its unique ID.\n", "responses": { "200": { "description": "Topic", @@ -17540,7 +17558,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -17619,7 +17637,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17683,7 +17701,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17760,7 +17778,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -17846,7 +17864,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17923,7 +17941,7 @@ "tags": [ "messaging" ], - "description": "Get a subscriber by its unique ID.\r\n", + "description": "Get a subscriber by its unique ID.\n", "responses": { "200": { "description": "Subscriber", @@ -17938,7 +17956,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -18003,7 +18021,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -18080,7 +18098,7 @@ }, "x-appwrite": { "method": "list", - "weight": 337, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -18109,7 +18127,7 @@ "parameters": [ { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors", "required": false, "schema": { "type": "array", @@ -18156,7 +18174,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 332, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -18246,7 +18264,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 339, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18341,7 +18359,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 334, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18412,7 +18430,7 @@ }, "x-appwrite": { "method": "deleteFirebaseAuth", - "weight": 345, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -18462,7 +18480,7 @@ }, "x-appwrite": { "method": "createFirebaseOAuthMigration", - "weight": 333, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -18540,7 +18558,7 @@ }, "x-appwrite": { "method": "listFirebaseProjects", - "weight": 344, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -18590,7 +18608,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 340, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -18664,7 +18682,7 @@ }, "x-appwrite": { "method": "getFirebaseReportOAuth", - "weight": 341, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -18738,7 +18756,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 336, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18851,7 +18869,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -18986,7 +19004,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 335, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -19093,7 +19111,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -19219,7 +19237,7 @@ }, "x-appwrite": { "method": "get", - "weight": 338, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -19279,7 +19297,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -19332,7 +19350,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -19394,7 +19412,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 194, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -19484,7 +19502,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 196, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19532,7 +19550,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 195, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -19607,7 +19625,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 197, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -19667,7 +19685,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 198, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19744,7 +19762,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 199, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19806,7 +19824,7 @@ }, "x-appwrite": { "method": "list", - "weight": 150, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -19880,7 +19898,7 @@ }, "x-appwrite": { "method": "create", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -20017,7 +20035,7 @@ }, "x-appwrite": { "method": "get", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20077,7 +20095,7 @@ }, "x-appwrite": { "method": "update", - "weight": 152, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20194,7 +20212,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 168, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20256,7 +20274,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 156, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20350,7 +20368,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 157, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20431,7 +20449,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 161, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20512,7 +20530,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 160, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20593,7 +20611,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 166, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20674,7 +20692,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 167, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -20758,7 +20776,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 164, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20839,7 +20857,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 163, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20920,7 +20938,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 165, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -21001,7 +21019,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 159, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -21060,6 +21078,87 @@ } } }, + "\/projects\/{projectId}\/auth\/teams-sensitive-attributes": { + "patch": { + "summary": "Update project team sensitive attributes", + "operationId": "projectsUpdateTeamsSensitiveAttributes", + "tags": [ + "projects" + ], + "description": "", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "x-appwrite": { + "method": "updateTeamsSensitiveAttributes", + "weight": 161, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-teams-sensitive-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "offline-model": "", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Set to true to show sensitive attributes to team members.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21082,7 +21181,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 162, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21184,7 +21283,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 180, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21273,7 +21372,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 176, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21333,7 +21432,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 175, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21428,7 +21527,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 177, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21498,7 +21597,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 178, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21594,7 +21693,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 179, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21666,7 +21765,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 158, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -21805,7 +21904,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 182, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -21865,7 +21964,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 181, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21986,7 +22085,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 183, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22056,7 +22155,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 184, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22153,7 +22252,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 185, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22225,7 +22324,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 154, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -22327,7 +22426,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 155, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -22408,7 +22507,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 186, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22528,7 +22627,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 187, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22661,7 +22760,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 153, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -22742,7 +22841,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 189, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22968,7 +23067,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 191, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23234,7 +23333,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 193, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23462,7 +23561,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 188, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23685,7 +23784,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 190, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23927,7 +24026,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 192, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24152,7 +24251,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 170, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -24212,7 +24311,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 169, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -24329,7 +24428,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 171, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -24399,7 +24498,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 172, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -24517,7 +24616,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 174, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24589,7 +24688,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 173, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24661,7 +24760,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 315, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -24735,7 +24834,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 314, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -24821,7 +24920,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 316, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -24874,7 +24973,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 317, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -24936,7 +25035,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 318, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -24998,7 +25097,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 201, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25073,7 +25172,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 200, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -25202,7 +25301,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -25263,7 +25362,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25389,7 +25488,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -25452,7 +25551,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -25525,7 +25624,7 @@ "tags": [ "storage" ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\r\n\r\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\r\n\r\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\r\n\r\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\r\n", + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", "responses": { "201": { "description": "File", @@ -25540,7 +25639,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 205, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -25640,7 +25739,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -25714,7 +25813,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 212, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -25805,7 +25904,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 213, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -25874,7 +25973,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 209, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -25943,7 +26042,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 208, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -26161,7 +26260,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -26237,7 +26336,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -26311,7 +26410,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -26395,7 +26494,7 @@ }, "x-appwrite": { "method": "list", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -26473,7 +26572,7 @@ }, "x-appwrite": { "method": "create", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -26560,7 +26659,7 @@ }, "x-appwrite": { "method": "get", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -26624,7 +26723,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -26700,7 +26799,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -26766,7 +26865,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -26826,7 +26925,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -26841,7 +26940,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -26914,7 +27013,7 @@ "tags": [ "teams" ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\r\n\r\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\r\n\r\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \r\n\r\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\r\n", + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", "responses": { "201": { "description": "Membership", @@ -26929,7 +27028,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -27027,7 +27126,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -27042,7 +27141,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -27101,7 +27200,7 @@ "tags": [ "teams" ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\r\n", + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", "responses": { "200": { "description": "Membership", @@ -27116,7 +27215,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -27205,7 +27304,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -27266,7 +27365,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\r\n\r\nIf the request is successful, a session for the user is automatically created.\r\n", + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", "responses": { "200": { "description": "Membership", @@ -27281,7 +27380,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -27380,7 +27479,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -27442,7 +27541,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -27525,7 +27624,7 @@ }, "x-appwrite": { "method": "list", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -27600,7 +27699,7 @@ }, "x-appwrite": { "method": "create", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -27690,7 +27789,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -27777,7 +27876,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 231, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -27864,7 +27963,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -27934,7 +28033,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -27997,7 +28096,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -28084,7 +28183,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -28171,7 +28270,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -28288,7 +28387,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -28393,7 +28492,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -28500,7 +28599,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -28574,7 +28673,7 @@ }, "x-appwrite": { "method": "get", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -28628,7 +28727,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -28691,7 +28790,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -28773,7 +28872,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -28842,7 +28941,7 @@ "tags": [ "users" ], - "description": "Update the user labels by its unique ID. \r\n\r\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", "responses": { "200": { "description": "User", @@ -28857,7 +28956,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -28942,7 +29041,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -29018,7 +29117,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -29081,7 +29180,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -29163,7 +29262,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -29241,7 +29340,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -29304,7 +29403,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -29365,7 +29464,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -29426,7 +29525,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -29489,7 +29588,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -29571,7 +29670,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -29653,7 +29752,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -29735,7 +29834,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -29796,7 +29895,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -29878,7 +29977,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -29924,7 +30023,7 @@ "tags": [ "users" ], - "description": "Creates a session for a user. Returns an immediately usable session object.\r\n\r\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", "responses": { "201": { "description": "Session", @@ -29939,7 +30038,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -29993,7 +30092,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -30049,7 +30148,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -30122,7 +30221,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -30204,7 +30303,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -30279,7 +30378,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -30391,7 +30490,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -30463,7 +30562,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -30554,7 +30653,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -30613,7 +30712,7 @@ "tags": [ "users" ], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\r\n", + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", "responses": { "201": { "description": "Token", @@ -30628,7 +30727,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -30712,7 +30811,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -30794,7 +30893,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -30876,7 +30975,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 277, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -30947,7 +31046,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 278, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -31034,7 +31133,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 279, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -31106,7 +31205,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 280, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -31178,7 +31277,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 275, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -31261,7 +31360,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 276, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -31342,7 +31441,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 285, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -31433,7 +31532,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 282, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -31509,7 +31608,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 283, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -31562,7 +31661,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 284, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -34850,12 +34949,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -34885,7 +34984,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -35050,7 +35149,7 @@ "specification": { "type": "string", "description": "Machine specification for builds and executions.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -35966,6 +36065,11 @@ "description": "Whether or not to send session alert emails to users.", "x-example": true }, + "teamsSensitiveAttributes": { + "type": "boolean", + "description": "Whether or not to show sensitive attributes in the teams API.", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -36046,6 +36150,17 @@ "description": "SMTP server secure protocol", "x-example": "tls" }, + "pingCount": { + "type": "integer", + "description": "Number of times the ping was received for this project.", + "x-example": 1, + "format": "int32" + }, + "pingedAt": { + "type": "string", + "description": "Last ping datetime in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "authEmailPassword": { "type": "boolean", "description": "Email\/Password auth method status", @@ -36160,6 +36275,7 @@ "authPersonalDataCheck", "authMockNumbers", "authSessionAlerts", + "teamsSensitiveAttributes", "oAuthProviders", "platforms", "webhooks", @@ -36173,6 +36289,8 @@ "smtpUsername", "smtpPassword", "smtpSecure", + "pingCount", + "pingedAt", "authEmailPassword", "authUsersAuthMagicURL", "authEmailOtp", @@ -37736,7 +37854,7 @@ "slug": { "type": "string", "description": "Size slug.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -38374,7 +38492,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -38396,6 +38514,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -38405,7 +38528,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] }, "migration": { @@ -38419,7 +38543,7 @@ }, "$createdAt": { "type": "string", - "description": "Variable creation date in ISO 8601 format.", + "description": "Migration creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { @@ -38442,9 +38566,14 @@ "description": "A string containing the type of source of the migration.", "x-example": "Appwrite" }, + "destination": { + "type": "string", + "description": "A string containing the type of destination of the migration.", + "x-example": "Appwrite" + }, "resources": { "type": "array", - "description": "Resources to migration.", + "description": "Resources to migrate.", "items": { "type": "string" }, @@ -38478,6 +38607,7 @@ "status", "stage", "source", + "destination", "resources", "statusCounters", "resourceData", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 274eac9686..b49e5b9616 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -43,7 +43,7 @@ }, "x-appwrite": { "method": "get", - "weight": 8, + "weight": 9, "cookies": false, "type": "", "deprecated": false, @@ -95,7 +95,7 @@ }, "x-appwrite": { "method": "create", - "weight": 7, + "weight": 8, "cookies": false, "type": "", "deprecated": false, @@ -167,7 +167,7 @@ "tags": [ "account" ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\r\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\r\n", + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", "responses": { "200": { "description": "User", @@ -182,7 +182,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 33, + "weight": 34, "cookies": false, "type": "", "deprecated": false, @@ -261,7 +261,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 56, + "weight": 57, "cookies": false, "type": "", "deprecated": false, @@ -323,7 +323,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 57, + "weight": 58, "cookies": false, "type": "", "deprecated": false, @@ -389,7 +389,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 28, + "weight": 29, "cookies": false, "type": "", "deprecated": false, @@ -440,7 +440,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 30, + "weight": 31, "cookies": false, "type": "", "deprecated": false, @@ -509,7 +509,7 @@ }, "x-appwrite": { "method": "updateMFA", - "weight": 43, + "weight": 44, "cookies": false, "type": "", "deprecated": false, @@ -582,7 +582,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", - "weight": 45, + "weight": 46, "cookies": false, "type": "", "deprecated": false, @@ -651,7 +651,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", - "weight": 46, + "weight": 47, "cookies": false, "type": "", "deprecated": false, @@ -732,7 +732,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 50, + "weight": 51, "cookies": false, "type": "", "deprecated": false, @@ -803,7 +803,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", - "weight": 51, + "weight": 52, "cookies": false, "type": "", "deprecated": false, @@ -879,7 +879,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", - "weight": 52, + "weight": 53, "cookies": false, "type": "", "deprecated": false, @@ -958,7 +958,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 44, + "weight": 45, "cookies": false, "type": "", "deprecated": false, @@ -1012,7 +1012,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 49, + "weight": 50, "cookies": false, "type": "", "deprecated": false, @@ -1064,7 +1064,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 47, + "weight": 48, "cookies": false, "type": "", "deprecated": false, @@ -1116,7 +1116,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 48, + "weight": 49, "cookies": false, "type": "", "deprecated": false, @@ -1170,7 +1170,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 31, + "weight": 32, "cookies": false, "type": "", "deprecated": false, @@ -1243,7 +1243,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 32, + "weight": 33, "cookies": false, "type": "", "deprecated": false, @@ -1321,7 +1321,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 34, + "weight": 35, "cookies": false, "type": "", "deprecated": false, @@ -1400,7 +1400,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 29, + "weight": 30, "cookies": false, "type": "", "deprecated": false, @@ -1452,7 +1452,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 35, + "weight": 36, "cookies": false, "type": "", "deprecated": false, @@ -1525,7 +1525,7 @@ }, "x-appwrite": { "method": "createRecovery", - "weight": 37, + "weight": 38, "cookies": false, "type": "", "deprecated": false, @@ -1590,7 +1590,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", "responses": { "200": { "description": "Token", @@ -1605,7 +1605,7 @@ }, "x-appwrite": { "method": "updateRecovery", - "weight": 38, + "weight": 39, "cookies": false, "type": "", "deprecated": false, @@ -1690,7 +1690,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 10, + "weight": 11, "cookies": false, "type": "", "deprecated": false, @@ -1735,7 +1735,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 11, + "weight": 12, "cookies": false, "type": "", "deprecated": false, @@ -1789,7 +1789,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", - "weight": 16, + "weight": 17, "cookies": false, "type": "", "deprecated": false, @@ -1825,7 +1825,7 @@ "tags": [ "account" ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Session", @@ -1840,7 +1840,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", - "weight": 15, + "weight": 16, "cookies": false, "type": "", "deprecated": false, @@ -1916,7 +1916,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", - "weight": 25, + "weight": 26, "cookies": false, "type": "", "deprecated": true, @@ -1992,7 +1992,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", - "weight": 26, + "weight": 27, "cookies": false, "type": "", "deprecated": true, @@ -2068,7 +2068,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 17, + "weight": 18, "cookies": false, "type": "", "deprecated": false, @@ -2144,7 +2144,7 @@ }, "x-appwrite": { "method": "getSession", - "weight": 12, + "weight": 13, "cookies": false, "type": "", "deprecated": false, @@ -2208,7 +2208,7 @@ }, "x-appwrite": { "method": "updateSession", - "weight": 14, + "weight": 15, "cookies": false, "type": "", "deprecated": false, @@ -2265,7 +2265,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 13, + "weight": 14, "cookies": false, "type": "", "deprecated": false, @@ -2331,7 +2331,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 36, + "weight": 37, "cookies": false, "type": "", "deprecated": false, @@ -2370,7 +2370,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -2385,7 +2385,7 @@ }, "x-appwrite": { "method": "createEmailToken", - "weight": 24, + "weight": 25, "cookies": false, "type": "", "deprecated": false, @@ -2451,7 +2451,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\r\n", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2466,7 +2466,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", - "weight": 23, + "weight": 24, "cookies": false, "type": "", "deprecated": false, @@ -2540,7 +2540,7 @@ "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \r\n\r\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "301": { "description": "File" @@ -2548,7 +2548,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", - "weight": 22, + "weight": 23, "cookies": false, "type": "webAuth", "deprecated": false, @@ -2676,7 +2676,7 @@ "tags": [ "account" ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -2691,7 +2691,7 @@ }, "x-appwrite": { "method": "createPhoneToken", - "weight": 27, + "weight": 28, "cookies": false, "type": "", "deprecated": false, @@ -2755,7 +2755,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\r\n", + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", "responses": { "201": { "description": "Token", @@ -2770,7 +2770,7 @@ }, "x-appwrite": { "method": "createVerification", - "weight": 39, + "weight": 40, "cookies": false, "type": "", "deprecated": false, @@ -2841,7 +2841,7 @@ }, "x-appwrite": { "method": "updateVerification", - "weight": 40, + "weight": 41, "cookies": false, "type": "", "deprecated": false, @@ -2920,7 +2920,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", - "weight": 41, + "weight": 42, "cookies": false, "type": "", "deprecated": false, @@ -2975,7 +2975,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 42, + "weight": 43, "cookies": false, "type": "", "deprecated": false, @@ -3039,7 +3039,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", "responses": { "200": { "description": "Image" @@ -3047,7 +3047,7 @@ }, "x-appwrite": { "method": "getBrowser", - "weight": 59, + "weight": 60, "cookies": false, "type": "location", "deprecated": false, @@ -3169,7 +3169,7 @@ "tags": [ "avatars" ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image" @@ -3177,7 +3177,7 @@ }, "x-appwrite": { "method": "getCreditCard", - "weight": 58, + "weight": 59, "cookies": false, "type": "location", "deprecated": false, @@ -3303,7 +3303,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image" @@ -3311,7 +3311,7 @@ }, "x-appwrite": { "method": "getFavicon", - "weight": 62, + "weight": 63, "cookies": false, "type": "location", "deprecated": false, @@ -3365,7 +3365,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image" @@ -3373,7 +3373,7 @@ }, "x-appwrite": { "method": "getFlag", - "weight": 60, + "weight": 61, "cookies": false, "type": "location", "deprecated": false, @@ -3857,7 +3857,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image" @@ -3865,7 +3865,7 @@ }, "x-appwrite": { "method": "getImage", - "weight": 61, + "weight": 62, "cookies": false, "type": "location", "deprecated": false, @@ -3943,7 +3943,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\r\n\r\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image" @@ -3951,7 +3951,7 @@ }, "x-appwrite": { "method": "getInitials", - "weight": 64, + "weight": 65, "cookies": false, "type": "location", "deprecated": false, @@ -4039,7 +4039,7 @@ "tags": [ "avatars" ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\r\n", + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", "responses": { "200": { "description": "Image" @@ -4047,7 +4047,7 @@ }, "x-appwrite": { "method": "getQR", - "weight": 63, + "weight": 64, "cookies": false, "type": "location", "deprecated": false, @@ -4150,7 +4150,7 @@ }, "x-appwrite": { "method": "list", - "weight": 69, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -4211,7 +4211,7 @@ "tags": [ "databases" ], - "description": "Create a new Database.\r\n", + "description": "Create a new Database.\n", "responses": { "201": { "description": "Database", @@ -4226,7 +4226,7 @@ }, "x-appwrite": { "method": "create", - "weight": 68, + "weight": 69, "cookies": false, "type": "", "deprecated": false, @@ -4308,7 +4308,7 @@ }, "x-appwrite": { "method": "get", - "weight": 70, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -4370,7 +4370,7 @@ }, "x-appwrite": { "method": "update", - "weight": 72, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -4449,7 +4449,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 73, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -4513,7 +4513,7 @@ }, "x-appwrite": { "method": "listCollections", - "weight": 75, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -4599,7 +4599,7 @@ }, "x-appwrite": { "method": "createCollection", - "weight": 74, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -4706,7 +4706,7 @@ }, "x-appwrite": { "method": "getCollection", - "weight": 76, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -4778,7 +4778,7 @@ }, "x-appwrite": { "method": "updateCollection", - "weight": 78, + "weight": 79, "cookies": false, "type": "", "deprecated": false, @@ -4880,7 +4880,7 @@ }, "x-appwrite": { "method": "deleteCollection", - "weight": 79, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -4954,7 +4954,7 @@ }, "x-appwrite": { "method": "listAttributes", - "weight": 90, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -5026,7 +5026,7 @@ "tags": [ "databases" ], - "description": "Create a boolean attribute.\r\n", + "description": "Create a boolean attribute.\n", "responses": { "202": { "description": "AttributeBoolean", @@ -5041,7 +5041,7 @@ }, "x-appwrite": { "method": "createBooleanAttribute", - "weight": 87, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -5150,7 +5150,7 @@ }, "x-appwrite": { "method": "updateBooleanAttribute", - "weight": 99, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -5264,7 +5264,7 @@ }, "x-appwrite": { "method": "createDatetimeAttribute", - "weight": 88, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -5373,7 +5373,7 @@ }, "x-appwrite": { "method": "updateDatetimeAttribute", - "weight": 100, + "weight": 101, "cookies": false, "type": "", "deprecated": false, @@ -5472,7 +5472,7 @@ "tags": [ "databases" ], - "description": "Create an email attribute.\r\n", + "description": "Create an email attribute.\n", "responses": { "202": { "description": "AttributeEmail", @@ -5487,7 +5487,7 @@ }, "x-appwrite": { "method": "createEmailAttribute", - "weight": 81, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -5581,7 +5581,7 @@ "tags": [ "databases" ], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeEmail", @@ -5596,7 +5596,7 @@ }, "x-appwrite": { "method": "updateEmailAttribute", - "weight": 93, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -5695,7 +5695,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \r\n", + "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -5710,7 +5710,7 @@ }, "x-appwrite": { "method": "createEnumAttribute", - "weight": 82, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -5813,7 +5813,7 @@ "tags": [ "databases" ], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeEnum", @@ -5828,7 +5828,7 @@ }, "x-appwrite": { "method": "updateEnumAttribute", - "weight": 94, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -5936,7 +5936,7 @@ "tags": [ "databases" ], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\r\n", + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { "202": { "description": "AttributeFloat", @@ -5951,7 +5951,7 @@ }, "x-appwrite": { "method": "createFloatAttribute", - "weight": 86, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -6055,7 +6055,7 @@ "tags": [ "databases" ], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeFloat", @@ -6070,7 +6070,7 @@ }, "x-appwrite": { "method": "updateFloatAttribute", - "weight": 98, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -6181,7 +6181,7 @@ "tags": [ "databases" ], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\r\n", + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { "202": { "description": "AttributeInteger", @@ -6196,7 +6196,7 @@ }, "x-appwrite": { "method": "createIntegerAttribute", - "weight": 85, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -6300,7 +6300,7 @@ "tags": [ "databases" ], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeInteger", @@ -6315,7 +6315,7 @@ }, "x-appwrite": { "method": "updateIntegerAttribute", - "weight": 97, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -6426,7 +6426,7 @@ "tags": [ "databases" ], - "description": "Create IP address attribute.\r\n", + "description": "Create IP address attribute.\n", "responses": { "202": { "description": "AttributeIP", @@ -6441,7 +6441,7 @@ }, "x-appwrite": { "method": "createIpAttribute", - "weight": 83, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -6535,7 +6535,7 @@ "tags": [ "databases" ], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeIP", @@ -6550,7 +6550,7 @@ }, "x-appwrite": { "method": "updateIpAttribute", - "weight": 95, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -6649,7 +6649,7 @@ "tags": [ "databases" ], - "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\r\n", + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", "responses": { "202": { "description": "AttributeRelationship", @@ -6664,7 +6664,7 @@ }, "x-appwrite": { "method": "createRelationshipAttribute", - "weight": 89, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -6783,7 +6783,7 @@ "tags": [ "databases" ], - "description": "Create a string attribute.\r\n", + "description": "Create a string attribute.\n", "responses": { "202": { "description": "AttributeString", @@ -6798,7 +6798,7 @@ }, "x-appwrite": { "method": "createStringAttribute", - "weight": 80, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -6903,7 +6903,7 @@ "tags": [ "databases" ], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeString", @@ -6918,7 +6918,7 @@ }, "x-appwrite": { "method": "updateStringAttribute", - "weight": 92, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -6997,7 +6997,7 @@ "size": { "type": "integer", "description": "Maximum size of the string attribute.", - "x-example": null + "x-example": 1 }, "newKey": { "type": "string", @@ -7022,7 +7022,7 @@ "tags": [ "databases" ], - "description": "Create a URL attribute.\r\n", + "description": "Create a URL attribute.\n", "responses": { "202": { "description": "AttributeURL", @@ -7037,7 +7037,7 @@ }, "x-appwrite": { "method": "createUrlAttribute", - "weight": 84, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -7131,7 +7131,7 @@ "tags": [ "databases" ], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeURL", @@ -7146,7 +7146,7 @@ }, "x-appwrite": { "method": "updateUrlAttribute", - "weight": 96, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -7291,7 +7291,7 @@ }, "x-appwrite": { "method": "getAttribute", - "weight": 91, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -7365,7 +7365,7 @@ }, "x-appwrite": { "method": "deleteAttribute", - "weight": 102, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -7433,7 +7433,7 @@ "tags": [ "databases" ], - "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\r\n", + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", "responses": { "200": { "description": "AttributeRelationship", @@ -7448,7 +7448,7 @@ }, "x-appwrite": { "method": "updateRelationshipAttribute", - "weight": 101, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -7559,7 +7559,7 @@ }, "x-appwrite": { "method": "listDocuments", - "weight": 108, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -7648,7 +7648,7 @@ }, "x-appwrite": { "method": "createDocument", - "weight": 107, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -7759,7 +7759,7 @@ }, "x-appwrite": { "method": "getDocument", - "weight": 109, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -7858,7 +7858,7 @@ }, "x-appwrite": { "method": "updateDocument", - "weight": 111, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -7961,7 +7961,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 112, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -8049,7 +8049,7 @@ }, "x-appwrite": { "method": "listIndexes", - "weight": 104, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -8119,7 +8119,7 @@ "tags": [ "databases" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\r\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -8134,7 +8134,7 @@ }, "x-appwrite": { "method": "createIndex", - "weight": 103, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -8257,7 +8257,7 @@ }, "x-appwrite": { "method": "getIndex", - "weight": 105, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -8331,7 +8331,7 @@ }, "x-appwrite": { "method": "deleteIndex", - "weight": 106, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -8414,7 +8414,7 @@ }, "x-appwrite": { "method": "list", - "weight": 287, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -8490,7 +8490,7 @@ }, "x-appwrite": { "method": "create", - "weight": 286, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -8545,6 +8545,7 @@ "node-19.0", "node-20.0", "node-21.0", + "node-22", "php-8.0", "php-8.1", "php-8.2", @@ -8563,6 +8564,8 @@ "deno-1.24", "deno-1.35", "deno-1.40", + "deno-1.46", + "deno-2.0", "dart-2.15", "dart-2.16", "dart-2.17", @@ -8570,24 +8573,30 @@ "dart-3.0", "dart-3.1", "dart-3.3", - "dotnet-3.1", + "dart-3.5", "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", - "go-1.23" + "bun-1.1", + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -8730,7 +8739,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8767,7 +8776,7 @@ "tags": [ "functions" ], - "description": "List allowed function specifications for this instance.\r\n", + "description": "List allowed function specifications for this instance.\n", "responses": { "200": { "description": "Specifications List", @@ -8782,7 +8791,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8835,7 +8844,7 @@ }, "x-appwrite": { "method": "get", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -8897,7 +8906,7 @@ }, "x-appwrite": { "method": "update", - "weight": 293, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -8959,6 +8968,7 @@ "node-19.0", "node-20.0", "node-21.0", + "node-22", "php-8.0", "php-8.1", "php-8.2", @@ -8977,6 +8987,8 @@ "deno-1.24", "deno-1.35", "deno-1.40", + "deno-1.46", + "deno-2.0", "dart-2.15", "dart-2.16", "dart-2.17", @@ -8984,24 +8996,30 @@ "dart-3.0", "dart-3.1", "dart-3.3", - "dotnet-3.1", + "dart-3.5", "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", - "go-1.23" + "bun-1.1", + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -9114,7 +9132,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 296, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -9178,7 +9196,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9249,7 +9267,7 @@ "tags": [ "functions" ], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\r\n\r\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\r\n\r\nUse the \"command\" param to set the entrypoint used to execute your code.", + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "responses": { "202": { "description": "Deployment", @@ -9264,7 +9282,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "upload", "deprecated": false, @@ -9363,7 +9381,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -9435,7 +9453,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9500,7 +9518,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9567,7 +9585,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9655,7 +9673,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9722,7 +9740,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 294, + "weight": 296, "cookies": false, "type": "location", "deprecated": false, @@ -9798,7 +9816,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -9888,7 +9906,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -9941,7 +9959,7 @@ "body": { "type": "string", "description": "HTTP body of execution. Default value is empty string.", - "x-example": null + "x-example": "" }, "async": { "type": "boolean", @@ -10007,7 +10025,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10068,7 +10086,7 @@ "tags": [ "functions" ], - "description": "Delete a function execution by its unique ID.\r\n", + "description": "Delete a function execution by its unique ID.\n", "responses": { "204": { "description": "No content" @@ -10076,7 +10094,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10150,7 +10168,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10212,7 +10230,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -10301,7 +10319,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -10373,7 +10391,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -10462,7 +10480,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10536,7 +10554,7 @@ }, "x-appwrite": { "method": "query", - "weight": 329, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -10592,7 +10610,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 328, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -10648,7 +10666,7 @@ }, "x-appwrite": { "method": "get", - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -10700,7 +10718,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -10752,7 +10770,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -10804,7 +10822,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -10867,7 +10885,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -10919,7 +10937,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -10971,7 +10989,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11023,7 +11041,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -11088,7 +11106,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11153,7 +11171,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11229,7 +11247,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11279,7 +11297,7 @@ "tags": [ "health" ], - "description": "Returns the amount of failed jobs in a given queue.\r\n", + "description": "Returns the amount of failed jobs in a given queue.\n", "responses": { "200": { "description": "Health Queue", @@ -11294,7 +11312,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -11385,7 +11403,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11450,7 +11468,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11515,7 +11533,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11580,7 +11598,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11645,7 +11663,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11710,7 +11728,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11775,7 +11793,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11840,7 +11858,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11905,7 +11923,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11957,7 +11975,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12009,7 +12027,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -12046,7 +12064,7 @@ "tags": [ "locale" ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\r\n\r\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", "responses": { "200": { "description": "Locale", @@ -12061,7 +12079,7 @@ }, "x-appwrite": { "method": "get", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -12117,7 +12135,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -12173,7 +12191,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12229,7 +12247,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -12285,7 +12303,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -12341,7 +12359,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -12397,7 +12415,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12453,7 +12471,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12509,7 +12527,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -12588,7 +12606,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -12720,7 +12738,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\r\n", + "description": "Update an email message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -12735,7 +12753,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 392, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -12884,7 +12902,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -13027,7 +13045,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\r\n", + "description": "Update a push notification by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -13042,7 +13060,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 394, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -13202,7 +13220,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -13299,7 +13317,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\r\n", + "description": "Update an email message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -13314,7 +13332,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 393, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -13414,7 +13432,7 @@ "tags": [ "messaging" ], - "description": "Get a message by its unique ID.\r\n", + "description": "Get a message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -13429,7 +13447,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13485,7 +13503,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 395, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -13550,7 +13568,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13628,7 +13646,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -13706,7 +13724,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -13785,7 +13803,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -13893,7 +13911,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -14004,7 +14022,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -14092,7 +14110,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -14183,7 +14201,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -14301,7 +14319,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -14422,7 +14440,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -14520,7 +14538,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -14621,7 +14639,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -14729,7 +14747,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -14840,7 +14858,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -14986,7 +15004,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15134,7 +15152,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15232,7 +15250,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15333,7 +15351,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -15431,7 +15449,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -15532,7 +15550,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -15630,7 +15648,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -15731,7 +15749,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -15829,7 +15847,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -15915,7 +15933,7 @@ "tags": [ "messaging" ], - "description": "Get a provider by its unique ID.\r\n", + "description": "Get a provider by its unique ID.\n", "responses": { "200": { "description": "Provider", @@ -15930,7 +15948,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -15986,7 +16004,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -16051,7 +16069,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -16129,7 +16147,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -16207,7 +16225,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16284,7 +16302,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -16355,7 +16373,7 @@ "tags": [ "messaging" ], - "description": "Get a topic by its unique ID.\r\n", + "description": "Get a topic by its unique ID.\n", "responses": { "200": { "description": "Topic", @@ -16370,7 +16388,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16418,7 +16436,7 @@ "tags": [ "messaging" ], - "description": "Update a topic by its unique ID.\r\n", + "description": "Update a topic by its unique ID.\n", "responses": { "200": { "description": "Topic", @@ -16433,7 +16451,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -16513,7 +16531,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -16578,7 +16596,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -16656,7 +16674,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -16743,7 +16761,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -16822,7 +16840,7 @@ "tags": [ "messaging" ], - "description": "Get a subscriber by its unique ID.\r\n", + "description": "Get a subscriber by its unique ID.\n", "responses": { "200": { "description": "Subscriber", @@ -16837,7 +16855,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -16903,7 +16921,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -16982,7 +17000,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 201, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -17058,7 +17076,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 200, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -17188,7 +17206,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -17250,7 +17268,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -17377,7 +17395,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -17441,7 +17459,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -17516,7 +17534,7 @@ "tags": [ "storage" ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\r\n\r\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\r\n\r\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\r\n\r\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\r\n", + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", "responses": { "201": { "description": "File", @@ -17531,7 +17549,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 205, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -17633,7 +17651,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -17709,7 +17727,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 212, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -17802,7 +17820,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 213, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -17873,7 +17891,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 209, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -17944,7 +17962,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 208, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -18164,7 +18182,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -18242,7 +18260,7 @@ }, "x-appwrite": { "method": "list", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -18322,7 +18340,7 @@ }, "x-appwrite": { "method": "create", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -18411,7 +18429,7 @@ }, "x-appwrite": { "method": "get", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -18477,7 +18495,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -18555,7 +18573,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -18608,7 +18626,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -18623,7 +18641,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -18698,7 +18716,7 @@ "tags": [ "teams" ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\r\n\r\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\r\n\r\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \r\n\r\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\r\n", + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", "responses": { "201": { "description": "Membership", @@ -18713,7 +18731,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -18813,7 +18831,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -18828,7 +18846,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -18889,7 +18907,7 @@ "tags": [ "teams" ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\r\n", + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", "responses": { "200": { "description": "Membership", @@ -18904,7 +18922,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -18995,7 +19013,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -19058,7 +19076,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\r\n\r\nIf the request is successful, a session for the user is automatically created.\r\n", + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", "responses": { "200": { "description": "Membership", @@ -19073,7 +19091,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -19174,7 +19192,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -19238,7 +19256,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19323,7 +19341,7 @@ }, "x-appwrite": { "method": "list", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -19399,7 +19417,7 @@ }, "x-appwrite": { "method": "create", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -19490,7 +19508,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -19578,7 +19596,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 231, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -19666,7 +19684,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -19737,7 +19755,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -19801,7 +19819,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -19889,7 +19907,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -19977,7 +19995,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -20095,7 +20113,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -20201,7 +20219,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -20309,7 +20327,7 @@ }, "x-appwrite": { "method": "get", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -20364,7 +20382,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -20428,7 +20446,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -20511,7 +20529,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -20581,7 +20599,7 @@ "tags": [ "users" ], - "description": "Update the user labels by its unique ID. \r\n\r\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", "responses": { "200": { "description": "User", @@ -20596,7 +20614,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -20682,7 +20700,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -20759,7 +20777,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -20823,7 +20841,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -20906,7 +20924,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -20985,7 +21003,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -21049,7 +21067,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -21111,7 +21129,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -21173,7 +21191,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -21237,7 +21255,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -21320,7 +21338,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -21403,7 +21421,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -21486,7 +21504,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -21548,7 +21566,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -21631,7 +21649,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -21678,7 +21696,7 @@ "tags": [ "users" ], - "description": "Creates a session for a user. Returns an immediately usable session object.\r\n\r\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", "responses": { "201": { "description": "Session", @@ -21693,7 +21711,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -21748,7 +21766,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -21805,7 +21823,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -21879,7 +21897,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -21962,7 +21980,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -22038,7 +22056,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -22151,7 +22169,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -22224,7 +22242,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -22316,7 +22334,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -22376,7 +22394,7 @@ "tags": [ "users" ], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\r\n", + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", "responses": { "201": { "description": "Token", @@ -22391,7 +22409,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -22476,7 +22494,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -22559,7 +22577,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -25580,12 +25598,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -25615,7 +25633,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -25780,7 +25798,7 @@ "specification": { "type": "string", "description": "Machine specification for builds and executions.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -26592,7 +26610,7 @@ "slug": { "type": "string", "description": "Size slug.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -27040,7 +27058,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -27062,6 +27080,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -27071,7 +27094,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] } }, diff --git a/app/config/specs/swagger2-1.6.x-client.json b/app/config/specs/swagger2-1.6.x-client.json index f070b1a4b0..cd935bc95e 100644 --- a/app/config/specs/swagger2-1.6.x-client.json +++ b/app/config/specs/swagger2-1.6.x-client.json @@ -5101,7 +5101,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -5186,7 +5186,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -5307,7 +5307,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -5381,7 +5381,7 @@ }, "x-appwrite": { "method": "query", - "weight": 330, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -5457,7 +5457,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 329, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -5981,7 +5981,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -6070,7 +6070,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -6145,7 +6145,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -6230,7 +6230,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 206, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -6324,7 +6324,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -6396,7 +6396,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 213, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -6487,7 +6487,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 214, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -6561,7 +6561,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 210, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -6635,7 +6635,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 209, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -6836,7 +6836,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6910,7 +6910,7 @@ }, "x-appwrite": { "method": "list", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6987,7 +6987,7 @@ }, "x-appwrite": { "method": "create", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -7081,7 +7081,7 @@ }, "x-appwrite": { "method": "get", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -7145,7 +7145,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -7222,7 +7222,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7277,7 +7277,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -7288,7 +7288,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7373,7 +7373,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7479,7 +7479,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -7490,7 +7490,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7562,7 +7562,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7650,7 +7650,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7724,7 +7724,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7822,7 +7822,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -7885,7 +7885,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -9445,12 +9445,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -9480,7 +9480,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -10008,7 +10008,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -10030,6 +10030,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -10039,7 +10044,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] } }, diff --git a/app/config/specs/swagger2-1.6.x-console.json b/app/config/specs/swagger2-1.6.x-console.json index ef651e4723..0c96ba472b 100644 --- a/app/config/specs/swagger2-1.6.x-console.json +++ b/app/config/specs/swagger2-1.6.x-console.json @@ -4659,7 +4659,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4731,7 +4731,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -7650,7 +7650,7 @@ "type": "integer", "description": "Maximum size of the string attribute.", "default": null, - "x-example": null + "x-example": 1 }, "newKey": { "type": "string", @@ -9427,7 +9427,7 @@ }, "x-appwrite": { "method": "list", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -9501,7 +9501,7 @@ }, "x-appwrite": { "method": "create", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -9609,7 +9609,8 @@ "cpp-20", "bun-1.0", "bun-1.1", - "go-1.23" + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -9734,7 +9735,7 @@ "specification": { "type": "string", "description": "Runtime specification for the function and builds.", - "default": "s-0.5vcpu-512mb", + "default": "s-1vcpu-512mb", "x-example": null } }, @@ -9772,7 +9773,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9825,7 +9826,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9879,7 +9880,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -9977,7 +9978,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -10039,7 +10040,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -10113,7 +10114,7 @@ }, "x-appwrite": { "method": "get", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -10174,7 +10175,7 @@ }, "x-appwrite": { "method": "update", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -10284,7 +10285,8 @@ "cpp-20", "bun-1.0", "bun-1.1", - "go-1.23" + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -10386,7 +10388,7 @@ "specification": { "type": "string", "description": "Runtime specification for the function and builds.", - "default": "s-0.5vcpu-512mb", + "default": "s-1vcpu-512mb", "x-example": null } }, @@ -10415,7 +10417,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -10478,7 +10480,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10560,7 +10562,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 298, + "weight": 299, "cookies": false, "type": "upload", "deprecated": false, @@ -10654,7 +10656,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -10723,7 +10725,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10787,7 +10789,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10853,7 +10855,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10937,7 +10939,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -11008,7 +11010,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 295, + "weight": 296, "cookies": false, "type": "location", "deprecated": false, @@ -11081,7 +11083,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -11166,7 +11168,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -11287,7 +11289,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -11354,7 +11356,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -11425,7 +11427,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -11507,7 +11509,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -11568,7 +11570,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -11656,7 +11658,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11725,7 +11727,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11813,7 +11815,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11884,7 +11886,7 @@ }, "x-appwrite": { "method": "query", - "weight": 330, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -11960,7 +11962,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 329, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -13888,7 +13890,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13965,7 +13967,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 386, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -14125,7 +14127,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -14282,7 +14284,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14457,7 +14459,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -14629,7 +14631,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -14749,7 +14751,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -14867,7 +14869,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14926,7 +14928,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -14990,7 +14992,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -15066,7 +15068,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -15142,7 +15144,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15219,7 +15221,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15336,7 +15338,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -15451,7 +15453,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15544,7 +15546,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -15635,7 +15637,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -15764,7 +15766,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15891,7 +15893,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15996,7 +15998,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16099,7 +16101,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -16216,7 +16218,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16331,7 +16333,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16492,7 +16494,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -16650,7 +16652,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -16755,7 +16757,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -16858,7 +16860,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -16963,7 +16965,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -17066,7 +17068,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -17171,7 +17173,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -17274,7 +17276,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -17379,7 +17381,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -17482,7 +17484,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -17541,7 +17543,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -17605,7 +17607,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -17681,7 +17683,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -17757,7 +17759,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17832,7 +17834,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -17924,7 +17926,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17986,7 +17988,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 379, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -18069,7 +18071,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -18133,7 +18135,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -18209,7 +18211,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -18292,7 +18294,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -18384,7 +18386,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -18451,7 +18453,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -18526,7 +18528,7 @@ }, "x-appwrite": { "method": "list", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -18555,7 +18557,7 @@ "parameters": [ { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors", "required": false, "type": "array", "collectionFormat": "multi", @@ -18601,7 +18603,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -18697,7 +18699,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18787,7 +18789,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18869,7 +18871,7 @@ }, "x-appwrite": { "method": "deleteFirebaseAuth", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -18921,7 +18923,7 @@ }, "x-appwrite": { "method": "createFirebaseOAuthMigration", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -19003,7 +19005,7 @@ }, "x-appwrite": { "method": "listFirebaseProjects", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -19055,7 +19057,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -19128,7 +19130,7 @@ }, "x-appwrite": { "method": "getFirebaseReportOAuth", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -19201,7 +19203,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -19324,7 +19326,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -19446,7 +19448,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -19562,7 +19564,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -19677,7 +19679,7 @@ }, "x-appwrite": { "method": "get", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -19737,7 +19739,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -19792,7 +19794,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -19854,7 +19856,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 195, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -19940,7 +19942,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 197, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19990,7 +19992,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 196, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -20069,7 +20071,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 198, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -20129,7 +20131,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 199, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -20208,7 +20210,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 200, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -20682,7 +20684,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 169, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20918,7 +20920,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 162, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20998,7 +21000,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 161, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -21078,7 +21080,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 167, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -21158,7 +21160,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 168, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -21241,7 +21243,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 165, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -21321,7 +21323,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 164, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -21401,7 +21403,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 166, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -21537,6 +21539,86 @@ ] } }, + "\/projects\/{projectId}\/auth\/teams-sensitive-attributes": { + "patch": { + "summary": "Update project team sensitive attributes", + "operationId": "projectsUpdateTeamsSensitiveAttributes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateTeamsSensitiveAttributes", + "weight": 161, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-teams-sensitive-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "offline-model": "", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Set to true to show sensitive attributes to team members.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21561,7 +21643,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 163, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21660,7 +21742,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 181, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21749,7 +21831,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 177, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21809,7 +21891,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 176, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21905,7 +21987,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 178, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21973,7 +22055,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 179, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -22070,7 +22152,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 180, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -22281,7 +22363,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 183, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -22341,7 +22423,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 182, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22465,7 +22547,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 184, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22533,7 +22615,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 185, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22632,7 +22714,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 186, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22884,7 +22966,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 187, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -23013,7 +23095,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 188, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -23233,7 +23315,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 190, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23455,7 +23537,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 192, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23720,7 +23802,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 194, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23944,7 +24026,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 189, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -24163,7 +24245,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 191, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -24400,7 +24482,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 193, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24621,7 +24703,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 171, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -24681,7 +24763,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 170, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -24803,7 +24885,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 172, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -24871,7 +24953,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 173, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -24994,7 +25076,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 175, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -25064,7 +25146,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 174, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -25134,7 +25216,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -25207,7 +25289,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -25298,7 +25380,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -25353,7 +25435,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -25415,7 +25497,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -25477,7 +25559,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 202, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25551,7 +25633,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 201, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -25692,7 +25774,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -25753,7 +25835,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25888,7 +25970,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -25951,7 +26033,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -26036,7 +26118,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 206, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -26130,7 +26212,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -26202,7 +26284,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 213, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -26293,7 +26375,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 214, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -26367,7 +26449,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 210, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -26441,7 +26523,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 209, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -26642,7 +26724,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -26716,7 +26798,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 215, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -26790,7 +26872,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 216, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -26872,7 +26954,7 @@ }, "x-appwrite": { "method": "list", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -26949,7 +27031,7 @@ }, "x-appwrite": { "method": "create", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -27043,7 +27125,7 @@ }, "x-appwrite": { "method": "get", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -27107,7 +27189,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -27184,7 +27266,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -27250,7 +27332,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -27313,7 +27395,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -27324,7 +27406,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -27409,7 +27491,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -27515,7 +27597,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -27526,7 +27608,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -27598,7 +27680,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -27686,7 +27768,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -27760,7 +27842,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -27857,7 +27939,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -27919,7 +28001,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -28001,7 +28083,7 @@ }, "x-appwrite": { "method": "list", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -28075,7 +28157,7 @@ }, "x-appwrite": { "method": "create", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -28172,7 +28254,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -28265,7 +28347,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -28358,7 +28440,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -28429,7 +28511,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -28492,7 +28574,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -28585,7 +28667,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -28678,7 +28760,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -28806,7 +28888,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -28920,7 +29002,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -29034,7 +29116,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -29108,7 +29190,7 @@ }, "x-appwrite": { "method": "get", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -29164,7 +29246,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -29227,7 +29309,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -29308,7 +29390,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -29392,7 +29474,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -29476,7 +29558,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -29551,7 +29633,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -29614,7 +29696,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -29695,7 +29777,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -29771,7 +29853,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -29834,7 +29916,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -29895,7 +29977,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -29956,7 +30038,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -30019,7 +30101,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -30100,7 +30182,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -30181,7 +30263,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -30262,7 +30344,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -30323,7 +30405,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -30404,7 +30486,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -30465,7 +30547,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -30521,7 +30603,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -30579,7 +30661,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -30650,7 +30732,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -30731,7 +30813,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -30805,7 +30887,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -30920,7 +31002,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -30990,7 +31072,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -31084,7 +31166,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -31156,7 +31238,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -31240,7 +31322,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -31321,7 +31403,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -31402,7 +31484,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -31471,7 +31553,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -31558,7 +31640,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -31628,7 +31710,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -31698,7 +31780,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -31777,7 +31859,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -31857,7 +31939,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -31945,7 +32027,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -32020,7 +32102,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -32075,7 +32157,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -35373,12 +35455,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -35408,7 +35490,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -35574,7 +35656,7 @@ "specification": { "type": "string", "description": "Machine specification for builds and executions.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -36495,6 +36577,11 @@ "description": "Whether or not to send session alert emails to users.", "x-example": true }, + "teamsSensitiveAttributes": { + "type": "boolean", + "description": "Whether or not to show sensitive attributes in the teams API.", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -36704,6 +36791,7 @@ "authPersonalDataCheck", "authMockNumbers", "authSessionAlerts", + "teamsSensitiveAttributes", "oAuthProviders", "platforms", "webhooks", @@ -38326,7 +38414,7 @@ "slug": { "type": "string", "description": "Size slug.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -38967,7 +39055,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -38989,6 +39077,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -38998,7 +39091,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] }, "migration": { @@ -39035,9 +39129,14 @@ "description": "A string containing the type of source of the migration.", "x-example": "Appwrite" }, + "destination": { + "type": "string", + "description": "A string containing the type of destination of the migration.", + "x-example": "Appwrite" + }, "resources": { "type": "array", - "description": "Resources to migration.", + "description": "Resources to migrate.", "items": { "type": "string" }, @@ -39073,6 +39172,7 @@ "status", "stage", "source", + "destination", "resources", "statusCounters", "resourceData", diff --git a/app/config/specs/swagger2-1.6.x-server.json b/app/config/specs/swagger2-1.6.x-server.json index 37018916fa..a1e32ab4a1 100644 --- a/app/config/specs/swagger2-1.6.x-server.json +++ b/app/config/specs/swagger2-1.6.x-server.json @@ -7157,7 +7157,7 @@ "type": "integer", "description": "Maximum size of the string attribute.", "default": null, - "x-example": null + "x-example": 1 }, "newKey": { "type": "string", @@ -8535,7 +8535,7 @@ }, "x-appwrite": { "method": "list", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -8610,7 +8610,7 @@ }, "x-appwrite": { "method": "create", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -8719,7 +8719,8 @@ "cpp-20", "bun-1.0", "bun-1.1", - "go-1.23" + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -8844,7 +8845,7 @@ "specification": { "type": "string", "description": "Runtime specification for the function and builds.", - "default": "s-0.5vcpu-512mb", + "default": "s-1vcpu-512mb", "x-example": null } }, @@ -8882,7 +8883,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8936,7 +8937,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8991,7 +8992,7 @@ }, "x-appwrite": { "method": "get", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9053,7 +9054,7 @@ }, "x-appwrite": { "method": "update", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -9164,7 +9165,8 @@ "cpp-20", "bun-1.0", "bun-1.1", - "go-1.23" + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -9266,7 +9268,7 @@ "specification": { "type": "string", "description": "Runtime specification for the function and builds.", - "default": "s-0.5vcpu-512mb", + "default": "s-1vcpu-512mb", "x-example": null } }, @@ -9295,7 +9297,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -9359,7 +9361,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9442,7 +9444,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 298, + "weight": 299, "cookies": false, "type": "upload", "deprecated": false, @@ -9537,7 +9539,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -9607,7 +9609,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9672,7 +9674,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9739,7 +9741,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9824,7 +9826,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9896,7 +9898,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 295, + "weight": 296, "cookies": false, "type": "location", "deprecated": false, @@ -9970,7 +9972,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -10057,7 +10059,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -10180,7 +10182,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10249,7 +10251,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10321,7 +10323,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10383,7 +10385,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -10472,7 +10474,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -10542,7 +10544,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -10631,7 +10633,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10703,7 +10705,7 @@ }, "x-appwrite": { "method": "query", - "weight": 330, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -10781,7 +10783,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 329, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -12750,7 +12752,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -12828,7 +12830,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 386, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -12989,7 +12991,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -13147,7 +13149,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -13323,7 +13325,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -13496,7 +13498,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -13617,7 +13619,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -13736,7 +13738,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13796,7 +13798,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -13861,7 +13863,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13938,7 +13940,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -14015,7 +14017,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14093,7 +14095,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -14211,7 +14213,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -14327,7 +14329,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -14421,7 +14423,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -14513,7 +14515,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -14643,7 +14645,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -14771,7 +14773,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -14877,7 +14879,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -14981,7 +14983,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -15099,7 +15101,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -15215,7 +15217,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15377,7 +15379,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15536,7 +15538,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15642,7 +15644,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15746,7 +15748,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -15852,7 +15854,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -15956,7 +15958,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -16062,7 +16064,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16166,7 +16168,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16272,7 +16274,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16376,7 +16378,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -16436,7 +16438,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -16501,7 +16503,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -16578,7 +16580,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -16655,7 +16657,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16731,7 +16733,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -16824,7 +16826,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16887,7 +16889,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 379, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -16971,7 +16973,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17036,7 +17038,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17113,7 +17115,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -17197,7 +17199,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17291,7 +17293,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -17359,7 +17361,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -17436,7 +17438,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 202, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -17511,7 +17513,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 201, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -17653,7 +17655,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -17715,7 +17717,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -17851,7 +17853,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -17915,7 +17917,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -18002,7 +18004,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 206, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -18098,7 +18100,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -18172,7 +18174,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 213, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -18265,7 +18267,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 214, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -18341,7 +18343,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 210, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -18417,7 +18419,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 209, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -18620,7 +18622,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -18696,7 +18698,7 @@ }, "x-appwrite": { "method": "list", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -18775,7 +18777,7 @@ }, "x-appwrite": { "method": "create", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -18871,7 +18873,7 @@ }, "x-appwrite": { "method": "get", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -18937,7 +18939,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -19016,7 +19018,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -19073,7 +19075,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -19084,7 +19086,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -19171,7 +19173,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -19279,7 +19281,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -19290,7 +19292,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -19364,7 +19366,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -19454,7 +19456,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -19530,7 +19532,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -19629,7 +19631,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -19693,7 +19695,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19777,7 +19779,7 @@ }, "x-appwrite": { "method": "list", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -19852,7 +19854,7 @@ }, "x-appwrite": { "method": "create", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -19950,7 +19952,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -20044,7 +20046,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -20138,7 +20140,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -20210,7 +20212,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20274,7 +20276,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -20368,7 +20370,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -20462,7 +20464,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -20591,7 +20593,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -20706,7 +20708,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -20821,7 +20823,7 @@ }, "x-appwrite": { "method": "get", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -20878,7 +20880,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -20942,7 +20944,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -21024,7 +21026,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -21109,7 +21111,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -21194,7 +21196,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -21270,7 +21272,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -21334,7 +21336,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -21416,7 +21418,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -21493,7 +21495,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -21557,7 +21559,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -21619,7 +21621,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -21681,7 +21683,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -21745,7 +21747,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -21827,7 +21829,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -21909,7 +21911,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -21991,7 +21993,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -22053,7 +22055,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -22135,7 +22137,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -22197,7 +22199,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -22254,7 +22256,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -22313,7 +22315,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -22385,7 +22387,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -22467,7 +22469,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -22542,7 +22544,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -22658,7 +22660,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -22729,7 +22731,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -22824,7 +22826,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -22897,7 +22899,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -22982,7 +22984,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -23064,7 +23066,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -26082,12 +26084,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -26117,7 +26119,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -26283,7 +26285,7 @@ "specification": { "type": "string", "description": "Machine specification for builds and executions.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -27097,7 +27099,7 @@ "slug": { "type": "string", "description": "Size slug.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -27548,7 +27550,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -27570,6 +27572,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -27579,7 +27586,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] } }, diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index fce6a871a3..cd935bc95e 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -87,7 +87,7 @@ }, "x-appwrite": { "method": "get", - "weight": 8, + "weight": 9, "cookies": false, "type": "", "deprecated": false, @@ -140,7 +140,7 @@ }, "x-appwrite": { "method": "create", - "weight": 7, + "weight": 8, "cookies": false, "type": "", "deprecated": false, @@ -222,7 +222,7 @@ "tags": [ "account" ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\r\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\r\n", + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", "responses": { "200": { "description": "User", @@ -233,7 +233,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 33, + "weight": 34, "cookies": false, "type": "", "deprecated": false, @@ -315,7 +315,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 56, + "weight": 57, "cookies": false, "type": "", "deprecated": false, @@ -379,7 +379,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 57, + "weight": 58, "cookies": false, "type": "", "deprecated": false, @@ -444,7 +444,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 28, + "weight": 29, "cookies": false, "type": "", "deprecated": false, @@ -497,7 +497,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 30, + "weight": 31, "cookies": false, "type": "", "deprecated": false, @@ -566,7 +566,7 @@ }, "x-appwrite": { "method": "updateMFA", - "weight": 43, + "weight": 44, "cookies": false, "type": "", "deprecated": false, @@ -641,7 +641,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", - "weight": 45, + "weight": 46, "cookies": false, "type": "", "deprecated": false, @@ -709,7 +709,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", - "weight": 46, + "weight": 47, "cookies": false, "type": "", "deprecated": false, @@ -790,7 +790,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 50, + "weight": 51, "cookies": false, "type": "", "deprecated": false, @@ -860,7 +860,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", - "weight": 51, + "weight": 52, "cookies": false, "type": "", "deprecated": false, @@ -934,7 +934,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", - "weight": 52, + "weight": 53, "cookies": false, "type": "", "deprecated": false, @@ -1016,7 +1016,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 44, + "weight": 45, "cookies": false, "type": "", "deprecated": false, @@ -1071,7 +1071,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 49, + "weight": 50, "cookies": false, "type": "", "deprecated": false, @@ -1124,7 +1124,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 47, + "weight": 48, "cookies": false, "type": "", "deprecated": false, @@ -1177,7 +1177,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 48, + "weight": 49, "cookies": false, "type": "", "deprecated": false, @@ -1232,7 +1232,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 31, + "weight": 32, "cookies": false, "type": "", "deprecated": false, @@ -1307,7 +1307,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 32, + "weight": 33, "cookies": false, "type": "", "deprecated": false, @@ -1388,7 +1388,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 34, + "weight": 35, "cookies": false, "type": "", "deprecated": false, @@ -1470,7 +1470,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 29, + "weight": 30, "cookies": false, "type": "", "deprecated": false, @@ -1523,7 +1523,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 35, + "weight": 36, "cookies": false, "type": "", "deprecated": false, @@ -1598,7 +1598,7 @@ }, "x-appwrite": { "method": "createRecovery", - "weight": 37, + "weight": 38, "cookies": false, "type": "", "deprecated": false, @@ -1670,7 +1670,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", "responses": { "200": { "description": "Token", @@ -1681,7 +1681,7 @@ }, "x-appwrite": { "method": "updateRecovery", - "weight": 38, + "weight": 39, "cookies": false, "type": "", "deprecated": false, @@ -1770,7 +1770,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 10, + "weight": 11, "cookies": false, "type": "", "deprecated": false, @@ -1818,7 +1818,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 11, + "weight": 12, "cookies": false, "type": "", "deprecated": false, @@ -1873,7 +1873,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", - "weight": 16, + "weight": 17, "cookies": false, "type": "", "deprecated": false, @@ -1915,7 +1915,7 @@ "tags": [ "account" ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Session", @@ -1926,7 +1926,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", - "weight": 15, + "weight": 16, "cookies": false, "type": "", "deprecated": false, @@ -2006,7 +2006,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", - "weight": 25, + "weight": 26, "cookies": false, "type": "", "deprecated": true, @@ -2075,7 +2075,7 @@ "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\r\n\r\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\r\n", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "301": { "description": "No content" @@ -2083,7 +2083,7 @@ }, "x-appwrite": { "method": "createOAuth2Session", - "weight": 18, + "weight": 19, "cookies": false, "type": "webAuth", "deprecated": false, @@ -2221,7 +2221,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", - "weight": 26, + "weight": 27, "cookies": false, "type": "", "deprecated": true, @@ -2301,7 +2301,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 17, + "weight": 18, "cookies": false, "type": "", "deprecated": false, @@ -2381,7 +2381,7 @@ }, "x-appwrite": { "method": "getSession", - "weight": 12, + "weight": 13, "cookies": false, "type": "", "deprecated": false, @@ -2444,7 +2444,7 @@ }, "x-appwrite": { "method": "updateSession", - "weight": 14, + "weight": 15, "cookies": false, "type": "", "deprecated": false, @@ -2502,7 +2502,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 13, + "weight": 14, "cookies": false, "type": "", "deprecated": false, @@ -2567,7 +2567,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 36, + "weight": 37, "cookies": false, "type": "", "deprecated": false, @@ -2622,7 +2622,7 @@ }, "x-appwrite": { "method": "createPushTarget", - "weight": 53, + "weight": 54, "cookies": false, "type": "", "deprecated": false, @@ -2708,7 +2708,7 @@ }, "x-appwrite": { "method": "updatePushTarget", - "weight": 54, + "weight": 55, "cookies": false, "type": "", "deprecated": false, @@ -2784,7 +2784,7 @@ }, "x-appwrite": { "method": "deletePushTarget", - "weight": 55, + "weight": 56, "cookies": false, "type": "", "deprecated": false, @@ -2836,7 +2836,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -2847,7 +2847,7 @@ }, "x-appwrite": { "method": "createEmailToken", - "weight": 24, + "weight": 25, "cookies": false, "type": "", "deprecated": false, @@ -2922,7 +2922,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\r\n", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2933,7 +2933,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", - "weight": 23, + "weight": 24, "cookies": false, "type": "", "deprecated": false, @@ -3017,7 +3017,7 @@ "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \r\n\r\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "301": { "description": "No content" @@ -3025,7 +3025,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", - "weight": 22, + "weight": 23, "cookies": false, "type": "webAuth", "deprecated": false, @@ -3152,7 +3152,7 @@ "tags": [ "account" ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -3163,7 +3163,7 @@ }, "x-appwrite": { "method": "createPhoneToken", - "weight": 27, + "weight": 28, "cookies": false, "type": "", "deprecated": false, @@ -3235,7 +3235,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\r\n", + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", "responses": { "201": { "description": "Token", @@ -3246,7 +3246,7 @@ }, "x-appwrite": { "method": "createVerification", - "weight": 39, + "weight": 40, "cookies": false, "type": "", "deprecated": false, @@ -3319,7 +3319,7 @@ }, "x-appwrite": { "method": "updateVerification", - "weight": 40, + "weight": 41, "cookies": false, "type": "", "deprecated": false, @@ -3401,7 +3401,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", - "weight": 41, + "weight": 42, "cookies": false, "type": "", "deprecated": false, @@ -3457,7 +3457,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 42, + "weight": 43, "cookies": false, "type": "", "deprecated": false, @@ -3528,7 +3528,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", "responses": { "200": { "description": "Image", @@ -3539,7 +3539,7 @@ }, "x-appwrite": { "method": "getBrowser", - "weight": 59, + "weight": 60, "cookies": false, "type": "location", "deprecated": false, @@ -3657,7 +3657,7 @@ "tags": [ "avatars" ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image", @@ -3668,7 +3668,7 @@ }, "x-appwrite": { "method": "getCreditCard", - "weight": 58, + "weight": 59, "cookies": false, "type": "location", "deprecated": false, @@ -3790,7 +3790,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image", @@ -3801,7 +3801,7 @@ }, "x-appwrite": { "method": "getFavicon", - "weight": 62, + "weight": 63, "cookies": false, "type": "location", "deprecated": false, @@ -3857,7 +3857,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image", @@ -3868,7 +3868,7 @@ }, "x-appwrite": { "method": "getFlag", - "weight": 60, + "weight": 61, "cookies": false, "type": "location", "deprecated": false, @@ -4348,7 +4348,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image", @@ -4359,7 +4359,7 @@ }, "x-appwrite": { "method": "getImage", - "weight": 61, + "weight": 62, "cookies": false, "type": "location", "deprecated": false, @@ -4435,7 +4435,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\r\n\r\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image", @@ -4446,7 +4446,7 @@ }, "x-appwrite": { "method": "getInitials", - "weight": 64, + "weight": 65, "cookies": false, "type": "location", "deprecated": false, @@ -4530,7 +4530,7 @@ "tags": [ "avatars" ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\r\n", + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", "responses": { "200": { "description": "Image", @@ -4541,7 +4541,7 @@ }, "x-appwrite": { "method": "getQR", - "weight": 63, + "weight": 64, "cookies": false, "type": "location", "deprecated": false, @@ -4636,7 +4636,7 @@ }, "x-appwrite": { "method": "listDocuments", - "weight": 108, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -4720,7 +4720,7 @@ }, "x-appwrite": { "method": "createDocument", - "weight": 107, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -4828,7 +4828,7 @@ }, "x-appwrite": { "method": "getDocument", - "weight": 109, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -4920,7 +4920,7 @@ }, "x-appwrite": { "method": "updateDocument", - "weight": 111, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -5019,7 +5019,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 112, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -5101,7 +5101,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -5167,7 +5167,7 @@ "summary": "Create execution", "operationId": "functionsCreateExecution", "consumes": [ - "multipart\/form-data" + "application\/json" ], "produces": [ "multipart\/form-data" @@ -5186,7 +5186,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -5226,65 +5226,59 @@ "in": "path" }, { - "name": "body", - "description": "HTTP body of execution. Default value is empty string.", - "required": false, - "type": "payload", - "default": "", - "in": "formData" - }, - { - "name": "async", - "description": "Execute code in the background. Default value is false.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "formData" - }, - { - "name": "path", - "description": "HTTP path of execution. Path can include query params. Default value is \/", - "required": false, - "type": "string", - "x-example": "", - "default": "\/", - "in": "formData" - }, - { - "name": "method", - "description": "HTTP method of execution. Default value is GET.", - "required": false, - "type": "string", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [], - "default": "POST", - "in": "formData" - }, - { - "name": "headers", - "description": "HTTP headers of execution. Defaults to empty.", - "required": false, - "type": "object", - "default": [], - "x-example": "{}", - "in": "formData" - }, - { - "name": "scheduledAt", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "required": false, - "type": "string", - "in": "formData" + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "default": "", + "x-example": "" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "default": false, + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "default": "\/", + "x-example": "" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is GET.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "default": [], + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "default": null, + "x-example": null + } + } + } } ] } @@ -5313,7 +5307,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -5387,7 +5381,7 @@ }, "x-appwrite": { "method": "query", - "weight": 329, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -5463,7 +5457,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 328, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -5528,7 +5522,7 @@ "tags": [ "locale" ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\r\n\r\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", "responses": { "200": { "description": "Locale", @@ -5539,7 +5533,7 @@ }, "x-appwrite": { "method": "get", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -5595,7 +5589,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -5651,7 +5645,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5707,7 +5701,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -5763,7 +5757,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -5819,7 +5813,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -5875,7 +5869,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5931,7 +5925,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5987,7 +5981,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -6076,7 +6070,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -6151,7 +6145,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -6225,7 +6219,7 @@ "tags": [ "storage" ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\r\n\r\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\r\n\r\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\r\n\r\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\r\n", + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", "responses": { "201": { "description": "File", @@ -6236,7 +6230,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 205, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -6330,7 +6324,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -6402,7 +6396,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 212, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -6493,7 +6487,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 213, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -6567,7 +6561,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 209, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -6641,7 +6635,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 208, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -6842,7 +6836,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6916,7 +6910,7 @@ }, "x-appwrite": { "method": "list", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6993,7 +6987,7 @@ }, "x-appwrite": { "method": "create", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -7087,7 +7081,7 @@ }, "x-appwrite": { "method": "get", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -7151,7 +7145,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -7228,7 +7222,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7283,7 +7277,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -7294,7 +7288,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7368,7 +7362,7 @@ "tags": [ "teams" ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\r\n\r\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\r\n\r\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \r\n\r\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\r\n", + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", "responses": { "201": { "description": "Membership", @@ -7379,7 +7373,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7485,7 +7479,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -7496,7 +7490,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7557,7 +7551,7 @@ "tags": [ "teams" ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\r\n", + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", "responses": { "200": { "description": "Membership", @@ -7568,7 +7562,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7656,7 +7650,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7719,7 +7713,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\r\n\r\nIf the request is successful, a session for the user is automatically created.\r\n", + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", "responses": { "200": { "description": "Membership", @@ -7730,7 +7724,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7828,7 +7822,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -7891,7 +7885,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -9451,12 +9445,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -9486,7 +9480,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -9590,7 +9584,7 @@ "format": "int32" }, "responseBody": { - "type": "payload", + "type": "string", "description": "HTTP response body. This will return empty unless execution is created as synchronous.", "x-example": "" }, @@ -10014,7 +10008,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -10036,6 +10030,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -10045,7 +10044,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] } }, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 9200c80593..0c96ba472b 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -99,7 +99,7 @@ }, "x-appwrite": { "method": "get", - "weight": 8, + "weight": 9, "cookies": false, "type": "", "deprecated": false, @@ -151,7 +151,7 @@ }, "x-appwrite": { "method": "create", - "weight": 7, + "weight": 8, "cookies": false, "type": "", "deprecated": false, @@ -237,7 +237,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 9, + "weight": 10, "cookies": false, "type": "", "deprecated": false, @@ -278,7 +278,7 @@ "tags": [ "account" ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\r\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\r\n", + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", "responses": { "200": { "description": "User", @@ -289,7 +289,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 33, + "weight": 34, "cookies": false, "type": "", "deprecated": false, @@ -370,7 +370,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 56, + "weight": 57, "cookies": false, "type": "", "deprecated": false, @@ -433,7 +433,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 57, + "weight": 58, "cookies": false, "type": "", "deprecated": false, @@ -497,7 +497,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 28, + "weight": 29, "cookies": false, "type": "", "deprecated": false, @@ -550,7 +550,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 30, + "weight": 31, "cookies": false, "type": "", "deprecated": false, @@ -618,7 +618,7 @@ }, "x-appwrite": { "method": "updateMFA", - "weight": 43, + "weight": 44, "cookies": false, "type": "", "deprecated": false, @@ -692,7 +692,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", - "weight": 45, + "weight": 46, "cookies": false, "type": "", "deprecated": false, @@ -759,7 +759,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", - "weight": 46, + "weight": 47, "cookies": false, "type": "", "deprecated": false, @@ -839,7 +839,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 50, + "weight": 51, "cookies": false, "type": "", "deprecated": false, @@ -908,7 +908,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", - "weight": 51, + "weight": 52, "cookies": false, "type": "", "deprecated": false, @@ -982,7 +982,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", - "weight": 52, + "weight": 53, "cookies": false, "type": "", "deprecated": false, @@ -1063,7 +1063,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 44, + "weight": 45, "cookies": false, "type": "", "deprecated": false, @@ -1117,7 +1117,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 49, + "weight": 50, "cookies": false, "type": "", "deprecated": false, @@ -1169,7 +1169,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 47, + "weight": 48, "cookies": false, "type": "", "deprecated": false, @@ -1221,7 +1221,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 48, + "weight": 49, "cookies": false, "type": "", "deprecated": false, @@ -1275,7 +1275,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 31, + "weight": 32, "cookies": false, "type": "", "deprecated": false, @@ -1349,7 +1349,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 32, + "weight": 33, "cookies": false, "type": "", "deprecated": false, @@ -1429,7 +1429,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 34, + "weight": 35, "cookies": false, "type": "", "deprecated": false, @@ -1510,7 +1510,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 29, + "weight": 30, "cookies": false, "type": "", "deprecated": false, @@ -1562,7 +1562,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 35, + "weight": 36, "cookies": false, "type": "", "deprecated": false, @@ -1636,7 +1636,7 @@ }, "x-appwrite": { "method": "createRecovery", - "weight": 37, + "weight": 38, "cookies": false, "type": "", "deprecated": false, @@ -1707,7 +1707,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", "responses": { "200": { "description": "Token", @@ -1718,7 +1718,7 @@ }, "x-appwrite": { "method": "updateRecovery", - "weight": 38, + "weight": 39, "cookies": false, "type": "", "deprecated": false, @@ -1806,7 +1806,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 10, + "weight": 11, "cookies": false, "type": "", "deprecated": false, @@ -1853,7 +1853,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 11, + "weight": 12, "cookies": false, "type": "", "deprecated": false, @@ -1907,7 +1907,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", - "weight": 16, + "weight": 17, "cookies": false, "type": "", "deprecated": false, @@ -1949,7 +1949,7 @@ "tags": [ "account" ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Session", @@ -1960,7 +1960,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", - "weight": 15, + "weight": 16, "cookies": false, "type": "", "deprecated": false, @@ -2040,7 +2040,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", - "weight": 25, + "weight": 26, "cookies": false, "type": "", "deprecated": true, @@ -2109,7 +2109,7 @@ "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\r\n\r\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\r\n", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "301": { "description": "No content" @@ -2117,7 +2117,7 @@ }, "x-appwrite": { "method": "createOAuth2Session", - "weight": 18, + "weight": 19, "cookies": false, "type": "webAuth", "deprecated": false, @@ -2255,7 +2255,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", - "weight": 26, + "weight": 27, "cookies": false, "type": "", "deprecated": true, @@ -2335,7 +2335,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 17, + "weight": 18, "cookies": false, "type": "", "deprecated": false, @@ -2415,7 +2415,7 @@ }, "x-appwrite": { "method": "getSession", - "weight": 12, + "weight": 13, "cookies": false, "type": "", "deprecated": false, @@ -2477,7 +2477,7 @@ }, "x-appwrite": { "method": "updateSession", - "weight": 14, + "weight": 15, "cookies": false, "type": "", "deprecated": false, @@ -2534,7 +2534,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 13, + "weight": 14, "cookies": false, "type": "", "deprecated": false, @@ -2598,7 +2598,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 36, + "weight": 37, "cookies": false, "type": "", "deprecated": false, @@ -2652,7 +2652,7 @@ }, "x-appwrite": { "method": "createPushTarget", - "weight": 53, + "weight": 54, "cookies": false, "type": "", "deprecated": false, @@ -2737,7 +2737,7 @@ }, "x-appwrite": { "method": "updatePushTarget", - "weight": 54, + "weight": 55, "cookies": false, "type": "", "deprecated": false, @@ -2812,7 +2812,7 @@ }, "x-appwrite": { "method": "deletePushTarget", - "weight": 55, + "weight": 56, "cookies": false, "type": "", "deprecated": false, @@ -2863,7 +2863,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -2874,7 +2874,7 @@ }, "x-appwrite": { "method": "createEmailToken", - "weight": 24, + "weight": 25, "cookies": false, "type": "", "deprecated": false, @@ -2949,7 +2949,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\r\n", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2960,7 +2960,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", - "weight": 23, + "weight": 24, "cookies": false, "type": "", "deprecated": false, @@ -3044,7 +3044,7 @@ "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \r\n\r\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "301": { "description": "No content" @@ -3052,7 +3052,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", - "weight": 22, + "weight": 23, "cookies": false, "type": "webAuth", "deprecated": false, @@ -3179,7 +3179,7 @@ "tags": [ "account" ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -3190,7 +3190,7 @@ }, "x-appwrite": { "method": "createPhoneToken", - "weight": 27, + "weight": 28, "cookies": false, "type": "", "deprecated": false, @@ -3262,7 +3262,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\r\n", + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", "responses": { "201": { "description": "Token", @@ -3273,7 +3273,7 @@ }, "x-appwrite": { "method": "createVerification", - "weight": 39, + "weight": 40, "cookies": false, "type": "", "deprecated": false, @@ -3345,7 +3345,7 @@ }, "x-appwrite": { "method": "updateVerification", - "weight": 40, + "weight": 41, "cookies": false, "type": "", "deprecated": false, @@ -3426,7 +3426,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", - "weight": 41, + "weight": 42, "cookies": false, "type": "", "deprecated": false, @@ -3481,7 +3481,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 42, + "weight": 43, "cookies": false, "type": "", "deprecated": false, @@ -3551,7 +3551,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", "responses": { "200": { "description": "Image", @@ -3562,7 +3562,7 @@ }, "x-appwrite": { "method": "getBrowser", - "weight": 59, + "weight": 60, "cookies": false, "type": "location", "deprecated": false, @@ -3680,7 +3680,7 @@ "tags": [ "avatars" ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image", @@ -3691,7 +3691,7 @@ }, "x-appwrite": { "method": "getCreditCard", - "weight": 58, + "weight": 59, "cookies": false, "type": "location", "deprecated": false, @@ -3813,7 +3813,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image", @@ -3824,7 +3824,7 @@ }, "x-appwrite": { "method": "getFavicon", - "weight": 62, + "weight": 63, "cookies": false, "type": "location", "deprecated": false, @@ -3880,7 +3880,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image", @@ -3891,7 +3891,7 @@ }, "x-appwrite": { "method": "getFlag", - "weight": 60, + "weight": 61, "cookies": false, "type": "location", "deprecated": false, @@ -4371,7 +4371,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image", @@ -4382,7 +4382,7 @@ }, "x-appwrite": { "method": "getImage", - "weight": 61, + "weight": 62, "cookies": false, "type": "location", "deprecated": false, @@ -4458,7 +4458,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\r\n\r\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image", @@ -4469,7 +4469,7 @@ }, "x-appwrite": { "method": "getInitials", - "weight": 64, + "weight": 65, "cookies": false, "type": "location", "deprecated": false, @@ -4553,7 +4553,7 @@ "tags": [ "avatars" ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\r\n", + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", "responses": { "200": { "description": "Image", @@ -4564,7 +4564,7 @@ }, "x-appwrite": { "method": "getQR", - "weight": 63, + "weight": 64, "cookies": false, "type": "location", "deprecated": false, @@ -4659,7 +4659,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 331, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4731,7 +4731,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 330, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4783,7 +4783,7 @@ }, "x-appwrite": { "method": "list", - "weight": 69, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -4846,7 +4846,7 @@ "tags": [ "databases" ], - "description": "Create a new Database.\r\n", + "description": "Create a new Database.\n", "responses": { "201": { "description": "Database", @@ -4857,7 +4857,7 @@ }, "x-appwrite": { "method": "create", - "weight": 68, + "weight": 69, "cookies": false, "type": "", "deprecated": false, @@ -4943,7 +4943,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -5017,7 +5017,7 @@ }, "x-appwrite": { "method": "get", - "weight": 70, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -5078,7 +5078,7 @@ }, "x-appwrite": { "method": "update", - "weight": 72, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -5158,7 +5158,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 73, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -5221,7 +5221,7 @@ }, "x-appwrite": { "method": "listCollections", - "weight": 75, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -5303,7 +5303,7 @@ }, "x-appwrite": { "method": "createCollection", - "weight": 74, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -5412,7 +5412,7 @@ }, "x-appwrite": { "method": "getCollection", - "weight": 76, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -5481,7 +5481,7 @@ }, "x-appwrite": { "method": "updateCollection", - "weight": 78, + "weight": 79, "cookies": false, "type": "", "deprecated": false, @@ -5584,7 +5584,7 @@ }, "x-appwrite": { "method": "deleteCollection", - "weight": 79, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -5655,7 +5655,7 @@ }, "x-appwrite": { "method": "listAttributes", - "weight": 90, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -5727,7 +5727,7 @@ "tags": [ "databases" ], - "description": "Create a boolean attribute.\r\n", + "description": "Create a boolean attribute.\n", "responses": { "202": { "description": "AttributeBoolean", @@ -5738,7 +5738,7 @@ }, "x-appwrite": { "method": "createBooleanAttribute", - "weight": 87, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -5844,7 +5844,7 @@ }, "x-appwrite": { "method": "updateBooleanAttribute", - "weight": 99, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -5954,7 +5954,7 @@ }, "x-appwrite": { "method": "createDatetimeAttribute", - "weight": 88, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -6060,7 +6060,7 @@ }, "x-appwrite": { "method": "updateDatetimeAttribute", - "weight": 100, + "weight": 101, "cookies": false, "type": "", "deprecated": false, @@ -6159,7 +6159,7 @@ "tags": [ "databases" ], - "description": "Create an email attribute.\r\n", + "description": "Create an email attribute.\n", "responses": { "202": { "description": "AttributeEmail", @@ -6170,7 +6170,7 @@ }, "x-appwrite": { "method": "createEmailAttribute", - "weight": 81, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -6265,7 +6265,7 @@ "tags": [ "databases" ], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeEmail", @@ -6276,7 +6276,7 @@ }, "x-appwrite": { "method": "updateEmailAttribute", - "weight": 93, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -6375,7 +6375,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \r\n", + "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -6386,7 +6386,7 @@ }, "x-appwrite": { "method": "createEnumAttribute", - "weight": 82, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -6491,7 +6491,7 @@ "tags": [ "databases" ], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeEnum", @@ -6502,7 +6502,7 @@ }, "x-appwrite": { "method": "updateEnumAttribute", - "weight": 94, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -6611,7 +6611,7 @@ "tags": [ "databases" ], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\r\n", + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { "202": { "description": "AttributeFloat", @@ -6622,7 +6622,7 @@ }, "x-appwrite": { "method": "createFloatAttribute", - "weight": 86, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -6729,7 +6729,7 @@ "tags": [ "databases" ], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeFloat", @@ -6740,7 +6740,7 @@ }, "x-appwrite": { "method": "updateFloatAttribute", - "weight": 98, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -6853,7 +6853,7 @@ "tags": [ "databases" ], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\r\n", + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { "202": { "description": "AttributeInteger", @@ -6864,7 +6864,7 @@ }, "x-appwrite": { "method": "createIntegerAttribute", - "weight": 85, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -6971,7 +6971,7 @@ "tags": [ "databases" ], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeInteger", @@ -6982,7 +6982,7 @@ }, "x-appwrite": { "method": "updateIntegerAttribute", - "weight": 97, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -7095,7 +7095,7 @@ "tags": [ "databases" ], - "description": "Create IP address attribute.\r\n", + "description": "Create IP address attribute.\n", "responses": { "202": { "description": "AttributeIP", @@ -7106,7 +7106,7 @@ }, "x-appwrite": { "method": "createIpAttribute", - "weight": 83, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -7201,7 +7201,7 @@ "tags": [ "databases" ], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeIP", @@ -7212,7 +7212,7 @@ }, "x-appwrite": { "method": "updateIpAttribute", - "weight": 95, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -7311,7 +7311,7 @@ "tags": [ "databases" ], - "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\r\n", + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", "responses": { "202": { "description": "AttributeRelationship", @@ -7322,7 +7322,7 @@ }, "x-appwrite": { "method": "createRelationshipAttribute", - "weight": 89, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -7446,7 +7446,7 @@ "tags": [ "databases" ], - "description": "Create a string attribute.\r\n", + "description": "Create a string attribute.\n", "responses": { "202": { "description": "AttributeString", @@ -7457,7 +7457,7 @@ }, "x-appwrite": { "method": "createStringAttribute", - "weight": 80, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -7565,7 +7565,7 @@ "tags": [ "databases" ], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeString", @@ -7576,7 +7576,7 @@ }, "x-appwrite": { "method": "updateStringAttribute", - "weight": 92, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -7650,7 +7650,7 @@ "type": "integer", "description": "Maximum size of the string attribute.", "default": null, - "x-example": null + "x-example": 1 }, "newKey": { "type": "string", @@ -7681,7 +7681,7 @@ "tags": [ "databases" ], - "description": "Create a URL attribute.\r\n", + "description": "Create a URL attribute.\n", "responses": { "202": { "description": "AttributeURL", @@ -7692,7 +7692,7 @@ }, "x-appwrite": { "method": "createUrlAttribute", - "weight": 84, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -7787,7 +7787,7 @@ "tags": [ "databases" ], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeURL", @@ -7798,7 +7798,7 @@ }, "x-appwrite": { "method": "updateUrlAttribute", - "weight": 96, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -7939,7 +7939,7 @@ }, "x-appwrite": { "method": "getAttribute", - "weight": 91, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -8010,7 +8010,7 @@ }, "x-appwrite": { "method": "deleteAttribute", - "weight": 102, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -8075,7 +8075,7 @@ "tags": [ "databases" ], - "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\r\n", + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", "responses": { "200": { "description": "AttributeRelationship", @@ -8086,7 +8086,7 @@ }, "x-appwrite": { "method": "updateRelationshipAttribute", - "weight": 101, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -8192,7 +8192,7 @@ }, "x-appwrite": { "method": "listDocuments", - "weight": 108, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -8276,7 +8276,7 @@ }, "x-appwrite": { "method": "createDocument", - "weight": 107, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -8384,7 +8384,7 @@ }, "x-appwrite": { "method": "getDocument", - "weight": 109, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -8476,7 +8476,7 @@ }, "x-appwrite": { "method": "updateDocument", - "weight": 111, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -8575,7 +8575,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 112, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -8657,7 +8657,7 @@ }, "x-appwrite": { "method": "listDocumentLogs", - "weight": 110, + "weight": 111, "cookies": false, "type": "", "deprecated": false, @@ -8747,7 +8747,7 @@ }, "x-appwrite": { "method": "listIndexes", - "weight": 104, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -8817,7 +8817,7 @@ "tags": [ "databases" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\r\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -8828,7 +8828,7 @@ }, "x-appwrite": { "method": "createIndex", - "weight": 103, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -8950,7 +8950,7 @@ }, "x-appwrite": { "method": "getIndex", - "weight": 105, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -9021,7 +9021,7 @@ }, "x-appwrite": { "method": "deleteIndex", - "weight": 106, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -9099,7 +9099,7 @@ }, "x-appwrite": { "method": "listCollectionLogs", - "weight": 77, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -9181,7 +9181,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -9271,7 +9271,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 71, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -9345,7 +9345,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", - "weight": 114, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -9427,7 +9427,7 @@ }, "x-appwrite": { "method": "list", - "weight": 287, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -9501,7 +9501,7 @@ }, "x-appwrite": { "method": "create", - "weight": 286, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -9559,6 +9559,7 @@ "node-19.0", "node-20.0", "node-21.0", + "node-22", "php-8.0", "php-8.1", "php-8.2", @@ -9577,6 +9578,8 @@ "deno-1.24", "deno-1.35", "deno-1.40", + "deno-1.46", + "deno-2.0", "dart-2.15", "dart-2.16", "dart-2.17", @@ -9584,24 +9587,30 @@ "dart-3.0", "dart-3.1", "dart-3.3", - "dotnet-3.1", + "dart-3.5", "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", - "go-1.23" + "bun-1.1", + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -9726,7 +9735,7 @@ "specification": { "type": "string", "description": "Runtime specification for the function and builds.", - "default": "s-0.5vcpu-512mb", + "default": "s-1vcpu-512mb", "x-example": null } }, @@ -9764,7 +9773,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9806,7 +9815,7 @@ "tags": [ "functions" ], - "description": "List allowed function specifications for this instance.\r\n", + "description": "List allowed function specifications for this instance.\n", "responses": { "200": { "description": "Specifications List", @@ -9817,7 +9826,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9871,7 +9880,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -9969,7 +9978,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -10031,7 +10040,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -10105,7 +10114,7 @@ }, "x-appwrite": { "method": "get", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -10166,7 +10175,7 @@ }, "x-appwrite": { "method": "update", - "weight": 293, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -10226,6 +10235,7 @@ "node-19.0", "node-20.0", "node-21.0", + "node-22", "php-8.0", "php-8.1", "php-8.2", @@ -10244,6 +10254,8 @@ "deno-1.24", "deno-1.35", "deno-1.40", + "deno-1.46", + "deno-2.0", "dart-2.15", "dart-2.16", "dart-2.17", @@ -10251,24 +10263,30 @@ "dart-3.0", "dart-3.1", "dart-3.3", - "dotnet-3.1", + "dart-3.5", "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", - "go-1.23" + "bun-1.1", + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -10370,7 +10388,7 @@ "specification": { "type": "string", "description": "Runtime specification for the function and builds.", - "default": "s-0.5vcpu-512mb", + "default": "s-1vcpu-512mb", "x-example": null } }, @@ -10399,7 +10417,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 296, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -10462,7 +10480,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10533,7 +10551,7 @@ "tags": [ "functions" ], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\r\n\r\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\r\n\r\nUse the \"command\" param to set the entrypoint used to execute your code.", + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "responses": { "202": { "description": "Deployment", @@ -10544,7 +10562,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "upload", "deprecated": false, @@ -10638,7 +10656,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -10707,7 +10725,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10771,7 +10789,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10837,7 +10855,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10921,7 +10939,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10992,7 +11010,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 294, + "weight": 296, "cookies": false, "type": "location", "deprecated": false, @@ -11065,7 +11083,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -11131,7 +11149,7 @@ "summary": "Create execution", "operationId": "functionsCreateExecution", "consumes": [ - "multipart\/form-data" + "application\/json" ], "produces": [ "multipart\/form-data" @@ -11150,7 +11168,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -11190,65 +11208,59 @@ "in": "path" }, { - "name": "body", - "description": "HTTP body of execution. Default value is empty string.", - "required": false, - "type": "payload", - "default": "", - "in": "formData" - }, - { - "name": "async", - "description": "Execute code in the background. Default value is false.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "formData" - }, - { - "name": "path", - "description": "HTTP path of execution. Path can include query params. Default value is \/", - "required": false, - "type": "string", - "x-example": "", - "default": "\/", - "in": "formData" - }, - { - "name": "method", - "description": "HTTP method of execution. Default value is GET.", - "required": false, - "type": "string", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [], - "default": "POST", - "in": "formData" - }, - { - "name": "headers", - "description": "HTTP headers of execution. Defaults to empty.", - "required": false, - "type": "object", - "default": [], - "x-example": "{}", - "in": "formData" - }, - { - "name": "scheduledAt", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "required": false, - "type": "string", - "in": "formData" + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "default": "", + "x-example": "" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "default": false, + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "default": "\/", + "x-example": "" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is GET.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "default": [], + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "default": null, + "x-example": null + } + } + } } ] } @@ -11277,7 +11289,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -11336,7 +11348,7 @@ "tags": [ "functions" ], - "description": "Delete a function execution by its unique ID.\r\n", + "description": "Delete a function execution by its unique ID.\n", "responses": { "204": { "description": "No content" @@ -11344,7 +11356,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -11415,7 +11427,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -11497,7 +11509,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -11558,7 +11570,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -11646,7 +11658,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11715,7 +11727,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11803,7 +11815,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11874,7 +11886,7 @@ }, "x-appwrite": { "method": "query", - "weight": 329, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -11950,7 +11962,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 328, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -12026,7 +12038,7 @@ }, "x-appwrite": { "method": "get", - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12079,7 +12091,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12132,7 +12144,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -12185,7 +12197,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12247,7 +12259,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -12300,7 +12312,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12353,7 +12365,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -12406,7 +12418,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12470,7 +12482,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -12534,7 +12546,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -12607,7 +12619,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12660,7 +12672,7 @@ "tags": [ "health" ], - "description": "Returns the amount of failed jobs in a given queue.\r\n", + "description": "Returns the amount of failed jobs in a given queue.\n", "responses": { "200": { "description": "Health Queue", @@ -12671,7 +12683,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12759,7 +12771,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12823,7 +12835,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12887,7 +12899,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12951,7 +12963,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -13015,7 +13027,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -13079,7 +13091,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -13143,7 +13155,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -13207,7 +13219,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -13271,7 +13283,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -13324,7 +13336,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13377,7 +13389,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -13419,7 +13431,7 @@ "tags": [ "locale" ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\r\n\r\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", "responses": { "200": { "description": "Locale", @@ -13430,7 +13442,7 @@ }, "x-appwrite": { "method": "get", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -13486,7 +13498,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -13542,7 +13554,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13598,7 +13610,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -13654,7 +13666,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -13710,7 +13722,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -13766,7 +13778,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13822,7 +13834,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13878,7 +13890,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13955,7 +13967,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -14104,7 +14116,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\r\n", + "description": "Update an email message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -14115,7 +14127,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 392, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -14272,7 +14284,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14436,7 +14448,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\r\n", + "description": "Update a push notification by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -14447,7 +14459,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 394, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -14619,7 +14631,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -14728,7 +14740,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\r\n", + "description": "Update an email message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -14739,7 +14751,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 393, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -14846,7 +14858,7 @@ "tags": [ "messaging" ], - "description": "Get a message by its unique ID.\r\n", + "description": "Get a message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -14857,7 +14869,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14916,7 +14928,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 395, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -14980,7 +14992,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -15056,7 +15068,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -15132,7 +15144,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15209,7 +15221,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15326,7 +15338,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -15441,7 +15453,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15534,7 +15546,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -15625,7 +15637,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -15754,7 +15766,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15881,7 +15893,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15986,7 +15998,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16089,7 +16101,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -16206,7 +16218,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16321,7 +16333,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16482,7 +16494,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -16640,7 +16652,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -16745,7 +16757,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -16848,7 +16860,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -16953,7 +16965,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -17056,7 +17068,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -17161,7 +17173,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -17264,7 +17276,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -17369,7 +17381,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -17461,7 +17473,7 @@ "tags": [ "messaging" ], - "description": "Get a provider by its unique ID.\r\n", + "description": "Get a provider by its unique ID.\n", "responses": { "200": { "description": "Provider", @@ -17472,7 +17484,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -17531,7 +17543,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -17595,7 +17607,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -17671,7 +17683,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -17747,7 +17759,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17822,7 +17834,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -17903,7 +17915,7 @@ "tags": [ "messaging" ], - "description": "Get a topic by its unique ID.\r\n", + "description": "Get a topic by its unique ID.\n", "responses": { "200": { "description": "Topic", @@ -17914,7 +17926,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17965,7 +17977,7 @@ "tags": [ "messaging" ], - "description": "Update a topic by its unique ID.\r\n", + "description": "Update a topic by its unique ID.\n", "responses": { "200": { "description": "Topic", @@ -17976,7 +17988,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -18059,7 +18071,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -18123,7 +18135,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -18199,7 +18211,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -18282,7 +18294,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -18363,7 +18375,7 @@ "tags": [ "messaging" ], - "description": "Get a subscriber by its unique ID.\r\n", + "description": "Get a subscriber by its unique ID.\n", "responses": { "200": { "description": "Subscriber", @@ -18374,7 +18386,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -18441,7 +18453,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -18516,7 +18528,7 @@ }, "x-appwrite": { "method": "list", - "weight": 337, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -18545,7 +18557,7 @@ "parameters": [ { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors", "required": false, "type": "array", "collectionFormat": "multi", @@ -18591,7 +18603,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 332, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -18687,7 +18699,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 339, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18777,7 +18789,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 334, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18859,7 +18871,7 @@ }, "x-appwrite": { "method": "deleteFirebaseAuth", - "weight": 345, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -18911,7 +18923,7 @@ }, "x-appwrite": { "method": "createFirebaseOAuthMigration", - "weight": 333, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -18993,7 +19005,7 @@ }, "x-appwrite": { "method": "listFirebaseProjects", - "weight": 344, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -19045,7 +19057,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 340, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -19118,7 +19130,7 @@ }, "x-appwrite": { "method": "getFirebaseReportOAuth", - "weight": 341, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -19191,7 +19203,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 336, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -19314,7 +19326,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -19436,7 +19448,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 335, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -19552,7 +19564,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -19667,7 +19679,7 @@ }, "x-appwrite": { "method": "get", - "weight": 338, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -19727,7 +19739,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -19782,7 +19794,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -19844,7 +19856,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 194, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -19930,7 +19942,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 196, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19980,7 +19992,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 195, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -20059,7 +20071,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 197, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -20119,7 +20131,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 198, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -20198,7 +20210,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 199, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -20260,7 +20272,7 @@ }, "x-appwrite": { "method": "list", - "weight": 150, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -20333,7 +20345,7 @@ }, "x-appwrite": { "method": "create", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -20485,7 +20497,7 @@ }, "x-appwrite": { "method": "get", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20545,7 +20557,7 @@ }, "x-appwrite": { "method": "update", - "weight": 152, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20672,7 +20684,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 168, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20734,7 +20746,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 156, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20828,7 +20840,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 157, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20908,7 +20920,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 161, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20988,7 +21000,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 160, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -21068,7 +21080,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 166, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -21148,7 +21160,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 167, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -21231,7 +21243,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 164, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -21311,7 +21323,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 163, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -21391,7 +21403,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 165, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -21471,7 +21483,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 159, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -21527,6 +21539,86 @@ ] } }, + "\/projects\/{projectId}\/auth\/teams-sensitive-attributes": { + "patch": { + "summary": "Update project team sensitive attributes", + "operationId": "projectsUpdateTeamsSensitiveAttributes", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateTeamsSensitiveAttributes", + "weight": 161, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-teams-sensitive-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "offline-model": "", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Set to true to show sensitive attributes to team members.", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21551,7 +21643,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 162, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21650,7 +21742,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 180, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21739,7 +21831,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 176, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21799,7 +21891,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 175, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21895,7 +21987,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 177, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21963,7 +22055,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 178, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -22060,7 +22152,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 179, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -22130,7 +22222,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 158, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -22271,7 +22363,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 182, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -22331,7 +22423,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 181, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22455,7 +22547,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 183, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22523,7 +22615,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 184, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22622,7 +22714,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 185, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22692,7 +22784,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 154, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -22794,7 +22886,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 155, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -22874,7 +22966,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 186, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -23003,7 +23095,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 187, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -23143,7 +23235,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 153, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -23223,7 +23315,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 189, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23445,7 +23537,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 191, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23710,7 +23802,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 193, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23934,7 +24026,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 188, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -24153,7 +24245,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 190, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -24390,7 +24482,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 192, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24611,7 +24703,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 170, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -24671,7 +24763,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 169, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -24793,7 +24885,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 171, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -24861,7 +24953,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 172, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -24984,7 +25076,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 174, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -25054,7 +25146,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 173, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -25124,7 +25216,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 315, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -25197,7 +25289,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 314, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -25288,7 +25380,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 316, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -25343,7 +25435,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 317, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -25405,7 +25497,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 318, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -25467,7 +25559,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 201, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25541,7 +25633,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 200, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -25682,7 +25774,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -25743,7 +25835,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25878,7 +25970,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -25941,7 +26033,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -26015,7 +26107,7 @@ "tags": [ "storage" ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\r\n\r\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\r\n\r\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\r\n\r\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\r\n", + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", "responses": { "201": { "description": "File", @@ -26026,7 +26118,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 205, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -26120,7 +26212,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -26192,7 +26284,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 212, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -26283,7 +26375,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 213, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -26357,7 +26449,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 209, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -26431,7 +26523,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 208, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -26632,7 +26724,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -26706,7 +26798,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -26780,7 +26872,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -26862,7 +26954,7 @@ }, "x-appwrite": { "method": "list", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -26939,7 +27031,7 @@ }, "x-appwrite": { "method": "create", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -27033,7 +27125,7 @@ }, "x-appwrite": { "method": "get", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -27097,7 +27189,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -27174,7 +27266,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -27240,7 +27332,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -27303,7 +27395,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -27314,7 +27406,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -27388,7 +27480,7 @@ "tags": [ "teams" ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\r\n\r\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\r\n\r\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \r\n\r\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\r\n", + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", "responses": { "201": { "description": "Membership", @@ -27399,7 +27491,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -27505,7 +27597,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -27516,7 +27608,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -27577,7 +27669,7 @@ "tags": [ "teams" ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\r\n", + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", "responses": { "200": { "description": "Membership", @@ -27588,7 +27680,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -27676,7 +27768,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -27739,7 +27831,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\r\n\r\nIf the request is successful, a session for the user is automatically created.\r\n", + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", "responses": { "200": { "description": "Membership", @@ -27750,7 +27842,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -27847,7 +27939,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -27909,7 +28001,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -27991,7 +28083,7 @@ }, "x-appwrite": { "method": "list", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -28065,7 +28157,7 @@ }, "x-appwrite": { "method": "create", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -28162,7 +28254,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -28255,7 +28347,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 231, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -28348,7 +28440,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -28419,7 +28511,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -28482,7 +28574,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -28575,7 +28667,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -28668,7 +28760,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -28796,7 +28888,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -28910,7 +29002,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -29024,7 +29116,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -29098,7 +29190,7 @@ }, "x-appwrite": { "method": "get", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -29154,7 +29246,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -29217,7 +29309,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -29298,7 +29390,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -29371,7 +29463,7 @@ "tags": [ "users" ], - "description": "Update the user labels by its unique ID. \r\n\r\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", "responses": { "200": { "description": "User", @@ -29382,7 +29474,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -29466,7 +29558,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -29541,7 +29633,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -29604,7 +29696,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -29685,7 +29777,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -29761,7 +29853,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -29824,7 +29916,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -29885,7 +29977,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -29946,7 +30038,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -30009,7 +30101,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -30090,7 +30182,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -30171,7 +30263,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -30252,7 +30344,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -30313,7 +30405,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -30394,7 +30486,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -30444,7 +30536,7 @@ "tags": [ "users" ], - "description": "Creates a session for a user. Returns an immediately usable session object.\r\n\r\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", "responses": { "201": { "description": "Session", @@ -30455,7 +30547,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -30511,7 +30603,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -30569,7 +30661,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -30640,7 +30732,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -30721,7 +30813,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -30795,7 +30887,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -30910,7 +31002,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -30980,7 +31072,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -31074,7 +31166,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -31135,7 +31227,7 @@ "tags": [ "users" ], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\r\n", + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", "responses": { "201": { "description": "Token", @@ -31146,7 +31238,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -31230,7 +31322,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -31311,7 +31403,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -31392,7 +31484,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 277, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -31461,7 +31553,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 278, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -31548,7 +31640,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 279, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -31618,7 +31710,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 280, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -31688,7 +31780,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 275, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -31767,7 +31859,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 276, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -31847,7 +31939,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 285, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -31935,7 +32027,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 282, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -32010,7 +32102,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 283, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -32065,7 +32157,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 284, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -35363,12 +35455,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -35398,7 +35490,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -35564,7 +35656,7 @@ "specification": { "type": "string", "description": "Machine specification for builds and executions.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -36238,7 +36330,7 @@ "format": "int32" }, "responseBody": { - "type": "payload", + "type": "string", "description": "HTTP response body. This will return empty unless execution is created as synchronous.", "x-example": "" }, @@ -36485,6 +36577,11 @@ "description": "Whether or not to send session alert emails to users.", "x-example": true }, + "teamsSensitiveAttributes": { + "type": "boolean", + "description": "Whether or not to show sensitive attributes in the teams API.", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -36569,6 +36666,17 @@ "description": "SMTP server secure protocol", "x-example": "tls" }, + "pingCount": { + "type": "integer", + "description": "Number of times the ping was received for this project.", + "x-example": 1, + "format": "int32" + }, + "pingedAt": { + "type": "string", + "description": "Last ping datetime in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "authEmailPassword": { "type": "boolean", "description": "Email\/Password auth method status", @@ -36683,6 +36791,7 @@ "authPersonalDataCheck", "authMockNumbers", "authSessionAlerts", + "teamsSensitiveAttributes", "oAuthProviders", "platforms", "webhooks", @@ -36696,6 +36805,8 @@ "smtpUsername", "smtpPassword", "smtpSecure", + "pingCount", + "pingedAt", "authEmailPassword", "authUsersAuthMagicURL", "authEmailOtp", @@ -38303,7 +38414,7 @@ "slug": { "type": "string", "description": "Size slug.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -38944,7 +39055,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -38966,6 +39077,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -38975,7 +39091,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] }, "migration": { @@ -38989,7 +39106,7 @@ }, "$createdAt": { "type": "string", - "description": "Variable creation date in ISO 8601 format.", + "description": "Migration creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { @@ -39012,9 +39129,14 @@ "description": "A string containing the type of source of the migration.", "x-example": "Appwrite" }, + "destination": { + "type": "string", + "description": "A string containing the type of destination of the migration.", + "x-example": "Appwrite" + }, "resources": { "type": "array", - "description": "Resources to migration.", + "description": "Resources to migrate.", "items": { "type": "string" }, @@ -39050,6 +39172,7 @@ "status", "stage", "source", + "destination", "resources", "statusCounters", "resourceData", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 80c9e6037f..a1e32ab4a1 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -102,7 +102,7 @@ }, "x-appwrite": { "method": "get", - "weight": 8, + "weight": 9, "cookies": false, "type": "", "deprecated": false, @@ -156,7 +156,7 @@ }, "x-appwrite": { "method": "create", - "weight": 7, + "weight": 8, "cookies": false, "type": "", "deprecated": false, @@ -238,7 +238,7 @@ "tags": [ "account" ], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\r\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\r\n", + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", "responses": { "200": { "description": "User", @@ -249,7 +249,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 33, + "weight": 34, "cookies": false, "type": "", "deprecated": false, @@ -332,7 +332,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 56, + "weight": 57, "cookies": false, "type": "", "deprecated": false, @@ -397,7 +397,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 57, + "weight": 58, "cookies": false, "type": "", "deprecated": false, @@ -463,7 +463,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 28, + "weight": 29, "cookies": false, "type": "", "deprecated": false, @@ -516,7 +516,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 30, + "weight": 31, "cookies": false, "type": "", "deprecated": false, @@ -586,7 +586,7 @@ }, "x-appwrite": { "method": "updateMFA", - "weight": 43, + "weight": 44, "cookies": false, "type": "", "deprecated": false, @@ -662,7 +662,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", - "weight": 45, + "weight": 46, "cookies": false, "type": "", "deprecated": false, @@ -731,7 +731,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", - "weight": 46, + "weight": 47, "cookies": false, "type": "", "deprecated": false, @@ -813,7 +813,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 50, + "weight": 51, "cookies": false, "type": "", "deprecated": false, @@ -884,7 +884,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", - "weight": 51, + "weight": 52, "cookies": false, "type": "", "deprecated": false, @@ -958,7 +958,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", - "weight": 52, + "weight": 53, "cookies": false, "type": "", "deprecated": false, @@ -1041,7 +1041,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 44, + "weight": 45, "cookies": false, "type": "", "deprecated": false, @@ -1097,7 +1097,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 49, + "weight": 50, "cookies": false, "type": "", "deprecated": false, @@ -1151,7 +1151,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 47, + "weight": 48, "cookies": false, "type": "", "deprecated": false, @@ -1205,7 +1205,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 48, + "weight": 49, "cookies": false, "type": "", "deprecated": false, @@ -1261,7 +1261,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 31, + "weight": 32, "cookies": false, "type": "", "deprecated": false, @@ -1337,7 +1337,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 32, + "weight": 33, "cookies": false, "type": "", "deprecated": false, @@ -1419,7 +1419,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 34, + "weight": 35, "cookies": false, "type": "", "deprecated": false, @@ -1502,7 +1502,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 29, + "weight": 30, "cookies": false, "type": "", "deprecated": false, @@ -1556,7 +1556,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 35, + "weight": 36, "cookies": false, "type": "", "deprecated": false, @@ -1632,7 +1632,7 @@ }, "x-appwrite": { "method": "createRecovery", - "weight": 37, + "weight": 38, "cookies": false, "type": "", "deprecated": false, @@ -1705,7 +1705,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", "responses": { "200": { "description": "Token", @@ -1716,7 +1716,7 @@ }, "x-appwrite": { "method": "updateRecovery", - "weight": 38, + "weight": 39, "cookies": false, "type": "", "deprecated": false, @@ -1806,7 +1806,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 10, + "weight": 11, "cookies": false, "type": "", "deprecated": false, @@ -1855,7 +1855,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 11, + "weight": 12, "cookies": false, "type": "", "deprecated": false, @@ -1911,7 +1911,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", - "weight": 16, + "weight": 17, "cookies": false, "type": "", "deprecated": false, @@ -1953,7 +1953,7 @@ "tags": [ "account" ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Session", @@ -1964,7 +1964,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", - "weight": 15, + "weight": 16, "cookies": false, "type": "", "deprecated": false, @@ -2044,7 +2044,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", - "weight": 25, + "weight": 26, "cookies": false, "type": "", "deprecated": true, @@ -2124,7 +2124,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", - "weight": 26, + "weight": 27, "cookies": false, "type": "", "deprecated": true, @@ -2204,7 +2204,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 17, + "weight": 18, "cookies": false, "type": "", "deprecated": false, @@ -2284,7 +2284,7 @@ }, "x-appwrite": { "method": "getSession", - "weight": 12, + "weight": 13, "cookies": false, "type": "", "deprecated": false, @@ -2348,7 +2348,7 @@ }, "x-appwrite": { "method": "updateSession", - "weight": 14, + "weight": 15, "cookies": false, "type": "", "deprecated": false, @@ -2407,7 +2407,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 13, + "weight": 14, "cookies": false, "type": "", "deprecated": false, @@ -2473,7 +2473,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 36, + "weight": 37, "cookies": false, "type": "", "deprecated": false, @@ -2518,7 +2518,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -2529,7 +2529,7 @@ }, "x-appwrite": { "method": "createEmailToken", - "weight": 24, + "weight": 25, "cookies": false, "type": "", "deprecated": false, @@ -2604,7 +2604,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\r\n", + "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2615,7 +2615,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", - "weight": 23, + "weight": 24, "cookies": false, "type": "", "deprecated": false, @@ -2699,7 +2699,7 @@ "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \r\n\r\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. \n\nIf authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "301": { "description": "No content" @@ -2707,7 +2707,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", - "weight": 22, + "weight": 23, "cookies": false, "type": "webAuth", "deprecated": false, @@ -2834,7 +2834,7 @@ "tags": [ "account" ], - "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\r\n\r\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Token", @@ -2845,7 +2845,7 @@ }, "x-appwrite": { "method": "createPhoneToken", - "weight": 27, + "weight": 28, "cookies": false, "type": "", "deprecated": false, @@ -2917,7 +2917,7 @@ "tags": [ "account" ], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\r\n\r\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\r\n", + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", "responses": { "201": { "description": "Token", @@ -2928,7 +2928,7 @@ }, "x-appwrite": { "method": "createVerification", - "weight": 39, + "weight": 40, "cookies": false, "type": "", "deprecated": false, @@ -3002,7 +3002,7 @@ }, "x-appwrite": { "method": "updateVerification", - "weight": 40, + "weight": 41, "cookies": false, "type": "", "deprecated": false, @@ -3085,7 +3085,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", - "weight": 41, + "weight": 42, "cookies": false, "type": "", "deprecated": false, @@ -3142,7 +3142,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 42, + "weight": 43, "cookies": false, "type": "", "deprecated": false, @@ -3214,7 +3214,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", "responses": { "200": { "description": "Image", @@ -3225,7 +3225,7 @@ }, "x-appwrite": { "method": "getBrowser", - "weight": 59, + "weight": 60, "cookies": false, "type": "location", "deprecated": false, @@ -3345,7 +3345,7 @@ "tags": [ "avatars" ], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image", @@ -3356,7 +3356,7 @@ }, "x-appwrite": { "method": "getCreditCard", - "weight": 58, + "weight": 59, "cookies": false, "type": "location", "deprecated": false, @@ -3480,7 +3480,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image", @@ -3491,7 +3491,7 @@ }, "x-appwrite": { "method": "getFavicon", - "weight": 62, + "weight": 63, "cookies": false, "type": "location", "deprecated": false, @@ -3549,7 +3549,7 @@ "tags": [ "avatars" ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image", @@ -3560,7 +3560,7 @@ }, "x-appwrite": { "method": "getFlag", - "weight": 60, + "weight": 61, "cookies": false, "type": "location", "deprecated": false, @@ -4042,7 +4042,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\r\n\r\nThis endpoint does not follow HTTP redirects.", + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image", @@ -4053,7 +4053,7 @@ }, "x-appwrite": { "method": "getImage", - "weight": 61, + "weight": 62, "cookies": false, "type": "location", "deprecated": false, @@ -4131,7 +4131,7 @@ "tags": [ "avatars" ], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\r\n\r\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\r\n\r\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\r\n", + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", "responses": { "200": { "description": "Image", @@ -4142,7 +4142,7 @@ }, "x-appwrite": { "method": "getInitials", - "weight": 64, + "weight": 65, "cookies": false, "type": "location", "deprecated": false, @@ -4228,7 +4228,7 @@ "tags": [ "avatars" ], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\r\n", + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", "responses": { "200": { "description": "Image", @@ -4239,7 +4239,7 @@ }, "x-appwrite": { "method": "getQR", - "weight": 63, + "weight": 64, "cookies": false, "type": "location", "deprecated": false, @@ -4336,7 +4336,7 @@ }, "x-appwrite": { "method": "list", - "weight": 69, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -4400,7 +4400,7 @@ "tags": [ "databases" ], - "description": "Create a new Database.\r\n", + "description": "Create a new Database.\n", "responses": { "201": { "description": "Database", @@ -4411,7 +4411,7 @@ }, "x-appwrite": { "method": "create", - "weight": 68, + "weight": 69, "cookies": false, "type": "", "deprecated": false, @@ -4498,7 +4498,7 @@ }, "x-appwrite": { "method": "get", - "weight": 70, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -4560,7 +4560,7 @@ }, "x-appwrite": { "method": "update", - "weight": 72, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -4641,7 +4641,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 73, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -4705,7 +4705,7 @@ }, "x-appwrite": { "method": "listCollections", - "weight": 75, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -4788,7 +4788,7 @@ }, "x-appwrite": { "method": "createCollection", - "weight": 74, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -4898,7 +4898,7 @@ }, "x-appwrite": { "method": "getCollection", - "weight": 76, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -4968,7 +4968,7 @@ }, "x-appwrite": { "method": "updateCollection", - "weight": 78, + "weight": 79, "cookies": false, "type": "", "deprecated": false, @@ -5072,7 +5072,7 @@ }, "x-appwrite": { "method": "deleteCollection", - "weight": 79, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -5144,7 +5144,7 @@ }, "x-appwrite": { "method": "listAttributes", - "weight": 90, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -5217,7 +5217,7 @@ "tags": [ "databases" ], - "description": "Create a boolean attribute.\r\n", + "description": "Create a boolean attribute.\n", "responses": { "202": { "description": "AttributeBoolean", @@ -5228,7 +5228,7 @@ }, "x-appwrite": { "method": "createBooleanAttribute", - "weight": 87, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -5335,7 +5335,7 @@ }, "x-appwrite": { "method": "updateBooleanAttribute", - "weight": 99, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -5446,7 +5446,7 @@ }, "x-appwrite": { "method": "createDatetimeAttribute", - "weight": 88, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -5553,7 +5553,7 @@ }, "x-appwrite": { "method": "updateDatetimeAttribute", - "weight": 100, + "weight": 101, "cookies": false, "type": "", "deprecated": false, @@ -5653,7 +5653,7 @@ "tags": [ "databases" ], - "description": "Create an email attribute.\r\n", + "description": "Create an email attribute.\n", "responses": { "202": { "description": "AttributeEmail", @@ -5664,7 +5664,7 @@ }, "x-appwrite": { "method": "createEmailAttribute", - "weight": 81, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -5760,7 +5760,7 @@ "tags": [ "databases" ], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeEmail", @@ -5771,7 +5771,7 @@ }, "x-appwrite": { "method": "updateEmailAttribute", - "weight": 93, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -5871,7 +5871,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \r\n", + "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -5882,7 +5882,7 @@ }, "x-appwrite": { "method": "createEnumAttribute", - "weight": 82, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -5988,7 +5988,7 @@ "tags": [ "databases" ], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeEnum", @@ -5999,7 +5999,7 @@ }, "x-appwrite": { "method": "updateEnumAttribute", - "weight": 94, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -6109,7 +6109,7 @@ "tags": [ "databases" ], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\r\n", + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { "202": { "description": "AttributeFloat", @@ -6120,7 +6120,7 @@ }, "x-appwrite": { "method": "createFloatAttribute", - "weight": 86, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -6228,7 +6228,7 @@ "tags": [ "databases" ], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeFloat", @@ -6239,7 +6239,7 @@ }, "x-appwrite": { "method": "updateFloatAttribute", - "weight": 98, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -6353,7 +6353,7 @@ "tags": [ "databases" ], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\r\n", + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { "202": { "description": "AttributeInteger", @@ -6364,7 +6364,7 @@ }, "x-appwrite": { "method": "createIntegerAttribute", - "weight": 85, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -6472,7 +6472,7 @@ "tags": [ "databases" ], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeInteger", @@ -6483,7 +6483,7 @@ }, "x-appwrite": { "method": "updateIntegerAttribute", - "weight": 97, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -6597,7 +6597,7 @@ "tags": [ "databases" ], - "description": "Create IP address attribute.\r\n", + "description": "Create IP address attribute.\n", "responses": { "202": { "description": "AttributeIP", @@ -6608,7 +6608,7 @@ }, "x-appwrite": { "method": "createIpAttribute", - "weight": 83, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -6704,7 +6704,7 @@ "tags": [ "databases" ], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeIP", @@ -6715,7 +6715,7 @@ }, "x-appwrite": { "method": "updateIpAttribute", - "weight": 95, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -6815,7 +6815,7 @@ "tags": [ "databases" ], - "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\r\n", + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", "responses": { "202": { "description": "AttributeRelationship", @@ -6826,7 +6826,7 @@ }, "x-appwrite": { "method": "createRelationshipAttribute", - "weight": 89, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -6951,7 +6951,7 @@ "tags": [ "databases" ], - "description": "Create a string attribute.\r\n", + "description": "Create a string attribute.\n", "responses": { "202": { "description": "AttributeString", @@ -6962,7 +6962,7 @@ }, "x-appwrite": { "method": "createStringAttribute", - "weight": 80, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -7071,7 +7071,7 @@ "tags": [ "databases" ], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeString", @@ -7082,7 +7082,7 @@ }, "x-appwrite": { "method": "updateStringAttribute", - "weight": 92, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -7157,7 +7157,7 @@ "type": "integer", "description": "Maximum size of the string attribute.", "default": null, - "x-example": null + "x-example": 1 }, "newKey": { "type": "string", @@ -7188,7 +7188,7 @@ "tags": [ "databases" ], - "description": "Create a URL attribute.\r\n", + "description": "Create a URL attribute.\n", "responses": { "202": { "description": "AttributeURL", @@ -7199,7 +7199,7 @@ }, "x-appwrite": { "method": "createUrlAttribute", - "weight": 84, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -7295,7 +7295,7 @@ "tags": [ "databases" ], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\r\n", + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { "description": "AttributeURL", @@ -7306,7 +7306,7 @@ }, "x-appwrite": { "method": "updateUrlAttribute", - "weight": 96, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -7448,7 +7448,7 @@ }, "x-appwrite": { "method": "getAttribute", - "weight": 91, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -7520,7 +7520,7 @@ }, "x-appwrite": { "method": "deleteAttribute", - "weight": 102, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -7586,7 +7586,7 @@ "tags": [ "databases" ], - "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\r\n", + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", "responses": { "200": { "description": "AttributeRelationship", @@ -7597,7 +7597,7 @@ }, "x-appwrite": { "method": "updateRelationshipAttribute", - "weight": 101, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -7704,7 +7704,7 @@ }, "x-appwrite": { "method": "listDocuments", - "weight": 108, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -7790,7 +7790,7 @@ }, "x-appwrite": { "method": "createDocument", - "weight": 107, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -7900,7 +7900,7 @@ }, "x-appwrite": { "method": "getDocument", - "weight": 109, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -7994,7 +7994,7 @@ }, "x-appwrite": { "method": "updateDocument", - "weight": 111, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -8095,7 +8095,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 112, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -8179,7 +8179,7 @@ }, "x-appwrite": { "method": "listIndexes", - "weight": 104, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -8250,7 +8250,7 @@ "tags": [ "databases" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\r\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -8261,7 +8261,7 @@ }, "x-appwrite": { "method": "createIndex", - "weight": 103, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -8384,7 +8384,7 @@ }, "x-appwrite": { "method": "getIndex", - "weight": 105, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -8456,7 +8456,7 @@ }, "x-appwrite": { "method": "deleteIndex", - "weight": 106, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -8535,7 +8535,7 @@ }, "x-appwrite": { "method": "list", - "weight": 287, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -8610,7 +8610,7 @@ }, "x-appwrite": { "method": "create", - "weight": 286, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -8669,6 +8669,7 @@ "node-19.0", "node-20.0", "node-21.0", + "node-22", "php-8.0", "php-8.1", "php-8.2", @@ -8687,6 +8688,8 @@ "deno-1.24", "deno-1.35", "deno-1.40", + "deno-1.46", + "deno-2.0", "dart-2.15", "dart-2.16", "dart-2.17", @@ -8694,24 +8697,30 @@ "dart-3.0", "dart-3.1", "dart-3.3", - "dotnet-3.1", + "dart-3.5", "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", - "go-1.23" + "bun-1.1", + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -8836,7 +8845,7 @@ "specification": { "type": "string", "description": "Runtime specification for the function and builds.", - "default": "s-0.5vcpu-512mb", + "default": "s-1vcpu-512mb", "x-example": null } }, @@ -8874,7 +8883,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8917,7 +8926,7 @@ "tags": [ "functions" ], - "description": "List allowed function specifications for this instance.\r\n", + "description": "List allowed function specifications for this instance.\n", "responses": { "200": { "description": "Specifications List", @@ -8928,7 +8937,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8983,7 +8992,7 @@ }, "x-appwrite": { "method": "get", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9045,7 +9054,7 @@ }, "x-appwrite": { "method": "update", - "weight": 293, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -9106,6 +9115,7 @@ "node-19.0", "node-20.0", "node-21.0", + "node-22", "php-8.0", "php-8.1", "php-8.2", @@ -9124,6 +9134,8 @@ "deno-1.24", "deno-1.35", "deno-1.40", + "deno-1.46", + "deno-2.0", "dart-2.15", "dart-2.16", "dart-2.17", @@ -9131,24 +9143,30 @@ "dart-3.0", "dart-3.1", "dart-3.3", - "dotnet-3.1", + "dart-3.5", "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", - "go-1.23" + "bun-1.1", + "go-1.23", + "static-1" ], "x-enum-name": null, "x-enum-keys": [] @@ -9250,7 +9268,7 @@ "specification": { "type": "string", "description": "Runtime specification for the function and builds.", - "default": "s-0.5vcpu-512mb", + "default": "s-1vcpu-512mb", "x-example": null } }, @@ -9279,7 +9297,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 296, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -9343,7 +9361,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9415,7 +9433,7 @@ "tags": [ "functions" ], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\r\n\r\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\r\n\r\nUse the \"command\" param to set the entrypoint used to execute your code.", + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "responses": { "202": { "description": "Deployment", @@ -9426,7 +9444,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "upload", "deprecated": false, @@ -9521,7 +9539,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -9591,7 +9609,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9656,7 +9674,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9723,7 +9741,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9808,7 +9826,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9880,7 +9898,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 294, + "weight": 296, "cookies": false, "type": "location", "deprecated": false, @@ -9954,7 +9972,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -10022,7 +10040,7 @@ "summary": "Create execution", "operationId": "functionsCreateExecution", "consumes": [ - "multipart\/form-data" + "application\/json" ], "produces": [ "multipart\/form-data" @@ -10041,7 +10059,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -10083,65 +10101,59 @@ "in": "path" }, { - "name": "body", - "description": "HTTP body of execution. Default value is empty string.", - "required": false, - "type": "payload", - "default": "", - "in": "formData" - }, - { - "name": "async", - "description": "Execute code in the background. Default value is false.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "formData" - }, - { - "name": "path", - "description": "HTTP path of execution. Path can include query params. Default value is \/", - "required": false, - "type": "string", - "x-example": "", - "default": "\/", - "in": "formData" - }, - { - "name": "method", - "description": "HTTP method of execution. Default value is GET.", - "required": false, - "type": "string", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [], - "default": "POST", - "in": "formData" - }, - { - "name": "headers", - "description": "HTTP headers of execution. Defaults to empty.", - "required": false, - "type": "object", - "default": [], - "x-example": "{}", - "in": "formData" - }, - { - "name": "scheduledAt", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "required": false, - "type": "string", - "in": "formData" + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "HTTP body of execution. Default value is empty string.", + "default": "", + "x-example": "" + }, + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "default": false, + "x-example": false + }, + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "default": "\/", + "x-example": "" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is GET.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "default": [], + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "default": null, + "x-example": null + } + } + } } ] } @@ -10170,7 +10182,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10231,7 +10243,7 @@ "tags": [ "functions" ], - "description": "Delete a function execution by its unique ID.\r\n", + "description": "Delete a function execution by its unique ID.\n", "responses": { "204": { "description": "No content" @@ -10239,7 +10251,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10311,7 +10323,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10373,7 +10385,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -10462,7 +10474,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -10532,7 +10544,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -10621,7 +10633,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10693,7 +10705,7 @@ }, "x-appwrite": { "method": "query", - "weight": 329, + "weight": 331, "cookies": false, "type": "graphql", "deprecated": false, @@ -10771,7 +10783,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 328, + "weight": 330, "cookies": false, "type": "graphql", "deprecated": false, @@ -10849,7 +10861,7 @@ }, "x-appwrite": { "method": "get", - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -10903,7 +10915,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -10957,7 +10969,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -11011,7 +11023,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11074,7 +11086,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -11128,7 +11140,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11182,7 +11194,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11236,7 +11248,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -11301,7 +11313,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11366,7 +11378,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11440,7 +11452,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11494,7 +11506,7 @@ "tags": [ "health" ], - "description": "Returns the amount of failed jobs in a given queue.\r\n", + "description": "Returns the amount of failed jobs in a given queue.\n", "responses": { "200": { "description": "Health Queue", @@ -11505,7 +11517,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -11594,7 +11606,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11659,7 +11671,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11724,7 +11736,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11789,7 +11801,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11854,7 +11866,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11919,7 +11931,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11984,7 +11996,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12049,7 +12061,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12114,7 +12126,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12168,7 +12180,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12222,7 +12234,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -12265,7 +12277,7 @@ "tags": [ "locale" ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\r\n\r\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", "responses": { "200": { "description": "Locale", @@ -12276,7 +12288,7 @@ }, "x-appwrite": { "method": "get", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -12334,7 +12346,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -12392,7 +12404,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12450,7 +12462,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -12508,7 +12520,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -12566,7 +12578,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -12624,7 +12636,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12682,7 +12694,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12740,7 +12752,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -12818,7 +12830,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -12968,7 +12980,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\r\n", + "description": "Update an email message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -12979,7 +12991,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 392, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -13137,7 +13149,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -13302,7 +13314,7 @@ "tags": [ "messaging" ], - "description": "Update a push notification by its unique ID.\r\n", + "description": "Update a push notification by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -13313,7 +13325,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 394, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -13486,7 +13498,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -13596,7 +13608,7 @@ "tags": [ "messaging" ], - "description": "Update an email message by its unique ID.\r\n", + "description": "Update an email message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -13607,7 +13619,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 393, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -13715,7 +13727,7 @@ "tags": [ "messaging" ], - "description": "Get a message by its unique ID.\r\n", + "description": "Get a message by its unique ID.\n", "responses": { "200": { "description": "Message", @@ -13726,7 +13738,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13786,7 +13798,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 395, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -13851,7 +13863,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13928,7 +13940,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -14005,7 +14017,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14083,7 +14095,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -14201,7 +14213,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -14317,7 +14329,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -14411,7 +14423,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -14503,7 +14515,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -14633,7 +14645,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -14761,7 +14773,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -14867,7 +14879,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -14971,7 +14983,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -15089,7 +15101,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -15205,7 +15217,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15367,7 +15379,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15526,7 +15538,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15632,7 +15644,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15736,7 +15748,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -15842,7 +15854,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -15946,7 +15958,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -16052,7 +16064,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16156,7 +16168,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16262,7 +16274,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16355,7 +16367,7 @@ "tags": [ "messaging" ], - "description": "Get a provider by its unique ID.\r\n", + "description": "Get a provider by its unique ID.\n", "responses": { "200": { "description": "Provider", @@ -16366,7 +16378,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -16426,7 +16438,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -16491,7 +16503,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -16568,7 +16580,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -16645,7 +16657,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16721,7 +16733,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -16803,7 +16815,7 @@ "tags": [ "messaging" ], - "description": "Get a topic by its unique ID.\r\n", + "description": "Get a topic by its unique ID.\n", "responses": { "200": { "description": "Topic", @@ -16814,7 +16826,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16866,7 +16878,7 @@ "tags": [ "messaging" ], - "description": "Update a topic by its unique ID.\r\n", + "description": "Update a topic by its unique ID.\n", "responses": { "200": { "description": "Topic", @@ -16877,7 +16889,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -16961,7 +16973,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17026,7 +17038,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17103,7 +17115,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -17187,7 +17199,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17270,7 +17282,7 @@ "tags": [ "messaging" ], - "description": "Get a subscriber by its unique ID.\r\n", + "description": "Get a subscriber by its unique ID.\n", "responses": { "200": { "description": "Subscriber", @@ -17281,7 +17293,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -17349,7 +17361,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -17426,7 +17438,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 201, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -17501,7 +17513,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 200, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -17643,7 +17655,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -17705,7 +17717,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -17841,7 +17853,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -17905,7 +17917,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -17981,7 +17993,7 @@ "tags": [ "storage" ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\r\n\r\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\r\n\r\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\r\n\r\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\r\n", + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", "responses": { "201": { "description": "File", @@ -17992,7 +18004,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 205, + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -18088,7 +18100,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -18162,7 +18174,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 212, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -18255,7 +18267,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 213, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -18331,7 +18343,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 209, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -18407,7 +18419,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 208, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -18610,7 +18622,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -18686,7 +18698,7 @@ }, "x-appwrite": { "method": "list", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -18765,7 +18777,7 @@ }, "x-appwrite": { "method": "create", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -18861,7 +18873,7 @@ }, "x-appwrite": { "method": "get", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -18927,7 +18939,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -19006,7 +19018,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -19063,7 +19075,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Memberships List", @@ -19074,7 +19086,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -19150,7 +19162,7 @@ "tags": [ "teams" ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\r\n\r\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\r\n\r\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \r\n\r\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\r\n", + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", "responses": { "201": { "description": "Membership", @@ -19161,7 +19173,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -19269,7 +19281,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", "responses": { "200": { "description": "Membership", @@ -19280,7 +19292,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -19343,7 +19355,7 @@ "tags": [ "teams" ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\r\n", + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", "responses": { "200": { "description": "Membership", @@ -19354,7 +19366,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -19444,7 +19456,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -19509,7 +19521,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\r\n\r\nIf the request is successful, a session for the user is automatically created.\r\n", + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", "responses": { "200": { "description": "Membership", @@ -19520,7 +19532,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -19619,7 +19631,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -19683,7 +19695,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19767,7 +19779,7 @@ }, "x-appwrite": { "method": "list", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -19842,7 +19854,7 @@ }, "x-appwrite": { "method": "create", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -19940,7 +19952,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -20034,7 +20046,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 231, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -20128,7 +20140,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -20200,7 +20212,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20264,7 +20276,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -20358,7 +20370,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -20452,7 +20464,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -20581,7 +20593,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -20696,7 +20708,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -20811,7 +20823,7 @@ }, "x-appwrite": { "method": "get", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -20868,7 +20880,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -20932,7 +20944,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -21014,7 +21026,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -21088,7 +21100,7 @@ "tags": [ "users" ], - "description": "Update the user labels by its unique ID. \r\n\r\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", "responses": { "200": { "description": "User", @@ -21099,7 +21111,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -21184,7 +21196,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -21260,7 +21272,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -21324,7 +21336,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -21406,7 +21418,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -21483,7 +21495,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -21547,7 +21559,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -21609,7 +21621,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -21671,7 +21683,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -21735,7 +21747,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -21817,7 +21829,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -21899,7 +21911,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -21981,7 +21993,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -22043,7 +22055,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -22125,7 +22137,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -22176,7 +22188,7 @@ "tags": [ "users" ], - "description": "Creates a session for a user. Returns an immediately usable session object.\r\n\r\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", "responses": { "201": { "description": "Session", @@ -22187,7 +22199,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -22244,7 +22256,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -22303,7 +22315,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -22375,7 +22387,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -22457,7 +22469,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -22532,7 +22544,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -22648,7 +22660,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -22719,7 +22731,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -22814,7 +22826,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -22876,7 +22888,7 @@ "tags": [ "users" ], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\r\n", + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", "responses": { "201": { "description": "Token", @@ -22887,7 +22899,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -22972,7 +22984,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -23054,7 +23066,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -26072,12 +26084,12 @@ }, "userName": { "type": "string", - "description": "User name.", + "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address.", + "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -26107,7 +26119,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", "x-example": false }, "roles": { @@ -26273,7 +26285,7 @@ "specification": { "type": "string", "description": "Machine specification for builds and executions.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -26591,7 +26603,7 @@ "format": "int32" }, "responseBody": { - "type": "payload", + "type": "string", "description": "HTTP response body. This will return empty unless execution is created as synchronous.", "x-example": "" }, @@ -27087,7 +27099,7 @@ "slug": { "type": "string", "description": "Size slug.", - "x-example": "s-0.5vcpu-512mb" + "x-example": "s-1vcpu-512mb" } }, "required": [ @@ -27538,7 +27550,7 @@ "name": { "type": "string", "description": "Target Name.", - "x-example": "Aegon apple token" + "x-example": "Apple iPhone 12" }, "userId": { "type": "string", @@ -27560,6 +27572,11 @@ "type": "string", "description": "The target identifier.", "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ @@ -27569,7 +27586,8 @@ "name", "userId", "providerType", - "identifier" + "identifier", + "expired" ] } }, From a6ae565093b4b2b8006cd572f53c3e9009465d05 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 6 Nov 2024 17:54:02 +0100 Subject: [PATCH 54/66] fix: tests --- app/controllers/api/teams.php | 4 +- tests/e2e/Services/Teams/TeamsBaseServer.php | 59 +++++++++++++++- .../Services/Teams/TeamsConsoleClientTest.php | 67 ------------------- .../Services/Teams/TeamsCustomClientTest.php | 8 +-- 4 files changed, 64 insertions(+), 74 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index a12c8f5f9f..997a6a8039 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -794,7 +794,7 @@ App::get('/v1/teams/:teamId/memberships') $isPrivilegedUser = Auth::isPrivilegedUser($roles); $isAppUser = Auth::isAppUser($roles); - $sensitiveAttributes = ($isPrivilegedUser || $isAppUser) || $project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true; + $sensitiveAttributes = $isPrivilegedUser || $isAppUser || ($project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true); $memberships = array_map(function ($membership) use ($dbForProject, $team, $sensitiveAttributes) { if ($sensitiveAttributes) { @@ -864,7 +864,7 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') $isPrivilegedUser = Auth::isPrivilegedUser($roles); $isAppUser = Auth::isAppUser($roles); - $sensitiveAttributes = ($isPrivilegedUser || $isAppUser) || $project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true; + $sensitiveAttributes = $isPrivilegedUser || $isAppUser || ($project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true); if ($sensitiveAttributes) { $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); diff --git a/tests/e2e/Services/Teams/TeamsBaseServer.php b/tests/e2e/Services/Teams/TeamsBaseServer.php index 4e9d0839ab..c34b7f5795 100644 --- a/tests/e2e/Services/Teams/TeamsBaseServer.php +++ b/tests/e2e/Services/Teams/TeamsBaseServer.php @@ -29,7 +29,7 @@ trait TeamsBaseServer * Test for FAILURE */ - return []; + return $data; } /** @@ -60,6 +60,63 @@ trait TeamsBaseServer $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['joined'])); // is null in DB $this->assertEquals(true, $response['body']['confirm']); + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $this->getProject()['$id'] . '/auth/teams-sensitive-attributes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + ]), [ + 'enabled' => false, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + /** + * Test that sensitive fields are not hidden, as we are on console + */ + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertIsInt($response['body']['total']); + $this->assertNotEmpty($response['body']['memberships'][0]['$id']); + + // Assert that sensitive fields are present + $this->assertNotEmpty($response['body']['memberships'][0]['userName']); + $this->assertNotEmpty($response['body']['memberships'][0]['userEmail']); + $this->assertArrayHasKey('mfa', $response['body']['memberships'][0]); + + /** + * Update project settings to show sensitive fields + */ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $this->getProject()['$id'] . '/auth/teams-sensitive-attributes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + ]), [ + 'enabled' => true, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + /** + * Test that sensitive fields are shown + */ + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertIsInt($response['body']['total']); + $this->assertNotEmpty($response['body']['memberships'][0]['$id']); + + // Assert that sensitive fields are present + $this->assertNotEmpty($response['body']['memberships'][0]['userName']); + $this->assertNotEmpty($response['body']['memberships'][0]['userEmail']); + $this->assertArrayHasKey('mfa', $response['body']['memberships'][0]); + /** * Test for FAILURE */ diff --git a/tests/e2e/Services/Teams/TeamsConsoleClientTest.php b/tests/e2e/Services/Teams/TeamsConsoleClientTest.php index 0032f360b5..4b5ade7cbf 100644 --- a/tests/e2e/Services/Teams/TeamsConsoleClientTest.php +++ b/tests/e2e/Services/Teams/TeamsConsoleClientTest.php @@ -14,73 +14,6 @@ class TeamsConsoleClientTest extends Scope use ProjectConsole; use SideClient; - /** - * @depends testGetTeamMemberships - */ - public function testSensitiveFieldsGetMembership($data) - { - $teamUid = $data['teamUid'] ?? ''; - - $projectId = $this->getProject()['$id']; - - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => 'console', - 'cookie' => 'a_session_console=' . $this->getRoot()['session'], - ]), [ - 'enabled' => false, - ]); - - $this->assertEquals(200, $response['headers']['status-code']); - - /** - * Test that sensitive fields are not hidden, as we are on console - */ - $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - ], $this->getHeaders())); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertIsInt($response['body']['total']); - $this->assertNotEmpty($response['body']['memberships'][0]['$id']); - - // Assert that sensitive fields are present - $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); - $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); - $this->assertFalse($response['body']['memberships'][0]['mfa']); - - /** - * Update project settings to show sensitive fields - */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => 'console', - 'cookie' => 'a_session_console=' . $this->getRoot()['session'], - ]), [ - 'enabled' => true, - ]); - - $this->assertEquals(200, $response['headers']['status-code']); - - /** - * Test that sensitive fields are shown - */ - $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $projectId, - ], $this->getHeaders())); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertIsInt($response['body']['total']); - $this->assertNotEmpty($response['body']['memberships'][0]['$id']); - - // Assert that sensitive fields are present - $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); - $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); - $this->assertFalse($response['body']['memberships'][0]['mfa']); - } - /** * @depends testCreateTeam */ diff --git a/tests/e2e/Services/Teams/TeamsCustomClientTest.php b/tests/e2e/Services/Teams/TeamsCustomClientTest.php index 0ab912f710..5720b1ca71 100644 --- a/tests/e2e/Services/Teams/TeamsCustomClientTest.php +++ b/tests/e2e/Services/Teams/TeamsCustomClientTest.php @@ -17,7 +17,7 @@ class TeamsCustomClientTest extends Scope /** * @depends testGetTeamMemberships */ - public function testSensitiveFieldsGetMembership($data) + public function testGetMembershipSensitiveFields($data) { $teamUid = $data['teamUid'] ?? ''; @@ -76,9 +76,9 @@ class TeamsCustomClientTest extends Scope $this->assertNotEmpty($response['body']['memberships'][0]['$id']); // Assert that sensitive fields are present - $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); - $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); - $this->assertFalse($response['body']['memberships'][0]['mfa']); + $this->assertNotEmpty($response['body']['memberships'][0]['userName']); + $this->assertNotEmpty($response['body']['memberships'][0]['userEmail']); + $this->assertArrayHasKey('mfa', $response['body']['memberships'][0]); } /** From e4c6e97dedf56fe4ffdade67676509a7cdefbf9a Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 6 Nov 2024 21:15:31 +0100 Subject: [PATCH 55/66] feat: memberships privacy --- app/config/specs/open-api3-1.6.x-console.json | 192 ++++++++++-------- .../specs/open-api3-latest-console.json | 192 ++++++++++-------- app/config/specs/swagger2-1.6.x-console.json | 192 ++++++++++-------- app/config/specs/swagger2-latest-console.json | 192 ++++++++++-------- app/controllers/api/projects.php | 20 +- app/controllers/api/teams.php | 55 +++-- .../Utopia/Response/Model/Project.php | 20 +- tests/e2e/Services/Teams/TeamsBaseServer.php | 12 +- .../Services/Teams/TeamsCustomClientTest.php | 12 +- 9 files changed, 520 insertions(+), 367 deletions(-) diff --git a/app/config/specs/open-api3-1.6.x-console.json b/app/config/specs/open-api3-1.6.x-console.json index ecd295509f..4fa3f5d69e 100644 --- a/app/config/specs/open-api3-1.6.x-console.json +++ b/app/config/specs/open-api3-1.6.x-console.json @@ -20670,6 +20670,99 @@ } } }, + "\/projects\/{projectId}\/auth\/memberships-privacy": { + "patch": { + "summary": "Update project team sensitive attributes", + "operationId": "projectsUpdateMembershipsPrivacy", + "tags": [ + "projects" + ], + "description": "", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "x-appwrite": { + "method": "updateMembershipsPrivacy", + "weight": 161, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-memberships-privacy.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "offline-model": "", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userName": { + "type": "boolean", + "description": "Set to true to show userName to members of a team.", + "x-example": false + }, + "userEmail": { + "type": "boolean", + "description": "Set to true to show email to members of a team.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Set to true to show mfa to members of a team.", + "x-example": false + } + }, + "required": [ + "userName", + "userEmail", + "mfa" + ] + } + } + } + } + } + }, "\/projects\/{projectId}\/auth\/mock-numbers": { "patch": { "summary": "Update the mock numbers for the project", @@ -21078,87 +21171,6 @@ } } }, - "\/projects\/{projectId}\/auth\/teams-sensitive-attributes": { - "patch": { - "summary": "Update project team sensitive attributes", - "operationId": "projectsUpdateTeamsSensitiveAttributes", - "tags": [ - "projects" - ], - "description": "", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "x-appwrite": { - "method": "updateTeamsSensitiveAttributes", - "weight": 161, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects\/update-teams-sensitive-attributes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": [ - "console" - ], - "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Set to true to show sensitive attributes to team members.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -36065,9 +36077,19 @@ "description": "Whether or not to send session alert emails to users.", "x-example": true }, - "teamsSensitiveAttributes": { + "membershipsUserName": { "type": "boolean", - "description": "Whether or not to show sensitive attributes in the teams API.", + "description": "Whether or not to show user names in the teams membership response.", + "x-example": true + }, + "membershipsUserEmail": { + "type": "boolean", + "description": "Whether or not to show user emails in the teams membership response.", + "x-example": true + }, + "membershipsMfa": { + "type": "boolean", + "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, "oAuthProviders": { @@ -36275,7 +36297,9 @@ "authPersonalDataCheck", "authMockNumbers", "authSessionAlerts", - "teamsSensitiveAttributes", + "membershipsUserName", + "membershipsUserEmail", + "membershipsMfa", "oAuthProviders", "platforms", "webhooks", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index ecd295509f..4fa3f5d69e 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -20670,6 +20670,99 @@ } } }, + "\/projects\/{projectId}\/auth\/memberships-privacy": { + "patch": { + "summary": "Update project team sensitive attributes", + "operationId": "projectsUpdateMembershipsPrivacy", + "tags": [ + "projects" + ], + "description": "", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "x-appwrite": { + "method": "updateMembershipsPrivacy", + "weight": 161, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-memberships-privacy.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "offline-model": "", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userName": { + "type": "boolean", + "description": "Set to true to show userName to members of a team.", + "x-example": false + }, + "userEmail": { + "type": "boolean", + "description": "Set to true to show email to members of a team.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Set to true to show mfa to members of a team.", + "x-example": false + } + }, + "required": [ + "userName", + "userEmail", + "mfa" + ] + } + } + } + } + } + }, "\/projects\/{projectId}\/auth\/mock-numbers": { "patch": { "summary": "Update the mock numbers for the project", @@ -21078,87 +21171,6 @@ } } }, - "\/projects\/{projectId}\/auth\/teams-sensitive-attributes": { - "patch": { - "summary": "Update project team sensitive attributes", - "operationId": "projectsUpdateTeamsSensitiveAttributes", - "tags": [ - "projects" - ], - "description": "", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "x-appwrite": { - "method": "updateTeamsSensitiveAttributes", - "weight": 161, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects\/update-teams-sensitive-attributes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": [ - "console" - ], - "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Set to true to show sensitive attributes to team members.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -36065,9 +36077,19 @@ "description": "Whether or not to send session alert emails to users.", "x-example": true }, - "teamsSensitiveAttributes": { + "membershipsUserName": { "type": "boolean", - "description": "Whether or not to show sensitive attributes in the teams API.", + "description": "Whether or not to show user names in the teams membership response.", + "x-example": true + }, + "membershipsUserEmail": { + "type": "boolean", + "description": "Whether or not to show user emails in the teams membership response.", + "x-example": true + }, + "membershipsMfa": { + "type": "boolean", + "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, "oAuthProviders": { @@ -36275,7 +36297,9 @@ "authPersonalDataCheck", "authMockNumbers", "authSessionAlerts", - "teamsSensitiveAttributes", + "membershipsUserName", + "membershipsUserEmail", + "membershipsMfa", "oAuthProviders", "platforms", "webhooks", diff --git a/app/config/specs/swagger2-1.6.x-console.json b/app/config/specs/swagger2-1.6.x-console.json index 0c96ba472b..bba9cd9ca3 100644 --- a/app/config/specs/swagger2-1.6.x-console.json +++ b/app/config/specs/swagger2-1.6.x-console.json @@ -21136,6 +21136,100 @@ ] } }, + "\/projects\/{projectId}\/auth\/memberships-privacy": { + "patch": { + "summary": "Update project team sensitive attributes", + "operationId": "projectsUpdateMembershipsPrivacy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateMembershipsPrivacy", + "weight": 161, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-memberships-privacy.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "offline-model": "", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userName": { + "type": "boolean", + "description": "Set to true to show userName to members of a team.", + "default": null, + "x-example": false + }, + "userEmail": { + "type": "boolean", + "description": "Set to true to show email to members of a team.", + "default": null, + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Set to true to show mfa to members of a team.", + "default": null, + "x-example": false + } + }, + "required": [ + "userName", + "userEmail", + "mfa" + ] + } + } + ] + } + }, "\/projects\/{projectId}\/auth\/mock-numbers": { "patch": { "summary": "Update the mock numbers for the project", @@ -21539,86 +21633,6 @@ ] } }, - "\/projects\/{projectId}\/auth\/teams-sensitive-attributes": { - "patch": { - "summary": "Update project team sensitive attributes", - "operationId": "projectsUpdateTeamsSensitiveAttributes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "x-appwrite": { - "method": "updateTeamsSensitiveAttributes", - "weight": 161, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects\/update-teams-sensitive-attributes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": [ - "console" - ], - "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Set to true to show sensitive attributes to team members.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -36577,9 +36591,19 @@ "description": "Whether or not to send session alert emails to users.", "x-example": true }, - "teamsSensitiveAttributes": { + "membershipsUserName": { "type": "boolean", - "description": "Whether or not to show sensitive attributes in the teams API.", + "description": "Whether or not to show user names in the teams membership response.", + "x-example": true + }, + "membershipsUserEmail": { + "type": "boolean", + "description": "Whether or not to show user emails in the teams membership response.", + "x-example": true + }, + "membershipsMfa": { + "type": "boolean", + "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, "oAuthProviders": { @@ -36791,7 +36815,9 @@ "authPersonalDataCheck", "authMockNumbers", "authSessionAlerts", - "teamsSensitiveAttributes", + "membershipsUserName", + "membershipsUserEmail", + "membershipsMfa", "oAuthProviders", "platforms", "webhooks", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 0c96ba472b..bba9cd9ca3 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -21136,6 +21136,100 @@ ] } }, + "\/projects\/{projectId}\/auth\/memberships-privacy": { + "patch": { + "summary": "Update project team sensitive attributes", + "operationId": "projectsUpdateMembershipsPrivacy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateMembershipsPrivacy", + "weight": 161, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-memberships-privacy.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "offline-model": "", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userName": { + "type": "boolean", + "description": "Set to true to show userName to members of a team.", + "default": null, + "x-example": false + }, + "userEmail": { + "type": "boolean", + "description": "Set to true to show email to members of a team.", + "default": null, + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Set to true to show mfa to members of a team.", + "default": null, + "x-example": false + } + }, + "required": [ + "userName", + "userEmail", + "mfa" + ] + } + } + ] + } + }, "\/projects\/{projectId}\/auth\/mock-numbers": { "patch": { "summary": "Update the mock numbers for the project", @@ -21539,86 +21633,6 @@ ] } }, - "\/projects\/{projectId}\/auth\/teams-sensitive-attributes": { - "patch": { - "summary": "Update project team sensitive attributes", - "operationId": "projectsUpdateTeamsSensitiveAttributes", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "projects" - ], - "description": "", - "responses": { - "200": { - "description": "Project", - "schema": { - "$ref": "#\/definitions\/project" - } - } - }, - "x-appwrite": { - "method": "updateTeamsSensitiveAttributes", - "weight": 161, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "projects\/update-teams-sensitive-attributes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": [ - "console" - ], - "packaging": false, - "offline-model": "", - "offline-key": "", - "offline-response-key": "$id", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Set to true to show sensitive attributes to team members.", - "default": null, - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - ] - } - }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -36577,9 +36591,19 @@ "description": "Whether or not to send session alert emails to users.", "x-example": true }, - "teamsSensitiveAttributes": { + "membershipsUserName": { "type": "boolean", - "description": "Whether or not to show sensitive attributes in the teams API.", + "description": "Whether or not to show user names in the teams membership response.", + "x-example": true + }, + "membershipsUserEmail": { + "type": "boolean", + "description": "Whether or not to show user emails in the teams membership response.", + "x-example": true + }, + "membershipsMfa": { + "type": "boolean", + "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, "oAuthProviders": { @@ -36791,7 +36815,9 @@ "authPersonalDataCheck", "authMockNumbers", "authSessionAlerts", - "teamsSensitiveAttributes", + "membershipsUserName", + "membershipsUserEmail", + "membershipsMfa", "oAuthProviders", "platforms", "webhooks", diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 5fb774d12e..29e6b591fc 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -111,7 +111,9 @@ App::post('/v1/projects') 'personalDataCheck' => false, 'mockNumbers' => [], 'sessionAlerts' => false, - 'teamsSensitiveAttributes' => true, + 'membershipsUserName' => true, + 'membershipsUserEmail' => true, + 'membershipsMfa' => true, ]; foreach ($auth as $method) { @@ -649,23 +651,23 @@ App::patch('/v1/projects/:projectId/auth/session-alerts') $response->dynamic($project, Response::MODEL_PROJECT); }); -App::patch('/v1/projects/:projectId/auth/teams-sensitive-attributes') +App::patch('/v1/projects/:projectId/auth/memberships-privacy') ->desc('Update project team sensitive attributes') ->groups(['api', 'projects']) ->label('scope', 'projects.write') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'projects') - ->label('sdk.method', 'updateTeamsSensitiveAttributes') + ->label('sdk.method', 'updateMembershipsPrivacy') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_PROJECT) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('enabled', true, new Boolean(true), 'Set to true to show sensitive attributes to team members.') + ->param('userName', true, new Boolean(true), 'Set to true to show userName to members of a team.') + ->param('userEmail', true, new Boolean(true), 'Set to true to show email to members of a team.') + ->param('mfa', true, new Boolean(true), 'Set to true to show mfa to members of a team.') ->inject('response') ->inject('dbForConsole') - ->action(function (string $projectId, bool $enabled, Response $response, Database $dbForConsole) { - $enabled = \strval($enabled) === 'true' || \strval($enabled) === '1'; - + ->action(function (string $projectId, bool $userName, bool $userEmail, bool $mfa, Response $response, Database $dbForConsole) { $project = $dbForConsole->getDocument('projects', $projectId); if ($project->isEmpty()) { @@ -674,7 +676,9 @@ App::patch('/v1/projects/:projectId/auth/teams-sensitive-attributes') $auths = $project->getAttribute('auths', []); - $auths['teamsSensitiveAttributes'] = $enabled; + $auths['membershipsUserName'] = $userName; + $auths['membershipsUserEmail'] = $userEmail; + $auths['membershipsMfa'] = $mfa; $dbForConsole->updateDocument('projects', $project->getId(), $project ->setAttribute('auths', $auths)); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 997a6a8039..ff6b14d156 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -790,17 +790,25 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn (Document $membership) => !empty($membership->getAttribute('userId'))); + $membershipsPrivacy = $project->getAttribute('auths', [])['membershipPrivacy'] ?? [ + 'userName' => true, + 'userEmail' => true, + 'mfa' => true, + ]; + $roles = Authorization::getRoles(); $isPrivilegedUser = Auth::isPrivilegedUser($roles); $isAppUser = Auth::isAppUser($roles); - $sensitiveAttributes = $isPrivilegedUser || $isAppUser || ($project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true); + $membershipsPrivacy = array_map(function ($privacy) use ($isPrivilegedUser, $isAppUser) { + return $privacy || $isPrivilegedUser || $isAppUser; + }, $membershipsPrivacy); - $memberships = array_map(function ($membership) use ($dbForProject, $team, $sensitiveAttributes) { - if ($sensitiveAttributes) { + $memberships = array_map(function ($membership) use ($dbForProject, $team, $membershipsPrivacy) { + if ($membershipsPrivacy['mfa']) { $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); - $mfa = $user->getAttribute('mfa', false); + if ($mfa) { $totp = TOTP::getAuthenticatorFromUser($user); $totpEnabled = $totp && $totp->getAttribute('verified', false); @@ -812,13 +820,19 @@ App::get('/v1/teams/:teamId/memberships') } } - $membership - ->setAttribute('mfa', $mfa) - ->setAttribute('userName', $user->getAttribute('name')) - ->setAttribute('userEmail', $user->getAttribute('email')); + $membership->setAttribute('mfa', $mfa); + } + + if ($membershipsPrivacy['userName']) { + $membership->setAttribute('userName', $user->getAttribute('name')); + } + + if ($membershipsPrivacy['userEmail']) { + $membership->setAttribute('userEmail', $user->getAttribute('email')); } $membership->setAttribute('teamName', $team->getAttribute('name')); + return $membership; }, $memberships); @@ -860,13 +874,21 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') throw new Exception(Exception::MEMBERSHIP_NOT_FOUND); } + $membershipsPrivacy = $project->getAttribute('auths', [])['membershipPrivacy'] ?? [ + 'userName' => true, + 'userEmail' => true, + 'mfa' => true, + ]; + $roles = Authorization::getRoles(); $isPrivilegedUser = Auth::isPrivilegedUser($roles); $isAppUser = Auth::isAppUser($roles); - $sensitiveAttributes = $isPrivilegedUser || $isAppUser || ($project->getAttribute('auths', [])['teamsSensitiveAttributes'] ?? true); + $membershipsPrivacy = array_map(function ($privacy) use ($isPrivilegedUser, $isAppUser) { + return $privacy || $isPrivilegedUser || $isAppUser; + }, $membershipsPrivacy); - if ($sensitiveAttributes) { + if ($membershipsPrivacy['mfa']) { $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); $mfa = $user->getAttribute('mfa', false); @@ -882,10 +904,15 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') } } - $membership - ->setAttribute('mfa', $mfa) - ->setAttribute('userName', $user->getAttribute('name')) - ->setAttribute('userEmail', $user->getAttribute('email')); + $membership->setAttribute('mfa', $mfa); + } + + if ($membershipsPrivacy['userName']) { + $membership->setAttribute('userName', $user->getAttribute('name')); + } + + if ($membershipsPrivacy['userEmail']) { + $membership->setAttribute('userEmail', $user->getAttribute('email')); } $membership->setAttribute('teamName', $team->getAttribute('name')); diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index 50bc1f300f..f2abf26d9b 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -151,9 +151,21 @@ class Project extends Model 'default' => false, 'example' => true, ]) - ->addRule('teamsSensitiveAttributes', [ + ->addRule('membershipsUserName', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Whether or not to show sensitive attributes in the teams API.', + 'description' => 'Whether or not to show user names in the teams membership response.', + 'default' => false, + 'example' => true, + ]) + ->addRule('membershipsUserEmail', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Whether or not to show user emails in the teams membership response.', + 'default' => false, + 'example' => true, + ]) + ->addRule('membershipsMfa', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Whether or not to show user MFA status in the teams membership response.', 'default' => false, 'example' => true, ]) @@ -354,7 +366,9 @@ class Project extends Model $document->setAttribute('authPersonalDataCheck', $authValues['personalDataCheck'] ?? false); $document->setAttribute('authMockNumbers', $authValues['mockNumbers'] ?? []); $document->setAttribute('authSessionAlerts', $authValues['sessionAlerts'] ?? false); - $document->setAttribute('authTeamsSensitiveAttributes', $authValues['teamsSensitiveAttributes'] ?? true); + $document->setAttribute('authMembershipUserName', $authValues['membershipUserName'] ?? true); + $document->setAttribute('authMembershipUserEmail', $authValues['membershipUserEmail'] ?? true); + $document->setAttribute('authMembershipMfa', $authValues['membershipMfa'] ?? true); foreach ($auth as $index => $method) { $key = $method['key']; diff --git a/tests/e2e/Services/Teams/TeamsBaseServer.php b/tests/e2e/Services/Teams/TeamsBaseServer.php index c34b7f5795..6a1d05e9d4 100644 --- a/tests/e2e/Services/Teams/TeamsBaseServer.php +++ b/tests/e2e/Services/Teams/TeamsBaseServer.php @@ -60,12 +60,14 @@ trait TeamsBaseServer $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['joined'])); // is null in DB $this->assertEquals(true, $response['body']['confirm']); - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $this->getProject()['$id'] . '/auth/teams-sensitive-attributes', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $this->getProject()['$id'] . '/auth/memberships-privacy', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', 'cookie' => 'a_session_console=' . $this->getRoot()['session'], ]), [ - 'enabled' => false, + 'userName' => false, + 'userEmail' => false, + 'mfa' => false, ]); $this->assertEquals(200, $response['headers']['status-code']); @@ -90,12 +92,14 @@ trait TeamsBaseServer /** * Update project settings to show sensitive fields */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $this->getProject()['$id'] . '/auth/teams-sensitive-attributes', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $this->getProject()['$id'] . '/auth/memberships-privacy', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', 'cookie' => 'a_session_console=' . $this->getRoot()['session'], ]), [ - 'enabled' => true, + 'userName' => true, + 'userEmail' => true, + 'mfa' => true, ]); $this->assertEquals(200, $response['headers']['status-code']); diff --git a/tests/e2e/Services/Teams/TeamsCustomClientTest.php b/tests/e2e/Services/Teams/TeamsCustomClientTest.php index 5720b1ca71..4b22497a9c 100644 --- a/tests/e2e/Services/Teams/TeamsCustomClientTest.php +++ b/tests/e2e/Services/Teams/TeamsCustomClientTest.php @@ -23,12 +23,14 @@ class TeamsCustomClientTest extends Scope $projectId = $this->getProject()['$id']; - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/memberships-privacy', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', 'cookie' => 'a_session_console=' . $this->getRoot()['session'], ]), [ - 'enabled' => false, + 'userName' => false, + 'userEmail' => false, + 'mfa' => false, ]); $this->assertEquals(200, $response['headers']['status-code']); @@ -53,12 +55,14 @@ class TeamsCustomClientTest extends Scope /** * Update project settings to show sensitive fields */ - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/teams-sensitive-attributes', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $projectId . '/auth/memberships-privacy', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', 'cookie' => 'a_session_console=' . $this->getRoot()['session'], ]), [ - 'enabled' => true, + 'userName' => true, + 'userEmail' => true, + 'mfa' => true, ]); $this->assertEquals(200, $response['headers']['status-code']); From 99565cae991a30e3e479a2b50373a3c70b2a7a99 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 6 Nov 2024 21:21:21 +0100 Subject: [PATCH 56/66] feat: improve copy --- docs/references/teams/get-team-member.md | 2 +- docs/references/teams/list-team-members.md | 2 +- src/Appwrite/Utopia/Response/Model/Membership.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/references/teams/get-team-member.md b/docs/references/teams/get-team-member.md index c3293be2ac..91bf44c73b 100644 --- a/docs/references/teams/get-team-member.md +++ b/docs/references/teams/get-team-member.md @@ -1 +1 @@ -Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console. \ No newline at end of file +Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console. \ No newline at end of file diff --git a/docs/references/teams/list-team-members.md b/docs/references/teams/list-team-members.md index af2645ac44..540a665d98 100644 --- a/docs/references/teams/list-team-members.md +++ b/docs/references/teams/list-team-members.md @@ -1 +1 @@ -Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console. \ No newline at end of file +Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console. \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Model/Membership.php b/src/Appwrite/Utopia/Response/Model/Membership.php index bafbc67118..46153842bc 100644 --- a/src/Appwrite/Utopia/Response/Model/Membership.php +++ b/src/Appwrite/Utopia/Response/Model/Membership.php @@ -36,13 +36,13 @@ class Membership extends Model ]) ->addRule('userName', [ 'type' => self::TYPE_STRING, - 'description' => 'User name. Hide this attribute by disabling teams sensitive data in the Console.', + 'description' => 'User name. Hide this attribute by toggling membership privacy in the Console.', 'default' => '', 'example' => 'John Doe', ]) ->addRule('userEmail', [ 'type' => self::TYPE_STRING, - 'description' => 'User email address. Hide this attribute by disabling teams sensitive data in the Console.', + 'description' => 'User email address. Hide this attribute by toggling membership privacy in the Console.', 'default' => '', 'example' => 'john@appwrite.io', ]) @@ -78,7 +78,7 @@ class Membership extends Model ]) ->addRule('mfa', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.', + 'description' => 'Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.', 'default' => false, 'example' => false, ]) From afbdca3fc3c3c49784f309ddbfd1073034fdd966 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 6 Nov 2024 21:21:38 +0100 Subject: [PATCH 57/66] chore: specs --- app/config/specs/open-api3-1.6.x-client.json | 10 +++++----- app/config/specs/open-api3-1.6.x-console.json | 10 +++++----- app/config/specs/open-api3-1.6.x-server.json | 10 +++++----- app/config/specs/open-api3-latest-client.json | 10 +++++----- app/config/specs/open-api3-latest-console.json | 10 +++++----- app/config/specs/open-api3-latest-server.json | 10 +++++----- app/config/specs/swagger2-1.6.x-client.json | 10 +++++----- app/config/specs/swagger2-1.6.x-console.json | 10 +++++----- app/config/specs/swagger2-1.6.x-server.json | 10 +++++----- app/config/specs/swagger2-latest-client.json | 10 +++++----- app/config/specs/swagger2-latest-console.json | 10 +++++----- app/config/specs/swagger2-latest-server.json | 10 +++++----- 12 files changed, 60 insertions(+), 60 deletions(-) diff --git a/app/config/specs/open-api3-1.6.x-client.json b/app/config/specs/open-api3-1.6.x-client.json index 7018a07040..e3cd909b4e 100644 --- a/app/config/specs/open-api3-1.6.x-client.json +++ b/app/config/specs/open-api3-1.6.x-client.json @@ -7069,7 +7069,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -7270,7 +7270,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -9266,12 +9266,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -9301,7 +9301,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/open-api3-1.6.x-console.json b/app/config/specs/open-api3-1.6.x-console.json index 4fa3f5d69e..4e97fecc30 100644 --- a/app/config/specs/open-api3-1.6.x-console.json +++ b/app/config/specs/open-api3-1.6.x-console.json @@ -26937,7 +26937,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -27138,7 +27138,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -34961,12 +34961,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -34996,7 +34996,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/open-api3-1.6.x-server.json b/app/config/specs/open-api3-1.6.x-server.json index b49e5b9616..e84b751743 100644 --- a/app/config/specs/open-api3-1.6.x-server.json +++ b/app/config/specs/open-api3-1.6.x-server.json @@ -18626,7 +18626,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -18831,7 +18831,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -25598,12 +25598,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -25633,7 +25633,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 7018a07040..e3cd909b4e 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -7069,7 +7069,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -7270,7 +7270,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -9266,12 +9266,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -9301,7 +9301,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 4fa3f5d69e..4e97fecc30 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -26937,7 +26937,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -27138,7 +27138,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -34961,12 +34961,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -34996,7 +34996,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index b49e5b9616..e84b751743 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -18626,7 +18626,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -18831,7 +18831,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -25598,12 +25598,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -25633,7 +25633,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/swagger2-1.6.x-client.json b/app/config/specs/swagger2-1.6.x-client.json index cd935bc95e..b1b9ce8dca 100644 --- a/app/config/specs/swagger2-1.6.x-client.json +++ b/app/config/specs/swagger2-1.6.x-client.json @@ -7277,7 +7277,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -7479,7 +7479,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -9445,12 +9445,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -9480,7 +9480,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/swagger2-1.6.x-console.json b/app/config/specs/swagger2-1.6.x-console.json index bba9cd9ca3..c7b6bac2d4 100644 --- a/app/config/specs/swagger2-1.6.x-console.json +++ b/app/config/specs/swagger2-1.6.x-console.json @@ -27409,7 +27409,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -27611,7 +27611,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -35469,12 +35469,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -35504,7 +35504,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/swagger2-1.6.x-server.json b/app/config/specs/swagger2-1.6.x-server.json index a1e32ab4a1..2c8e80c65e 100644 --- a/app/config/specs/swagger2-1.6.x-server.json +++ b/app/config/specs/swagger2-1.6.x-server.json @@ -19075,7 +19075,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -19281,7 +19281,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -26084,12 +26084,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -26119,7 +26119,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index cd935bc95e..b1b9ce8dca 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -7277,7 +7277,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -7479,7 +7479,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -9445,12 +9445,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -9480,7 +9480,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index bba9cd9ca3..c7b6bac2d4 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -27409,7 +27409,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -27611,7 +27611,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -35469,12 +35469,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -35504,7 +35504,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index a1e32ab4a1..2c8e80c65e 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -19075,7 +19075,7 @@ "tags": [ "teams" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Memberships List", @@ -19281,7 +19281,7 @@ "tags": [ "teams" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes (userName, userEmail and mfa) from the response by disabling teams sensitive data in the Console.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { "description": "Membership", @@ -26084,12 +26084,12 @@ }, "userName": { "type": "string", - "description": "User name. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", "x-example": "John Doe" }, "userEmail": { "type": "string", - "description": "User email address. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", "x-example": "john@appwrite.io" }, "teamId": { @@ -26119,7 +26119,7 @@ }, "mfa": { "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by disabling teams sensitive data in the Console.", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", "x-example": false }, "roles": { From b7397617e6c951f88a1c377a26be275bcc378636 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:19:22 +0100 Subject: [PATCH 58/66] fix: tests --- app/controllers/api/teams.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index ff6b14d156..f543389b51 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -790,10 +790,10 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn (Document $membership) => !empty($membership->getAttribute('userId'))); - $membershipsPrivacy = $project->getAttribute('auths', [])['membershipPrivacy'] ?? [ - 'userName' => true, - 'userEmail' => true, - 'mfa' => true, + $membershipsPrivacy = [ + 'userName' => $project->getAttribute('auths', [])['authMembershipUserName'] ?? true, + 'userEmail' => $project->getAttribute('auths', [])['authMembershipUserEmail'] ?? true, + 'mfa' => $project->getAttribute('auths', [])['authMembershipMfa'] ?? true, ]; $roles = Authorization::getRoles(); @@ -874,10 +874,10 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') throw new Exception(Exception::MEMBERSHIP_NOT_FOUND); } - $membershipsPrivacy = $project->getAttribute('auths', [])['membershipPrivacy'] ?? [ - 'userName' => true, - 'userEmail' => true, - 'mfa' => true, + $membershipsPrivacy = [ + 'userName' => $project->getAttribute('auths', [])['authMembershipUserName'] ?? true, + 'userEmail' => $project->getAttribute('auths', [])['authMembershipUserEmail'] ?? true, + 'mfa' => $project->getAttribute('auths', [])['authMembershipMfa'] ?? true, ]; $roles = Authorization::getRoles(); From d4de44429f9fd168ceb044484575cd90190ad7d8 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:33:40 +0100 Subject: [PATCH 59/66] fix: tests --- app/controllers/api/teams.php | 12 ++++++------ src/Appwrite/Utopia/Response/Model/Project.php | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index f543389b51..8b36b565d8 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -791,9 +791,9 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn (Document $membership) => !empty($membership->getAttribute('userId'))); $membershipsPrivacy = [ - 'userName' => $project->getAttribute('auths', [])['authMembershipUserName'] ?? true, - 'userEmail' => $project->getAttribute('auths', [])['authMembershipUserEmail'] ?? true, - 'mfa' => $project->getAttribute('auths', [])['authMembershipMfa'] ?? true, + 'userName' => $project->getAttribute('auths', [])['authMembershipsUserName'] ?? true, + 'userEmail' => $project->getAttribute('auths', [])['authMembershipsUserEmail'] ?? true, + 'mfa' => $project->getAttribute('auths', [])['authMembershipsMfa'] ?? true, ]; $roles = Authorization::getRoles(); @@ -875,9 +875,9 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') } $membershipsPrivacy = [ - 'userName' => $project->getAttribute('auths', [])['authMembershipUserName'] ?? true, - 'userEmail' => $project->getAttribute('auths', [])['authMembershipUserEmail'] ?? true, - 'mfa' => $project->getAttribute('auths', [])['authMembershipMfa'] ?? true, + 'userName' => $project->getAttribute('auths', [])['authMembershipsUserName'] ?? true, + 'userEmail' => $project->getAttribute('auths', [])['authMembershipsUserEmail'] ?? true, + 'mfa' => $project->getAttribute('auths', [])['authMembershipsMfa'] ?? true, ]; $roles = Authorization::getRoles(); diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index f2abf26d9b..1397475585 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -366,9 +366,9 @@ class Project extends Model $document->setAttribute('authPersonalDataCheck', $authValues['personalDataCheck'] ?? false); $document->setAttribute('authMockNumbers', $authValues['mockNumbers'] ?? []); $document->setAttribute('authSessionAlerts', $authValues['sessionAlerts'] ?? false); - $document->setAttribute('authMembershipUserName', $authValues['membershipUserName'] ?? true); - $document->setAttribute('authMembershipUserEmail', $authValues['membershipUserEmail'] ?? true); - $document->setAttribute('authMembershipMfa', $authValues['membershipMfa'] ?? true); + $document->setAttribute('authMembershipsUserName', $authValues['membershipsUserName'] ?? true); + $document->setAttribute('authMembershipsUserEmail', $authValues['membershipsUserEmail'] ?? true); + $document->setAttribute('authMembershipsMfa', $authValues['membershipsMfa'] ?? true); foreach ($auth as $index => $method) { $key = $method['key']; From e7e1a5b11fbe326318e571ff185c83ec1adc27c6 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:13:20 +0100 Subject: [PATCH 60/66] fix: tests --- app/controllers/api/projects.php | 2 +- app/controllers/api/teams.php | 12 ++++++------ tests/e2e/Services/Teams/TeamsCustomClientTest.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 29e6b591fc..6d9d7308fb 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -652,7 +652,7 @@ App::patch('/v1/projects/:projectId/auth/session-alerts') }); App::patch('/v1/projects/:projectId/auth/memberships-privacy') - ->desc('Update project team sensitive attributes') + ->desc('Update project team memberships privacy attributes') ->groups(['api', 'projects']) ->label('scope', 'projects.write') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 8b36b565d8..be055f0935 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -791,9 +791,9 @@ App::get('/v1/teams/:teamId/memberships') $memberships = array_filter($memberships, fn (Document $membership) => !empty($membership->getAttribute('userId'))); $membershipsPrivacy = [ - 'userName' => $project->getAttribute('auths', [])['authMembershipsUserName'] ?? true, - 'userEmail' => $project->getAttribute('auths', [])['authMembershipsUserEmail'] ?? true, - 'mfa' => $project->getAttribute('auths', [])['authMembershipsMfa'] ?? true, + 'userName' => $project->getAttribute('auths', [])['membershipsUserName'] ?? true, + 'userEmail' => $project->getAttribute('auths', [])['membershipsUserEmail'] ?? true, + 'mfa' => $project->getAttribute('auths', [])['membershipsMfa'] ?? true, ]; $roles = Authorization::getRoles(); @@ -875,9 +875,9 @@ App::get('/v1/teams/:teamId/memberships/:membershipId') } $membershipsPrivacy = [ - 'userName' => $project->getAttribute('auths', [])['authMembershipsUserName'] ?? true, - 'userEmail' => $project->getAttribute('auths', [])['authMembershipsUserEmail'] ?? true, - 'mfa' => $project->getAttribute('auths', [])['authMembershipsMfa'] ?? true, + 'userName' => $project->getAttribute('auths', [])['membershipsUserName'] ?? true, + 'userEmail' => $project->getAttribute('auths', [])['membershipsUserEmail'] ?? true, + 'mfa' => $project->getAttribute('auths', [])['membershipsMfa'] ?? true, ]; $roles = Authorization::getRoles(); diff --git a/tests/e2e/Services/Teams/TeamsCustomClientTest.php b/tests/e2e/Services/Teams/TeamsCustomClientTest.php index 4b22497a9c..03cb1983f1 100644 --- a/tests/e2e/Services/Teams/TeamsCustomClientTest.php +++ b/tests/e2e/Services/Teams/TeamsCustomClientTest.php @@ -17,7 +17,7 @@ class TeamsCustomClientTest extends Scope /** * @depends testGetTeamMemberships */ - public function testGetMembershipSensitiveFields($data) + public function testGetMembershipPrivacy($data) { $teamUid = $data['teamUid'] ?? ''; From 5b4d51f6dd77fb18902a26408d9332b8d29e9537 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:30:59 +0100 Subject: [PATCH 61/66] chore: composer update --- composer.lock | 62 +++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/composer.lock b/composer.lock index 6dce436601..ff822aaafb 100644 --- a/composer.lock +++ b/composer.lock @@ -2608,16 +2608,16 @@ }, { "name": "utopia-php/storage", - "version": "0.18.5", + "version": "0.18.6", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "7d355c5e3ccc8ecebc0266f8ddd30088a43be919" + "reference": "893ccf06e183f8ece2aed8dbf14d64d6ba036071" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/7d355c5e3ccc8ecebc0266f8ddd30088a43be919", - "reference": "7d355c5e3ccc8ecebc0266f8ddd30088a43be919", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/893ccf06e183f8ece2aed8dbf14d64d6ba036071", + "reference": "893ccf06e183f8ece2aed8dbf14d64d6ba036071", "shasum": "" }, "require": { @@ -2657,9 +2657,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.18.5" + "source": "https://github.com/utopia-php/storage/tree/0.18.6" }, - "time": "2024-09-04T08:57:27+00:00" + "time": "2024-11-06T09:58:50+00:00" }, { "name": "utopia-php/swoole", @@ -4004,16 +4004,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.5.0", + "version": "5.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "54e10d44fc1a84e2598d26f70d4f6f1f233e228a" + "reference": "0c70d2c566e899666f367ab7b80986beb3581e6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/54e10d44fc1a84e2598d26f70d4f6f1f233e228a", - "reference": "54e10d44fc1a84e2598d26f70d4f6f1f233e228a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/0c70d2c566e899666f367ab7b80986beb3581e6f", + "reference": "0c70d2c566e899666f367ab7b80986beb3581e6f", "shasum": "" }, "require": { @@ -4062,9 +4062,9 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.5.0" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.5.1" }, - "time": "2024-11-04T21:26:31+00:00" + "time": "2024-11-06T11:58:54+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -5875,16 +5875,16 @@ }, { "name": "symfony/console", - "version": "v7.1.6", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57" + "reference": "3284aafcac338b6e86fd955ee4d794cbe434151a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", - "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", + "url": "https://api.github.com/repos/symfony/console/zipball/3284aafcac338b6e86fd955ee4d794cbe434151a", + "reference": "3284aafcac338b6e86fd955ee4d794cbe434151a", "shasum": "" }, "require": { @@ -5948,7 +5948,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.6" + "source": "https://github.com/symfony/console/tree/v7.1.7" }, "funding": [ { @@ -5964,7 +5964,7 @@ "type": "tidelift" } ], - "time": "2024-10-09T08:46:59+00:00" + "time": "2024-11-05T15:34:55+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6546,16 +6546,16 @@ }, { "name": "symfony/process", - "version": "v7.1.6", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e" + "reference": "9b8a40b7289767aa7117e957573c2a535efe6585" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", - "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", + "url": "https://api.github.com/repos/symfony/process/zipball/9b8a40b7289767aa7117e957573c2a535efe6585", + "reference": "9b8a40b7289767aa7117e957573c2a535efe6585", "shasum": "" }, "require": { @@ -6587,7 +6587,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.6" + "source": "https://github.com/symfony/process/tree/v7.1.7" }, "funding": [ { @@ -6603,7 +6603,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-06T09:25:12+00:00" }, { "name": "symfony/service-contracts", @@ -6876,16 +6876,16 @@ }, { "name": "twig/twig", - "version": "v3.14.0", + "version": "v3.14.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72" + "reference": "f405356d20fb43603bcadc8b09bfb676cb04a379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72", - "reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/f405356d20fb43603bcadc8b09bfb676cb04a379", + "reference": "f405356d20fb43603bcadc8b09bfb676cb04a379", "shasum": "" }, "require": { @@ -6939,7 +6939,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.14.0" + "source": "https://github.com/twigphp/Twig/tree/v3.14.1" }, "funding": [ { @@ -6951,7 +6951,7 @@ "type": "tidelift" } ], - "time": "2024-09-09T17:55:12+00:00" + "time": "2024-11-06T18:17:38+00:00" }, { "name": "webmozart/glob", @@ -7005,7 +7005,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { From c19d6a6dda5a63740a5421139a4f035e184dff2c Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:33:44 +0100 Subject: [PATCH 62/66] chore: description --- app/controllers/api/projects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 6d9d7308fb..98ff96858c 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -652,7 +652,7 @@ App::patch('/v1/projects/:projectId/auth/session-alerts') }); App::patch('/v1/projects/:projectId/auth/memberships-privacy') - ->desc('Update project team memberships privacy attributes') + ->desc('Update project memberships privacy attributes') ->groups(['api', 'projects']) ->label('scope', 'projects.write') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) From 25adb39634db278f3408e3ee65fadecb0f1c8b7f Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:37:34 +0100 Subject: [PATCH 63/66] chore: update model --- src/Appwrite/Utopia/Response/Model/Project.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index 1397475585..6e01baee84 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -151,19 +151,19 @@ class Project extends Model 'default' => false, 'example' => true, ]) - ->addRule('membershipsUserName', [ + ->addRule('authMembershipsUserName', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Whether or not to show user names in the teams membership response.', 'default' => false, 'example' => true, ]) - ->addRule('membershipsUserEmail', [ + ->addRule('authMembershipsUserEmail', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Whether or not to show user emails in the teams membership response.', 'default' => false, 'example' => true, ]) - ->addRule('membershipsMfa', [ + ->addRule('authMembershipsMfa', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Whether or not to show user MFA status in the teams membership response.', 'default' => false, From 31062aa3eef3ee713ffcbd049c460538fdb5d04f Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:54:49 +0100 Subject: [PATCH 64/66] fix: specs --- app/config/specs/open-api3-1.6.x-console.json | 14 +++++++------- app/config/specs/swagger2-1.6.x-console.json | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/config/specs/open-api3-1.6.x-console.json b/app/config/specs/open-api3-1.6.x-console.json index 4e97fecc30..369fea741a 100644 --- a/app/config/specs/open-api3-1.6.x-console.json +++ b/app/config/specs/open-api3-1.6.x-console.json @@ -20672,7 +20672,7 @@ }, "\/projects\/{projectId}\/auth\/memberships-privacy": { "patch": { - "summary": "Update project team sensitive attributes", + "summary": "Update project memberships privacy attributes", "operationId": "projectsUpdateMembershipsPrivacy", "tags": [ "projects" @@ -36077,17 +36077,17 @@ "description": "Whether or not to send session alert emails to users.", "x-example": true }, - "membershipsUserName": { + "authMembershipsUserName": { "type": "boolean", "description": "Whether or not to show user names in the teams membership response.", "x-example": true }, - "membershipsUserEmail": { + "authMembershipsUserEmail": { "type": "boolean", "description": "Whether or not to show user emails in the teams membership response.", "x-example": true }, - "membershipsMfa": { + "authMembershipsMfa": { "type": "boolean", "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true @@ -36297,9 +36297,9 @@ "authPersonalDataCheck", "authMockNumbers", "authSessionAlerts", - "membershipsUserName", - "membershipsUserEmail", - "membershipsMfa", + "authMembershipsUserName", + "authMembershipsUserEmail", + "authMembershipsMfa", "oAuthProviders", "platforms", "webhooks", diff --git a/app/config/specs/swagger2-1.6.x-console.json b/app/config/specs/swagger2-1.6.x-console.json index c7b6bac2d4..9ce9d5f60d 100644 --- a/app/config/specs/swagger2-1.6.x-console.json +++ b/app/config/specs/swagger2-1.6.x-console.json @@ -21138,7 +21138,7 @@ }, "\/projects\/{projectId}\/auth\/memberships-privacy": { "patch": { - "summary": "Update project team sensitive attributes", + "summary": "Update project memberships privacy attributes", "operationId": "projectsUpdateMembershipsPrivacy", "consumes": [ "application\/json" @@ -36591,17 +36591,17 @@ "description": "Whether or not to send session alert emails to users.", "x-example": true }, - "membershipsUserName": { + "authMembershipsUserName": { "type": "boolean", "description": "Whether or not to show user names in the teams membership response.", "x-example": true }, - "membershipsUserEmail": { + "authMembershipsUserEmail": { "type": "boolean", "description": "Whether or not to show user emails in the teams membership response.", "x-example": true }, - "membershipsMfa": { + "authMembershipsMfa": { "type": "boolean", "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true @@ -36815,9 +36815,9 @@ "authPersonalDataCheck", "authMockNumbers", "authSessionAlerts", - "membershipsUserName", - "membershipsUserEmail", - "membershipsMfa", + "authMembershipsUserName", + "authMembershipsUserEmail", + "authMembershipsMfa", "oAuthProviders", "platforms", "webhooks", From 33a441421ef12e6077345fa45934aff86fb81914 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:23:13 +0100 Subject: [PATCH 65/66] chore: enabled privacy by default --- app/controllers/api/projects.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 98ff96858c..df8b1cb07b 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -111,9 +111,9 @@ App::post('/v1/projects') 'personalDataCheck' => false, 'mockNumbers' => [], 'sessionAlerts' => false, - 'membershipsUserName' => true, - 'membershipsUserEmail' => true, - 'membershipsMfa' => true, + 'membershipsUserName' => false, + 'membershipsUserEmail' => false, + 'membershipsMfa' => false, ]; foreach ($auth as $method) { From 21e946e9b640e6cb1d043660cbfcc665b28f5185 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 7 Nov 2024 19:12:41 +0100 Subject: [PATCH 66/66] fix: tests --- tests/e2e/Services/Teams/TeamsBaseClient.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 8a1fed028e..9188575932 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -30,8 +30,8 @@ trait TeamsBaseClient $this->assertIsInt($response['body']['total']); $this->assertNotEmpty($response['body']['memberships'][0]['$id']); $this->assertFalse($response['body']['memberships'][0]['mfa']); - $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); - $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); + $this->assertArrayHasKey('userName', $response['body']['memberships'][0]); + $this->assertArrayHasKey('userEmail', $response['body']['memberships'][0]); $this->assertEquals($teamName, $response['body']['memberships'][0]['teamName']); $this->assertContains('owner', $response['body']['memberships'][0]['roles']); $this->assertContains('player', $response['body']['memberships'][0]['roles']); @@ -96,8 +96,8 @@ trait TeamsBaseClient $this->assertEquals(200, $response['headers']['status-code']); $this->assertIsInt($response['body']['total']); $this->assertNotEmpty($response['body']['memberships'][0]); - $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); - $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); + $this->assertArrayHasKey('userName', $response['body']['memberships'][0]); + $this->assertArrayHasKey('userEmail', $response['body']['memberships'][0]); $this->assertEquals($teamName, $response['body']['memberships'][0]['teamName']); $this->assertContains('owner', $response['body']['memberships'][0]['roles']); $this->assertContains('player', $response['body']['memberships'][0]['roles']); @@ -112,8 +112,8 @@ trait TeamsBaseClient $this->assertEquals(200, $response['headers']['status-code']); $this->assertIsInt($response['body']['total']); $this->assertNotEmpty($response['body']['memberships'][0]); - $this->assertEquals($this->getUser()['name'], $response['body']['memberships'][0]['userName']); - $this->assertEquals($this->getUser()['email'], $response['body']['memberships'][0]['userEmail']); + $this->assertArrayHasKey('userName', $response['body']['memberships'][0]); + $this->assertArrayHasKey('userEmail', $response['body']['memberships'][0]); $this->assertEquals($teamName, $response['body']['memberships'][0]['teamName']); $this->assertContains('owner', $response['body']['memberships'][0]['roles']); $this->assertContains('player', $response['body']['memberships'][0]['roles']); @@ -157,8 +157,8 @@ trait TeamsBaseClient $this->assertNotEmpty($response['body']['$id']); $this->assertFalse($response['body']['mfa']); $this->assertNotEmpty($response['body']['userId']); - $this->assertNotEmpty($response['body']['userName']); - $this->assertNotEmpty($response['body']['userEmail']); + $this->assertArrayHasKey('userName', $response['body']); + $this->assertArrayHasKey('userEmail', $response['body']); $this->assertNotEmpty($response['body']['teamId']); $this->assertNotEmpty($response['body']['teamName']); $this->assertCount(1, $response['body']['roles']);