From 17b7af9199f84363e8631f2969577ba0bb19aff5 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 23 Nov 2022 02:44:38 +0530 Subject: [PATCH 01/51] fix: add headers to console --- app/controllers/web/console.php | 18 ++++++++++++++++++ app/controllers/web/home.php | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php index 8115f09285..bfb925b1ae 100644 --- a/app/controllers/web/console.php +++ b/app/controllers/web/console.php @@ -1,8 +1,26 @@ groups(['web']) + ->inject('request') + ->inject('response') + ->action(function (Request $request, Response $response) { + $time = (60 * 60 * 24 * 45); // 45 days cache + + $response + ->addHeader('Cache-Control', 'public, max-age=' . $time) + ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + $time) . ' GMT') // 45 days cache + ->addHeader('X-Frame-Options', 'SAMEORIGIN') // Avoid console and homepage from showing in iframes + ->addHeader('X-XSS-Protection', '1; mode=block; report=/v1/xss?url=' . \urlencode($request->getURI())) + ->addHeader('X-UA-Compatible', 'IE=Edge') // Deny IE browsers from going into quirks mode + ; + + }); + App::get('/console') ->alias('/') ->alias('/invite') diff --git a/app/controllers/web/home.php b/app/controllers/web/home.php index 04785fb338..9655db8a01 100644 --- a/app/controllers/web/home.php +++ b/app/controllers/web/home.php @@ -6,7 +6,7 @@ use Utopia\Config\Config; App::get('/versions') ->desc('Get Version') - ->groups(['web', 'home']) + ->groups(['home']) ->label('scope', 'public') ->inject('response') ->action(function (Response $response) { From 6a6a90a24cc6fe0eac4719bebf8f6a18f674bad3 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 23 Nov 2022 02:51:00 +0530 Subject: [PATCH 02/51] fix: review comments --- app/controllers/web/console.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php index bfb925b1ae..42fe221062 100644 --- a/app/controllers/web/console.php +++ b/app/controllers/web/console.php @@ -9,16 +9,11 @@ App::init() ->inject('request') ->inject('response') ->action(function (Request $request, Response $response) { - $time = (60 * 60 * 24 * 45); // 45 days cache - $response - ->addHeader('Cache-Control', 'public, max-age=' . $time) - ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + $time) . ' GMT') // 45 days cache ->addHeader('X-Frame-Options', 'SAMEORIGIN') // Avoid console and homepage from showing in iframes ->addHeader('X-XSS-Protection', '1; mode=block; report=/v1/xss?url=' . \urlencode($request->getURI())) ->addHeader('X-UA-Compatible', 'IE=Edge') // Deny IE browsers from going into quirks mode ; - }); App::get('/console') From 1262a07729267016e04ad3e7b7e467183f6016be Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 23 Nov 2022 12:19:46 +0530 Subject: [PATCH 03/51] chore: update changelog --- CHANGES.md | 1 + app/console | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index e1655b069c..2c44004ab7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ # Version 1.1.2 ## Changes - Make `region` parameter optional with default for project create [#4763](https://github.com/appwrite/appwrite/pull/4763) +- Add security headers to the console endpoint [#4758](https://github.com/appwrite/appwrite/pull/4758) # Version 1.1.1 ## Bugs diff --git a/app/console b/app/console index f89584bdd4..b1a81a390a 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit f89584bdd4ba3de07fb54cecbc275b131e23a4fb +Subproject commit b1a81a390a05746701651fca49e0d853f430677c From 518b45827ffd981c15944666ed00a941afcb9474 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 19 Apr 2023 02:17:26 +0000 Subject: [PATCH 04/51] content-range end should be 1 less than file size --- app/controllers/api/functions.php | 4 ++-- app/controllers/api/storage.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 5c10a3df9b..d39c637a2e 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -650,11 +650,11 @@ App::post('/v1/functions/:functionId/deployments') $end = $request->getContentRangeEnd(); $fileSize = $request->getContentRangeSize(); $deploymentId = $request->getHeader('x-appwrite-id', $deploymentId); - if (is_null($start) || is_null($end) || is_null($fileSize)) { + if (is_null($start) || is_null($end) || is_null($fileSize) || $end >= $fileSize) { throw new Exception(Exception::STORAGE_INVALID_CONTENT_RANGE); } - if ($end === $fileSize) { + if ($end === $fileSize - 1) { //if it's a last chunks the chunk size might differ, so we set the $chunks and $chunk to notify it's last chunk $chunks = $chunk = -1; } else { diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index b936fc6b2f..47a4656715 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -444,11 +444,11 @@ App::post('/v1/storage/buckets/:bucketId/files') $end = $request->getContentRangeEnd(); $fileSize = $request->getContentRangeSize(); $fileId = $request->getHeader('x-appwrite-id', $fileId); - if (is_null($start) || is_null($end) || is_null($fileSize)) { + if (is_null($start) || is_null($end) || is_null($fileSize) || $end >= $fileSize) { throw new Exception(Exception::STORAGE_INVALID_CONTENT_RANGE); } - if ($end === $fileSize) { + if ($end === $fileSize - 1) { //if it's a last chunks the chunk size might differ, so we set the $chunks and $chunk to -1 notify it's last chunk $chunks = $chunk = -1; } else { From 26aea21768dad1396bb004665474ddbb7eeba2ed Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 19 Apr 2023 04:44:59 +0000 Subject: [PATCH 05/51] fix chunk header size in test --- tests/e2e/Services/Storage/StorageBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Storage/StorageBase.php b/tests/e2e/Services/Storage/StorageBase.php index baef838979..73bc279926 100644 --- a/tests/e2e/Services/Storage/StorageBase.php +++ b/tests/e2e/Services/Storage/StorageBase.php @@ -101,7 +101,7 @@ trait StorageBase $id = ''; while (!feof($handle)) { $curlFile = new \CURLFile('data://' . $mimeType . ';base64,' . base64_encode(@fread($handle, $chunkSize)), $mimeType, 'large-file.mp4'); - $headers['content-range'] = 'bytes ' . ($counter * $chunkSize) . '-' . min(((($counter * $chunkSize) + $chunkSize) - 1), $size) . '/' . $size; + $headers['content-range'] = 'bytes ' . ($counter * $chunkSize) . '-' . min(((($counter * $chunkSize) + $chunkSize) - 1), $size - 1) . '/' . $size; if (!empty($id)) { $headers['x-appwrite-id'] = $id; } @@ -145,7 +145,7 @@ trait StorageBase ]; $id = ''; $curlFile = new \CURLFile('data://' . $mimeType . ';base64,' . base64_encode(@fread($handle, $chunkSize)), $mimeType, 'large-file.mp4'); - $headers['content-range'] = 'bytes ' . ($counter * $chunkSize) . '-' . min(((($counter * $chunkSize) + $chunkSize) - 1), $size) . '/' . $size; + $headers['content-range'] = 'bytes ' . ($counter * $chunkSize) . '-' . min(((($counter * $chunkSize) + $chunkSize) - 1), $size - 1) . '/' . $size; $res = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . $bucket2['body']['$id'] . '/files', $this->getHeaders(), [ 'fileId' => $fileId, 'file' => $curlFile, From 3486885dc8b54312c497cd513077e523c48c0f06 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 19 Apr 2023 05:38:54 +0000 Subject: [PATCH 06/51] fix large deployment test --- tests/e2e/Services/Functions/FunctionsCustomServerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 2b66277952..37ba2ede7b 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -405,7 +405,7 @@ class FunctionsCustomServerTest extends Scope $id = ''; while (!feof($handle)) { $curlFile = new \CURLFile('data://' . $mimeType . ';base64,' . base64_encode(@fread($handle, $chunkSize)), $mimeType, 'php-large-fx.tar.gz'); - $headers['content-range'] = 'bytes ' . ($counter * $chunkSize) . '-' . min(((($counter * $chunkSize) + $chunkSize) - 1), $size) . '/' . $size; + $headers['content-range'] = 'bytes ' . ($counter * $chunkSize) . '-' . min(((($counter * $chunkSize) + $chunkSize) - 1), $size - 1) . '/' . $size; if (!empty($id)) { $headers['x-appwrite-id'] = $id; } From b13800386d65227e6289c0c1b17f48b0051aa892 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 19 Apr 2023 06:15:24 +0000 Subject: [PATCH 07/51] fix mock for upload changes --- app/controllers/mock.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/mock.php b/app/controllers/mock.php index 33e92f289a..1f251a6d35 100644 --- a/app/controllers/mock.php +++ b/app/controllers/mock.php @@ -286,7 +286,7 @@ App::post('/v1/mock/tests/general/upload') $id = $request->getHeader('x-appwrite-id', ''); $file['size'] = (\is_array($file['size'])) ? $file['size'][0] : $file['size']; - if (is_null($start) || is_null($end) || is_null($size)) { + if (is_null($start) || is_null($end) || is_null($size) || $end >= $size) { throw new Exception(Exception::GENERAL_MOCK, 'Invalid content-range header'); } @@ -302,11 +302,11 @@ App::post('/v1/mock/tests/general/upload') throw new Exception(Exception::GENERAL_MOCK, 'All chunked request must have id header (except first)'); } - if ($end !== $size && $end - $start + 1 !== $chunkSize) { + if ($end !== $size - 1 && $end - $start + 1 !== $chunkSize) { throw new Exception(Exception::GENERAL_MOCK, 'Chunk size must be 5MB (except last chunk)'); } - if ($end !== $size && $file['size'] !== $chunkSize) { + if ($end !== $size - 1 && $file['size'] !== $chunkSize) { throw new Exception(Exception::GENERAL_MOCK, 'Wrong chunk size'); } @@ -314,11 +314,11 @@ App::post('/v1/mock/tests/general/upload') throw new Exception(Exception::GENERAL_MOCK, 'Chunk size must be 5MB or less'); } - if ($end !== $size) { + if ($end !== $size - 1) { $response->json([ '$id' => ID::custom('newfileid'), - 'chunksTotal' => $file['size'] / $chunkSize, - 'chunksUploaded' => $start / $chunkSize + 'chunksTotal' => (int) ceil($size / ($end + 1 - $start)), + 'chunksUploaded' => ceil($start / $chunkSize) + 1 ]); } } else { From edbc52403a39ac517b8a0a346f1dd808835c5c69 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 27 Apr 2023 09:29:39 +0000 Subject: [PATCH 08/51] update so that current SDK don't fail --- app/controllers/api/functions.php | 6 ++++-- app/controllers/api/storage.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index d39c637a2e..7a14c675ab 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -650,11 +650,13 @@ App::post('/v1/functions/:functionId/deployments') $end = $request->getContentRangeEnd(); $fileSize = $request->getContentRangeSize(); $deploymentId = $request->getHeader('x-appwrite-id', $deploymentId); - if (is_null($start) || is_null($end) || is_null($fileSize) || $end >= $fileSize) { + // TODO make `end >= $fileSize` in next breaking version + if (is_null($start) || is_null($end) || is_null($fileSize) || $end > $fileSize) { throw new Exception(Exception::STORAGE_INVALID_CONTENT_RANGE); } - if ($end === $fileSize - 1) { + // TODO remove the condition that checks `$end === $fileSize` in next breaking version + if ($end === $fileSize - 1 || $end === $fileSize) { //if it's a last chunks the chunk size might differ, so we set the $chunks and $chunk to notify it's last chunk $chunks = $chunk = -1; } else { diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 47a4656715..d97f8c18ef 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -444,11 +444,13 @@ App::post('/v1/storage/buckets/:bucketId/files') $end = $request->getContentRangeEnd(); $fileSize = $request->getContentRangeSize(); $fileId = $request->getHeader('x-appwrite-id', $fileId); - if (is_null($start) || is_null($end) || is_null($fileSize) || $end >= $fileSize) { + // TODO make `end >= $fileSize` in next breaking version + if (is_null($start) || is_null($end) || is_null($fileSize) || $end > $fileSize) { throw new Exception(Exception::STORAGE_INVALID_CONTENT_RANGE); } - if ($end === $fileSize - 1) { + // TODO remove the condition that checks `$end === $fileSize` in next breaking version + if ($end === $fileSize - 1 || $end === $fileSize) { //if it's a last chunks the chunk size might differ, so we set the $chunks and $chunk to -1 notify it's last chunk $chunks = $chunk = -1; } else { From 6858c5c26ace1272655088d9b7ec02a5a08e6ae7 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 21 May 2023 07:27:20 +0545 Subject: [PATCH 09/51] Update GETTING_STARTED.md --- docs/sdks/flutter/GETTING_STARTED.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index b9b8dc3a47..110ee3eb4a 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -46,6 +46,8 @@ For **Linux** add your app name and package name, Your package nam ### Mac OS For **Mac OS** add your app name and Bundle ID, You can find your Bundle Identifier in the General tab for your app's primary target in Xcode. +The Appwrite SDK uses ASWebAuthenticationSession on macOS 10.15+ to allow OAuth authentication. You have to change your macOS Deployment Target in Xcode to be macOS >= 10.15 to be able to build your app for macOS. + ### Web Appwrite 0.7, and the Appwrite Flutter SDK 0.3.0 have added support for Flutter Web. To build web apps that integrate with Appwrite successfully, all you have to do is add a web platform on your Appwrite project's dashboard and list the domain your website will use to allow communication to the Appwrite API. From 6813d53e0669c0df55e8d0193623fda9a4242b1e Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 25 May 2023 00:32:49 +0000 Subject: [PATCH 10/51] remove password required for project deletion --- app/controllers/api/projects.php | 6 ------ tests/e2e/Services/Projects/ProjectsConsoleClientTest.php | 8 +++----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 0baff3726a..ff9d544bfb 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -684,17 +684,11 @@ App::delete('/v1/projects/:projectId') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('password', '', new Password(), 'Your user password for confirmation. Must be at least 8 chars.') ->inject('response') ->inject('user') ->inject('dbForConsole') ->inject('deletes') ->action(function (string $projectId, string $password, Response $response, Document $user, Database $dbForConsole, Delete $deletes) { - - if (!Auth::passwordVerify($password, $user->getAttribute('password'), $user->getAttribute('hash'), $user->getAttribute('hashOptions'))) { // Double check user password - throw new Exception(Exception::USER_INVALID_CREDENTIALS); - } - $project = $dbForConsole->getDocument('projects', $projectId); if ($project->isEmpty()) { diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 42b18918af..0041f1ce3a 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -2997,15 +2997,13 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $project['headers']['status-code']); - // Delete team + // Delete Project $team = $this->client->call(Client::METHOD_DELETE, '/projects/' . $projectId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'password' => 'password' - ]); + ], $this->getHeaders())); - $this->assertEquals(204, $team['headers']['status-code']); + $this->assertEquals(204, $project['headers']['status-code']); // Ensure I can get team but not a project $team = $this->client->call(Client::METHOD_GET, '/teams/' . $teamId, array_merge([ From 6c38bcc2702bf5f838d52681d8fdae1a49f475cd Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 25 May 2023 01:26:13 +0000 Subject: [PATCH 11/51] fix typo --- tests/e2e/Services/Projects/ProjectsConsoleClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 0041f1ce3a..5b333425b0 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -2998,7 +2998,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $project['headers']['status-code']); // Delete Project - $team = $this->client->call(Client::METHOD_DELETE, '/projects/' . $projectId, array_merge([ + $project = $this->client->call(Client::METHOD_DELETE, '/projects/' . $projectId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); From 237658f4e80564b6f6d8a0358213d53c046bc0c8 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 25 May 2023 05:33:06 +0000 Subject: [PATCH 12/51] fix param --- 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 ff9d544bfb..90aefbf809 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -688,7 +688,7 @@ App::delete('/v1/projects/:projectId') ->inject('user') ->inject('dbForConsole') ->inject('deletes') - ->action(function (string $projectId, string $password, Response $response, Document $user, Database $dbForConsole, Delete $deletes) { + ->action(function (string $projectId, Response $response, Document $user, Database $dbForConsole, Delete $deletes) { $project = $dbForConsole->getDocument('projects', $projectId); if ($project->isEmpty()) { From c61e54f69b5b2b5259334d49c697dff416cbc9dc Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 30 May 2023 14:52:59 +1200 Subject: [PATCH 13/51] Set min length to 0 for default value when creating or updating a string attribute --- app/controllers/api/databases.php | 6 ++-- .../e2e/Services/Databases/DatabasesBase.php | 32 +++++++++++++++---- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 9eedbb986c..c4ff448ce4 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1103,7 +1103,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->param('key', '', new Key(), 'Attribute Key.') ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Text(0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) + ->param('default', null, new Text(0, 0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) ->param('array', false, new Boolean(), 'Is attribute an array?', true) ->inject('response') ->inject('dbForProject') @@ -1112,7 +1112,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->action(function (string $databaseId, string $collectionId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, Event $events) { // Ensure attribute default is within required size - $validator = new Text($size); + $validator = new Text($size, 0); if (!is_null($default) && !$validator->isValid($default)) { throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); } @@ -1777,7 +1777,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin ->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 Text(0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.') + ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.') ->inject('response') ->inject('dbForProject') ->inject('events') diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 0648db849e..c511bf9902 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -157,6 +157,7 @@ trait DatabasesBase public function testCreateAttributes(array $data): array { $databaseId = $data['databaseId']; + $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -167,6 +168,17 @@ trait DatabasesBase 'required' => true, ]); + $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 256, + 'required' => false, + 'default' => '', + ]); + $releaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/attributes/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -226,6 +238,13 @@ trait DatabasesBase $this->assertEquals($title['body']['size'], 256); $this->assertEquals($title['body']['required'], true); + $this->assertEquals(202, $description['headers']['status-code']); + $this->assertEquals($description['body']['key'], 'description'); + $this->assertEquals($description['body']['type'], 'string'); + $this->assertEquals($description['body']['size'], 256); + $this->assertEquals($description['body']['required'], false); + $this->assertEquals($description['body']['default'], ''); + $this->assertEquals(202, $releaseYear['headers']['status-code']); $this->assertEquals($releaseYear['body']['key'], 'releaseYear'); $this->assertEquals($releaseYear['body']['type'], 'integer'); @@ -266,13 +285,14 @@ trait DatabasesBase ]), []); $this->assertIsArray($movies['body']['attributes']); - $this->assertCount(6, $movies['body']['attributes']); + $this->assertCount(7, $movies['body']['attributes']); $this->assertEquals($movies['body']['attributes'][0]['key'], $title['body']['key']); - $this->assertEquals($movies['body']['attributes'][1]['key'], $releaseYear['body']['key']); - $this->assertEquals($movies['body']['attributes'][2]['key'], $duration['body']['key']); - $this->assertEquals($movies['body']['attributes'][3]['key'], $actors['body']['key']); - $this->assertEquals($movies['body']['attributes'][4]['key'], $datetime['body']['key']); - $this->assertEquals($movies['body']['attributes'][5]['key'], $relationship['body']['key']); + $this->assertEquals($movies['body']['attributes'][1]['key'], $description['body']['key']); + $this->assertEquals($movies['body']['attributes'][2]['key'], $releaseYear['body']['key']); + $this->assertEquals($movies['body']['attributes'][3]['key'], $duration['body']['key']); + $this->assertEquals($movies['body']['attributes'][4]['key'], $actors['body']['key']); + $this->assertEquals($movies['body']['attributes'][5]['key'], $datetime['body']['key']); + $this->assertEquals($movies['body']['attributes'][6]['key'], $relationship['body']['key']); return $data; } From 2c59807bf593715a4a5d52221aa11d095d4098d9 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 30 May 2023 15:02:33 +1200 Subject: [PATCH 14/51] Update changelog --- CHANGES.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 5699134be9..b4952b8c0d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,14 @@ +# Version 1.4.0 + +## Bugs + +- Fix string attribute not allowing default with 0 length [#5602](https://github.com/appwrite/appwrite/pull/5602) + # Version 1.3.4 ## Bugs -- Update migration to properly migrate bucket permissiosn [#5497](https://github.com/appwrite/appwrite/pull/5497) +- Update migration to properly migrate bucket permissions [#5497](https://github.com/appwrite/appwrite/pull/5497) # Version 1.3.3 From c2e711b021b80913d888a9c982b9186ffeabedb5 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 30 May 2023 14:07:12 +1200 Subject: [PATCH 15/51] Update framework to fix route mismatches (cherry picked from commit d42f6738a9badc02176913b21b72e01c461681d8) # Conflicts: # composer.lock --- composer.json | 2 +- composer.lock | 30 ++++++++++++------- .../e2e/Services/Databases/DatabasesBase.php | 6 ++++ 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 78f960d3d1..3f15bcfb67 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/config": "0.2.*", "utopia-php/database": "0.36.*", "utopia-php/domains": "1.1.*", - "utopia-php/framework": "0.28.*", + "utopia-php/framework": "dev-fix-route-mistmatch as 0.28.1", "utopia-php/image": "0.5.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.3.*", diff --git a/composer.lock b/composer.lock index 978d14f490..35f54f5cec 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": "169ab6e7dd540e45309d3c5093506fad", + "content-hash": "6b8b1c976fb0a44257d3820fe87af179", "packages": [ { "name": "adhocore/jwt", @@ -2221,23 +2221,24 @@ }, { "name": "utopia-php/framework", - "version": "0.28.1", + "version": "dev-fix-route-mistmatch", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "7f22c556fc5991e54e5811a68fb39809b21bda55" + "reference": "e8e12a880539679010b86576e843be9f4c7f3329" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/7f22c556fc5991e54e5811a68fb39809b21bda55", - "reference": "7f22c556fc5991e54e5811a68fb39809b21bda55", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/e8e12a880539679010b86576e843be9f4c7f3329", + "reference": "e8e12a880539679010b86576e843be9f4c7f3329", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=8.0" }, "require-dev": { "laravel/pint": "^1.2", + "phpstan/phpstan": "1.9.x-dev", "phpunit/phpunit": "^9.5.25", "vimeo/psalm": "4.27.0" }, @@ -2259,9 +2260,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.28.1" + "source": "https://github.com/utopia-php/framework/tree/fix-route-mistmatch" }, - "time": "2023-03-02T08:16:01+00:00" + "time": "2023-05-30T01:59:18+00:00" }, { "name": "utopia-php/image", @@ -5652,9 +5653,18 @@ "time": "2023-02-08T07:49:20+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/framework", + "version": "dev-fix-route-mistmatch", + "alias": "0.28.1", + "alias_normalized": "0.28.1.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "utopia-php/framework": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 0648db849e..88849a4c8e 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -1086,6 +1086,12 @@ trait DatabasesBase $this->assertEquals(400, $document4['headers']['status-code']); + // Delete document 4 with incomplete path + $this->assertEquals(404, $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()))['headers']['status-code']); + return $data; } From 3dd67cb17fd511cc8d2b5467b4d58ab6e521924e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 30 May 2023 18:17:28 +1200 Subject: [PATCH 16/51] Fix visibility (cherry picked from commit b092405b04e9e928520f04c01cc4cfc98d074a68) --- app/controllers/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index fe25f5c273..00d5c6347f 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -437,7 +437,7 @@ App::error() $log->addExtra('line', $error->getLine()); $log->addExtra('trace', $error->getTraceAsString()); $log->addExtra('detailedTrace', $error->getTrace()); - $log->addExtra('roles', Authorization::$roles); + $log->addExtra('roles', Authorization::getRoles()); $action = $route->getLabel("sdk.namespace", "UNKNOWN_NAMESPACE") . '.' . $route->getLabel("sdk.method", "UNKNOWN_METHOD"); $log->setAction($action); From bab804b8e119f5eb16647f1d449094cffbecafaf Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 30 May 2023 18:26:17 +1200 Subject: [PATCH 17/51] Fix tests (cherry picked from commit 0661f1f8899d8dfed18c832d3332959b175b4f6e) --- tests/e2e/Client.php | 54 +++++++------------ tests/e2e/General/HTTPTest.php | 34 ++++-------- tests/e2e/Scopes/Scope.php | 11 ++-- .../e2e/Services/Databases/DatabasesBase.php | 2 +- .../Projects/ProjectsConsoleClientTest.php | 19 ++++++- 5 files changed, 51 insertions(+), 69 deletions(-) diff --git a/tests/e2e/Client.php b/tests/e2e/Client.php index e98472b2b8..21e4ccc958 100644 --- a/tests/e2e/Client.php +++ b/tests/e2e/Client.php @@ -160,35 +160,21 @@ class Client * @param array $params * @param array $headers * @param bool $decode - * @return array|string + * @return array * @throws Exception */ - public function call(string $method, string $path = '', array $headers = [], array $params = [], bool $decode = true) + public function call(string $method, string $path = '', array $headers = [], array $params = [], bool $decode = true): array { $headers = array_merge($this->headers, $headers); $ch = curl_init($this->endpoint . $path . (($method == self::METHOD_GET && !empty($params)) ? '?' . http_build_query($params) : '')); $responseHeaders = []; - $responseStatus = -1; - $responseType = ''; - $responseBody = ''; - switch ($headers['content-type']) { - case 'application/json': - $query = json_encode($params); - break; - - case 'multipart/form-data': - $query = $this->flatten($params); - break; - - case 'application/graphql': - $query = $params[0]; - break; - - default: - $query = http_build_query($params); - break; - } + $query = match ($headers['content-type']) { + 'application/json' => json_encode($params), + 'multipart/form-data' => $this->flatten($params), + 'application/graphql' => $params[0], + default => http_build_query($params), + }; foreach ($headers as $i => $header) { $headers[] = $i . ':' . $header; @@ -220,7 +206,7 @@ class Client curl_setopt($ch, CURLOPT_POSTFIELDS, $query); } - // Allow self signed certificates + // Allow self-signed certificates if ($this->selfSigned) { curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); @@ -230,22 +216,18 @@ class Client $responseType = $responseHeaders['content-type'] ?? ''; $responseStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE); - if ($decode) { - switch (substr($responseType, 0, strpos($responseType, ';'))) { - case 'application/json': - $json = json_decode($responseBody, true); + if ($decode && substr($responseType, 0, strpos($responseType, ';')) == 'application/json') { + $json = json_decode($responseBody, true); - if ($json === null) { - throw new Exception('Failed to parse response: ' . $responseBody); - } - - $responseBody = $json; - $json = null; - break; + if ($json === null) { + throw new Exception('Failed to parse response: ' . $responseBody); } + + $responseBody = $json; + $json = null; } - if ((curl_errno($ch)/* || 200 != $responseStatus*/)) { + if ((curl_errno($ch))) { throw new Exception(curl_error($ch) . ' with status code ' . $responseStatus, $responseStatus); } @@ -273,7 +255,7 @@ class Client { $cookies = []; - parse_str(strtr($cookie, array('&' => '%26', '+' => '%2B', ';' => '&')), $cookies); + parse_str(strtr($cookie, ['&' => '%26', '+' => '%2B', ';' => '&']), $cookies); return $cookies; } diff --git a/tests/e2e/General/HTTPTest.php b/tests/e2e/General/HTTPTest.php index f033cd6d42..09a7048eef 100644 --- a/tests/e2e/General/HTTPTest.php +++ b/tests/e2e/General/HTTPTest.php @@ -12,6 +12,12 @@ class HTTPTest extends Scope use ProjectNone; use SideNone; + public function setUp(): void + { + parent::setUp(); + $this->client->setEndpoint('http://localhost'); + } + public function testOptions() { /** @@ -32,24 +38,6 @@ class HTTPTest extends Scope $this->assertEmpty($response['body']); } - public function testError() - { - /** - * Test for SUCCESS - */ - $this->markTestIncomplete('This test needs to be updated for the new console.'); - // $response = $this->client->call(Client::METHOD_GET, '/error', \array_merge([ - // 'origin' => 'http://localhost', - // 'content-type' => 'application/json', - // ]), []); - - // $this->assertEquals(404, $response['headers']['status-code']); - // $this->assertEquals('Not Found', $response['body']['message']); - // $this->assertEquals(Exception::GENERAL_ROUTE_NOT_FOUND, $response['body']['type']); - // $this->assertEquals(404, $response['body']['code']); - // $this->assertEquals('dev', $response['body']['version']); - } - public function testHumans() { /** @@ -57,7 +45,7 @@ class HTTPTest extends Scope */ $response = $this->client->call(Client::METHOD_GET, '/humans.txt', \array_merge([ 'origin' => 'http://localhost', - ]), []); + ])); $this->assertEquals(200, $response['headers']['status-code']); $this->assertStringContainsString('# humanstxt.org/', $response['body']); @@ -70,7 +58,7 @@ class HTTPTest extends Scope */ $response = $this->client->call(Client::METHOD_GET, '/robots.txt', \array_merge([ 'origin' => 'http://localhost', - ]), []); + ])); $this->assertEquals(200, $response['headers']['status-code']); $this->assertStringContainsString('# robotstxt.org/', $response['body']); @@ -87,7 +75,7 @@ class HTTPTest extends Scope */ $response = $this->client->call(Client::METHOD_GET, '/.well-known/acme-challenge/8DdIKX257k6Dih5s_saeVMpTnjPJdKO5Ase0OCiJrIg', \array_merge([ 'origin' => 'http://localhost', - ]), []); + ])); $this->assertEquals(404, $response['headers']['status-code']); // 'Unknown path', but validation passed @@ -97,9 +85,9 @@ class HTTPTest extends Scope */ $response = $this->client->call(Client::METHOD_GET, '/.well-known/acme-challenge/../../../../../../../etc/passwd', \array_merge([ 'origin' => 'http://localhost', - ]), []); + ])); - $this->assertEquals(400, $response['headers']['status-code']); + $this->assertEquals(404, $response['headers']['status-code']); // Cleanup $this->client->setEndpoint($previousEndpoint); diff --git a/tests/e2e/Scopes/Scope.php b/tests/e2e/Scopes/Scope.php index 42057e8e94..14eb83897b 100644 --- a/tests/e2e/Scopes/Scope.php +++ b/tests/e2e/Scopes/Scope.php @@ -17,10 +17,7 @@ abstract class Scope extends TestCase protected function setUp(): void { $this->client = new Client(); - - $this->client - ->setEndpoint($this->endpoint) - ; + $this->client->setEndpoint($this->endpoint); } protected function tearDown(): void @@ -45,10 +42,10 @@ abstract class Scope extends TestCase { sleep(2); - $resquest = json_decode(file_get_contents('http://request-catcher:5000/__last_request__'), true); - $resquest['data'] = json_decode($resquest['data'], true); + $request = json_decode(file_get_contents('http://request-catcher:5000/__last_request__'), true); + $request['data'] = json_decode($request['data'], true); - return $resquest; + return $request; } /** diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 88849a4c8e..1fa03fc593 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -3053,7 +3053,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create collection - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 91699f2dba..288903f0a1 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -783,11 +783,11 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 501); - $response = $this->client->call(Client::METHOD_POST, '/account/anonymous', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/account/sessions/anonymous', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $id, - ]), []); + ])); $this->assertEquals($response['headers']['status-code'], 501); @@ -843,6 +843,19 @@ class ProjectsConsoleClientTest extends Scope 'name' => $name, ]); + $email = uniqid() . 'user@localhost.test'; + + $response = $this->client->call(Client::METHOD_POST, '/account', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $id, + ]), [ + 'userId' => ID::unique(), + 'email' => $email, + 'password' => $password, + 'name' => $name, + ]); + $this->assertEquals($response['headers']['status-code'], 501); /** @@ -858,6 +871,8 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); + $email = uniqid() . 'user@localhost.test'; + $response = $this->client->call(Client::METHOD_POST, '/account', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', From b101404eda2e8262c8b7d382e219594a7816209a Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 30 May 2023 18:53:58 +1200 Subject: [PATCH 18/51] Update to release version of framework --- composer.json | 2 +- composer.lock | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 3f15bcfb67..78f960d3d1 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/config": "0.2.*", "utopia-php/database": "0.36.*", "utopia-php/domains": "1.1.*", - "utopia-php/framework": "dev-fix-route-mistmatch as 0.28.1", + "utopia-php/framework": "0.28.*", "utopia-php/image": "0.5.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.3.*", diff --git a/composer.lock b/composer.lock index 35f54f5cec..4368987f5c 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": "6b8b1c976fb0a44257d3820fe87af179", + "content-hash": "169ab6e7dd540e45309d3c5093506fad", "packages": [ { "name": "adhocore/jwt", @@ -2221,16 +2221,16 @@ }, { "name": "utopia-php/framework", - "version": "dev-fix-route-mistmatch", + "version": "0.28.2", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "e8e12a880539679010b86576e843be9f4c7f3329" + "reference": "bc0144ff3983afa6724c43f2ce578fdbceec21f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/e8e12a880539679010b86576e843be9f4c7f3329", - "reference": "e8e12a880539679010b86576e843be9f4c7f3329", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/bc0144ff3983afa6724c43f2ce578fdbceec21f9", + "reference": "bc0144ff3983afa6724c43f2ce578fdbceec21f9", "shasum": "" }, "require": { @@ -2260,9 +2260,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/fix-route-mistmatch" + "source": "https://github.com/utopia-php/framework/tree/0.28.2" }, - "time": "2023-05-30T01:59:18+00:00" + "time": "2023-05-30T06:47:57+00:00" }, { "name": "utopia-php/image", @@ -5653,18 +5653,9 @@ "time": "2023-02-08T07:49:20+00:00" } ], - "aliases": [ - { - "package": "utopia-php/framework", - "version": "dev-fix-route-mistmatch", - "alias": "0.28.1", - "alias_normalized": "0.28.1.0" - } - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/framework": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From 5f5ed7dc19d5d66d3a3b5e2782bfa1464ad5bd50 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 30 May 2023 19:41:06 +1200 Subject: [PATCH 19/51] Fix graphql upload test path --- tests/e2e/Services/GraphQL/StorageServerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/GraphQL/StorageServerTest.php b/tests/e2e/Services/GraphQL/StorageServerTest.php index afaef08321..7fea895b1c 100644 --- a/tests/e2e/Services/GraphQL/StorageServerTest.php +++ b/tests/e2e/Services/GraphQL/StorageServerTest.php @@ -77,7 +77,7 @@ class StorageServerTest extends Scope 'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'), ]; - $file = $this->client->call(Client::METHOD_POST, '/graphql/upload', \array_merge([ + $file = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); From d2bfe46fca5340b29e5407704e9d6bc010903fb6 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 30 May 2023 14:52:59 +1200 Subject: [PATCH 20/51] Set min length to 0 for default value when creating or updating a string attribute (cherry picked from commit c61e54f69b5b2b5259334d49c697dff416cbc9dc) --- app/controllers/api/databases.php | 6 ++-- .../e2e/Services/Databases/DatabasesBase.php | 32 +++++++++++++++---- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 8a18e28dba..ec8bbb2294 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1095,7 +1095,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->param('key', '', new Key(), 'Attribute Key.') ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Text(0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) + ->param('default', null, new Text(0, 0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) ->param('array', false, new Boolean(), 'Is attribute an array?', true) ->inject('response') ->inject('dbForProject') @@ -1104,7 +1104,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->action(function (string $databaseId, string $collectionId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, Event $events) { // Ensure attribute default is within required size - $validator = new Text($size); + $validator = new Text($size, 0); if (!is_null($default) && !$validator->isValid($default)) { throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); } @@ -1769,7 +1769,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin ->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 Text(0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.') + ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.') ->inject('response') ->inject('dbForProject') ->inject('events') diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 0648db849e..c511bf9902 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -157,6 +157,7 @@ trait DatabasesBase public function testCreateAttributes(array $data): array { $databaseId = $data['databaseId']; + $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -167,6 +168,17 @@ trait DatabasesBase 'required' => true, ]); + $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 256, + 'required' => false, + 'default' => '', + ]); + $releaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/attributes/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -226,6 +238,13 @@ trait DatabasesBase $this->assertEquals($title['body']['size'], 256); $this->assertEquals($title['body']['required'], true); + $this->assertEquals(202, $description['headers']['status-code']); + $this->assertEquals($description['body']['key'], 'description'); + $this->assertEquals($description['body']['type'], 'string'); + $this->assertEquals($description['body']['size'], 256); + $this->assertEquals($description['body']['required'], false); + $this->assertEquals($description['body']['default'], ''); + $this->assertEquals(202, $releaseYear['headers']['status-code']); $this->assertEquals($releaseYear['body']['key'], 'releaseYear'); $this->assertEquals($releaseYear['body']['type'], 'integer'); @@ -266,13 +285,14 @@ trait DatabasesBase ]), []); $this->assertIsArray($movies['body']['attributes']); - $this->assertCount(6, $movies['body']['attributes']); + $this->assertCount(7, $movies['body']['attributes']); $this->assertEquals($movies['body']['attributes'][0]['key'], $title['body']['key']); - $this->assertEquals($movies['body']['attributes'][1]['key'], $releaseYear['body']['key']); - $this->assertEquals($movies['body']['attributes'][2]['key'], $duration['body']['key']); - $this->assertEquals($movies['body']['attributes'][3]['key'], $actors['body']['key']); - $this->assertEquals($movies['body']['attributes'][4]['key'], $datetime['body']['key']); - $this->assertEquals($movies['body']['attributes'][5]['key'], $relationship['body']['key']); + $this->assertEquals($movies['body']['attributes'][1]['key'], $description['body']['key']); + $this->assertEquals($movies['body']['attributes'][2]['key'], $releaseYear['body']['key']); + $this->assertEquals($movies['body']['attributes'][3]['key'], $duration['body']['key']); + $this->assertEquals($movies['body']['attributes'][4]['key'], $actors['body']['key']); + $this->assertEquals($movies['body']['attributes'][5]['key'], $datetime['body']['key']); + $this->assertEquals($movies['body']['attributes'][6]['key'], $relationship['body']['key']); return $data; } From 225f21454cca8acbce0af6dd2084433fe2b0fdce Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 30 May 2023 19:44:13 +1200 Subject: [PATCH 21/51] Update changelog --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index b77ca2e3ce..857521fd2b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +# Version 1.3.5 + +## Bugs + +- Fix minimum length for string attribute default values [#5606](https://github.com/appwrite/appwrite/pull/5606) + # Version 1.3.4 ## Bugs From a3474f8a3b5165980f8bacec5bf5a79119f30e0a Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 30 May 2023 15:45:29 +0000 Subject: [PATCH 22/51] feat: prepare 1.3.5 release --- CHANGES.md | 1 + README-CN.md | 6 +-- README.md | 6 +-- app/init.php | 4 +- composer.lock | 79 ++++++++++++++-------------- src/Appwrite/Migration/Migration.php | 1 + 6 files changed, 50 insertions(+), 47 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 857521fd2b..8c6e7120b7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ ## Bugs - Fix minimum length for string attribute default values [#5606](https://github.com/appwrite/appwrite/pull/5606) +- Update framework to fix route mismatches [#5603](https://github.com/appwrite/appwrite/pull/5603) # Version 1.3.4 diff --git a/README-CN.md b/README-CN.md index 1463722084..1aa4b7011a 100644 --- a/README-CN.md +++ b/README-CN.md @@ -66,7 +66,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.3.4 + appwrite/appwrite:1.3.5 ``` ### Windows @@ -78,7 +78,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.3.4 + appwrite/appwrite:1.3.5 ``` #### PowerShell @@ -88,7 +88,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.3.4 + appwrite/appwrite:1.3.5 ``` 运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。 diff --git a/README.md b/README.md index 414c4bd0c3..bbaaba2311 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.3.4 + appwrite/appwrite:1.3.5 ``` ### Windows @@ -87,7 +87,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.3.4 + appwrite/appwrite:1.3.5 ``` #### PowerShell @@ -97,7 +97,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.3.4 + appwrite/appwrite:1.3.5 ``` Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation. diff --git a/app/init.php b/app/init.php index 2dd01d2134..d959cf24b5 100644 --- a/app/init.php +++ b/app/init.php @@ -100,8 +100,8 @@ const APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT = 60; // Default maximum write rate pe const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return in list API calls const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours -const APP_CACHE_BUSTER = 503; -const APP_VERSION_STABLE = '1.3.4'; +const APP_CACHE_BUSTER = 504; +const APP_VERSION_STABLE = '1.3.5'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; diff --git a/composer.lock b/composer.lock index 4368987f5c..c0a9e17f18 100644 --- a/composer.lock +++ b/composer.lock @@ -481,21 +481,21 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.5.1", + "version": "7.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9" + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b964ca597e86b752cd994f27293e9fa6b6a95ed9", - "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", + "guzzlehttp/promises": "^1.5.3 || ^2.0", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", @@ -507,7 +507,8 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, @@ -589,7 +590,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.5.1" + "source": "https://github.com/guzzle/guzzle/tree/7.7.0" }, "funding": [ { @@ -605,38 +606,37 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:30:08+00:00" + "time": "2023-05-21T14:04:53+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -673,7 +673,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.2" + "source": "https://github.com/guzzle/promises/tree/2.0.0" }, "funding": [ { @@ -689,7 +689,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:55:35+00:00" + "time": "2023-05-21T13:50:22+00:00" }, { "name": "guzzlehttp/psr7", @@ -3086,16 +3086,16 @@ }, { "name": "doctrine/deprecations", - "version": "v1.0.0", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + "reference": "8cffffb2218e01f3b370bf763e00e81697725259" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/8cffffb2218e01f3b370bf763e00e81697725259", + "reference": "8cffffb2218e01f3b370bf763e00e81697725259", "shasum": "" }, "require": { @@ -3123,9 +3123,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + "source": "https://github.com/doctrine/deprecations/tree/v1.1.0" }, - "time": "2022-05-02T15:47:09+00:00" + "time": "2023-05-29T18:55:17+00:00" }, { "name": "doctrine/instantiator", @@ -3382,16 +3382,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.4", + "version": "v4.15.5", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" + "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", "shasum": "" }, "require": { @@ -3432,9 +3432,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" }, - "time": "2023-03-05T19:49:14+00:00" + "time": "2023-05-19T20:20:00+00:00" }, { "name": "phar-io/manifest", @@ -3785,22 +3785,23 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.20.3", + "version": "1.21.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "6c04009f6cae6eda2f040745b6b846080ef069c2" + "reference": "b0c366dd2cea79407d635839d25423ba07c55dd6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6c04009f6cae6eda2f040745b6b846080ef069c2", - "reference": "6c04009f6cae6eda2f040745b6b846080ef069c2", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/b0c366dd2cea79407d635839d25423ba07c55dd6", + "reference": "b0c366dd2cea79407d635839d25423ba07c55dd6", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { + "nikic/php-parser": "^4.15", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.5", @@ -3824,9 +3825,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.3" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.21.3" }, - "time": "2023-04-25T09:01:03+00:00" + "time": "2023-05-29T19:31:28+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 397d41efdd..dd57e3e81d 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -60,6 +60,7 @@ abstract class Migration '1.3.2' => 'V18', '1.3.3' => 'V18', '1.3.4' => 'V18', + '1.3.5' => 'V18', ]; /** From 927c7c3359be984f5a210029a3429e9dc2528ed0 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 30 May 2023 16:16:43 +0000 Subject: [PATCH 23/51] feat: update composer --- composer.lock | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/composer.lock b/composer.lock index c0a9e17f18..3531381c10 100644 --- a/composer.lock +++ b/composer.lock @@ -522,9 +522,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "7.5-dev" } }, "autoload": { @@ -4550,16 +4547,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", "shasum": "" }, "require": { @@ -4604,7 +4601,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" }, "funding": [ { @@ -4612,7 +4609,7 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-05-07T05:35:17+00:00" }, { "name": "sebastian/environment", @@ -5579,16 +5576,16 @@ }, { "name": "twig/twig", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "a6e0510cc793912b451fd40ab983a1d28f611c15" + "reference": "106c170d08e8415d78be2d16c3d057d0d108262b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/a6e0510cc793912b451fd40ab983a1d28f611c15", - "reference": "a6e0510cc793912b451fd40ab983a1d28f611c15", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/106c170d08e8415d78be2d16c3d057d0d108262b", + "reference": "106c170d08e8415d78be2d16c3d057d0d108262b", "shasum": "" }, "require": { @@ -5597,15 +5594,10 @@ "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { - "psr/container": "^1.0", + "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.5-dev" - } - }, "autoload": { "psr-4": { "Twig\\": "src/" @@ -5639,7 +5631,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.5.1" + "source": "https://github.com/twigphp/Twig/tree/v3.6.0" }, "funding": [ { @@ -5651,7 +5643,7 @@ "type": "tidelift" } ], - "time": "2023-02-08T07:49:20+00:00" + "time": "2023-05-03T19:06:57+00:00" } ], "aliases": [], From 9e1313d15ae0a61f5258ac35e474fbbf406044f9 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 30 May 2023 16:59:13 +0000 Subject: [PATCH 24/51] feat: update dependencies --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index f5e4a402a9..c53fcd972f 100644 --- a/composer.lock +++ b/composer.lock @@ -481,16 +481,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.6.1", + "version": "7.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "8444a2bacf1960bc6a2b62ed86b8e72e11eebe51" + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8444a2bacf1960bc6a2b62ed86b8e72e11eebe51", - "reference": "8444a2bacf1960bc6a2b62ed86b8e72e11eebe51", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", "shasum": "" }, "require": { @@ -587,7 +587,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.6.1" + "source": "https://github.com/guzzle/guzzle/tree/7.7.0" }, "funding": [ { @@ -603,7 +603,7 @@ "type": "tidelift" } ], - "time": "2023-05-15T20:43:01+00:00" + "time": "2023-05-21T14:04:53+00:00" }, { "name": "guzzlehttp/promises", @@ -3782,16 +3782,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.20.4", + "version": "1.21.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd" + "reference": "b0c366dd2cea79407d635839d25423ba07c55dd6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", - "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/b0c366dd2cea79407d635839d25423ba07c55dd6", + "reference": "b0c366dd2cea79407d635839d25423ba07c55dd6", "shasum": "" }, "require": { @@ -3822,9 +3822,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.4" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.21.3" }, - "time": "2023-05-02T09:19:37+00:00" + "time": "2023-05-29T19:31:28+00:00" }, { "name": "phpunit/php-code-coverage", From a6643635251152840387337396bb6bdc904617a8 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 2 Jun 2023 12:58:31 +0200 Subject: [PATCH 25/51] fix: trailing wildcards --- app/controllers/general.php | 2 +- app/controllers/web/console.php | 2 +- composer.lock | 51 +++++++++++++++++---------------- tests/e2e/General/HTTPTest.php | 5 ++-- 4 files changed, 31 insertions(+), 29 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 00d5c6347f..1982ea0d7f 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -584,7 +584,7 @@ App::get('/humans.txt') $response->text($template->render(false)); }); -App::get('/.well-known/acme-challenge') +App::get('/.well-known/acme-challenge/*') ->desc('SSL Verification') ->label('scope', 'public') ->label('docs', false) diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php index 8115f09285..fa4f76a9d0 100644 --- a/app/controllers/web/console.php +++ b/app/controllers/web/console.php @@ -3,7 +3,7 @@ use Appwrite\Utopia\Response; use Utopia\App; -App::get('/console') +App::get('/console/*') ->alias('/') ->alias('/invite') ->alias('/login') diff --git a/composer.lock b/composer.lock index 3531381c10..99273a9386 100644 --- a/composer.lock +++ b/composer.lock @@ -1652,16 +1652,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.1", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", - "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { @@ -1670,7 +1670,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -1699,7 +1699,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" }, "funding": [ { @@ -1715,7 +1715,7 @@ "type": "tidelift" } ], - "time": "2023-03-01T10:25:55+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/polyfill-php80", @@ -2218,16 +2218,16 @@ }, { "name": "utopia-php/framework", - "version": "0.28.2", + "version": "0.28.3", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "bc0144ff3983afa6724c43f2ce578fdbceec21f9" + "reference": "9b6171eeb99a2f0a550f51526d583e012dfac4e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/bc0144ff3983afa6724c43f2ce578fdbceec21f9", - "reference": "bc0144ff3983afa6724c43f2ce578fdbceec21f9", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/9b6171eeb99a2f0a550f51526d583e012dfac4e9", + "reference": "9b6171eeb99a2f0a550f51526d583e012dfac4e9", "shasum": "" }, "require": { @@ -2257,9 +2257,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.28.2" + "source": "https://github.com/utopia-php/framework/tree/0.28.3" }, - "time": "2023-05-30T06:47:57+00:00" + "time": "2023-06-02T10:57:17+00:00" }, { "name": "utopia-php/image", @@ -3656,16 +3656,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.1", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "dfc078e8af9c99210337325ff5aa152872c98714" + "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/dfc078e8af9c99210337325ff5aa152872c98714", - "reference": "dfc078e8af9c99210337325ff5aa152872c98714", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d", + "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d", "shasum": "" }, "require": { @@ -3708,9 +3708,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.7.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2" }, - "time": "2023-03-27T19:02:04+00:00" + "time": "2023-05-30T18:13:47+00:00" }, { "name": "phpspec/prophecy", @@ -3782,22 +3782,23 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.21.3", + "version": "1.22.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "b0c366dd2cea79407d635839d25423ba07c55dd6" + "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/b0c366dd2cea79407d635839d25423ba07c55dd6", - "reference": "b0c366dd2cea79407d635839d25423ba07c55dd6", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", + "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { + "doctrine/annotations": "^2.0", "nikic/php-parser": "^4.15", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", @@ -3822,9 +3823,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.21.3" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.0" }, - "time": "2023-05-29T19:31:28+00:00" + "time": "2023-06-01T12:35:21+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/tests/e2e/General/HTTPTest.php b/tests/e2e/General/HTTPTest.php index 09a7048eef..608afdccd3 100644 --- a/tests/e2e/General/HTTPTest.php +++ b/tests/e2e/General/HTTPTest.php @@ -77,8 +77,8 @@ class HTTPTest extends Scope 'origin' => 'http://localhost', ])); - $this->assertEquals(404, $response['headers']['status-code']); // 'Unknown path', but validation passed + $this->assertEquals(404, $response['headers']['status-code']); /** * Test for FAILURE @@ -87,7 +87,8 @@ class HTTPTest extends Scope 'origin' => 'http://localhost', ])); - $this->assertEquals(404, $response['headers']['status-code']); + // Check for too many path segments + $this->assertEquals(400, $response['headers']['status-code']); // Cleanup $this->client->setEndpoint($previousEndpoint); From 21b41c475dde1e768ea3df15bafa6cdedf1b2d30 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 2 Jun 2023 14:26:51 +0200 Subject: [PATCH 26/51] chore: prepre 1.3.6 --- CHANGES.md | 7 +++++++ README-CN.md | 6 +++--- README.md | 6 +++--- app/init.php | 4 ++-- docker-compose.yml | 18 +++++++++--------- src/Appwrite/Migration/Migration.php | 1 + 6 files changed, 25 insertions(+), 17 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8c6e7120b7..d1fe64df33 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +# Version 1.3.6 + +## Bugs + +- Fix Console deep linking to result in a 404 [#5632](https://github.com/appwrite/appwrite/pull/5632) +- Fix ACME HTTP Challenge [#5632](https://github.com/appwrite/appwrite/pull/5632) + # Version 1.3.5 ## Bugs diff --git a/README-CN.md b/README-CN.md index 1aa4b7011a..bf0a73adaf 100644 --- a/README-CN.md +++ b/README-CN.md @@ -66,7 +66,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.3.5 + appwrite/appwrite:1.3.6 ``` ### Windows @@ -78,7 +78,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.3.5 + appwrite/appwrite:1.3.6 ``` #### PowerShell @@ -88,7 +88,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.3.5 + appwrite/appwrite:1.3.6 ``` 运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。 diff --git a/README.md b/README.md index bbaaba2311..45caeaa564 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.3.5 + appwrite/appwrite:1.3.6 ``` ### Windows @@ -87,7 +87,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.3.5 + appwrite/appwrite:1.3.6 ``` #### PowerShell @@ -97,7 +97,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.3.5 + appwrite/appwrite:1.3.6 ``` Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation. diff --git a/app/init.php b/app/init.php index d959cf24b5..5eb7f67aa3 100644 --- a/app/init.php +++ b/app/init.php @@ -100,8 +100,8 @@ const APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT = 60; // Default maximum write rate pe const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return in list API calls const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours -const APP_CACHE_BUSTER = 504; -const APP_VERSION_STABLE = '1.3.5'; +const APP_CACHE_BUSTER = 505; +const APP_VERSION_STABLE = '1.3.6'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; diff --git a/docker-compose.yml b/docker-compose.yml index ecb10b9eea..b028bd8544 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -773,15 +773,15 @@ services: networks: - appwrite - # redis-commander: - # image: rediscommander/redis-commander:latest - # restart: unless-stopped - # networks: - # - appwrite - # environment: - # - REDIS_HOSTS=redis - # ports: - # - "8081:8081" + redis-commander: + image: rediscommander/redis-commander:latest + restart: unless-stopped + networks: + - appwrite + environment: + - REDIS_HOSTS=redis + ports: + - "8081:8081" # resque: # image: appwrite/resque-web:1.1.0 diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index dd57e3e81d..b205fdc55a 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -61,6 +61,7 @@ abstract class Migration '1.3.3' => 'V18', '1.3.4' => 'V18', '1.3.5' => 'V18', + '1.3.6' => 'V18', ]; /** From 92cda20448087e9804540dd282325e99ea3186a0 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 2 Jun 2023 14:29:44 +0200 Subject: [PATCH 27/51] chore: revert docker compose changes --- docker-compose.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b028bd8544..ecb10b9eea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -773,15 +773,15 @@ services: networks: - appwrite - redis-commander: - image: rediscommander/redis-commander:latest - restart: unless-stopped - networks: - - appwrite - environment: - - REDIS_HOSTS=redis - ports: - - "8081:8081" + # redis-commander: + # image: rediscommander/redis-commander:latest + # restart: unless-stopped + # networks: + # - appwrite + # environment: + # - REDIS_HOSTS=redis + # ports: + # - "8081:8081" # resque: # image: appwrite/resque-web:1.1.0 From bd6b0dcc431ea8002d667ffe5e9740359afc6b54 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Fri, 2 Jun 2023 14:22:28 -0700 Subject: [PATCH 28/51] Fix the routing for the default OAuth2 pages --- app/controllers/web/console.php | 3 ++- tests/e2e/General/HTTPTest.php | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php index fa4f76a9d0..59aad607c1 100644 --- a/app/controllers/web/console.php +++ b/app/controllers/web/console.php @@ -5,10 +5,11 @@ use Utopia\App; App::get('/console/*') ->alias('/') + ->alias('auth/*') ->alias('/invite') ->alias('/login') ->alias('/recover') - ->alias('/register') + ->alias('/register/*') ->groups(['web']) ->label('permission', 'public') ->label('scope', 'home') diff --git a/tests/e2e/General/HTTPTest.php b/tests/e2e/General/HTTPTest.php index 608afdccd3..087b984f9d 100644 --- a/tests/e2e/General/HTTPTest.php +++ b/tests/e2e/General/HTTPTest.php @@ -160,4 +160,15 @@ class HTTPTest extends Scope $this->assertIsString($body['server-ruby']); $this->assertIsString($body['console-cli']); } + + public function testDefaultOAuth2() + { + $response = $this->client->call(Client::METHOD_GET, '/auth/oauth2/success', $this->getHeaders()); + + $this->assertEquals(200, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_GET, '/auth/oauth2/failure', $this->getHeaders()); + + $this->assertEquals(200, $response['headers']['status-code']); + } } From 092f0cfcaf6ef733cf6de579f4997b59ebcf6802 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Fri, 2 Jun 2023 14:22:28 -0700 Subject: [PATCH 29/51] Fix the routing for the default OAuth2 pages --- app/controllers/web/console.php | 3 ++- tests/e2e/General/HTTPTest.php | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php index fa4f76a9d0..59aad607c1 100644 --- a/app/controllers/web/console.php +++ b/app/controllers/web/console.php @@ -5,10 +5,11 @@ use Utopia\App; App::get('/console/*') ->alias('/') + ->alias('auth/*') ->alias('/invite') ->alias('/login') ->alias('/recover') - ->alias('/register') + ->alias('/register/*') ->groups(['web']) ->label('permission', 'public') ->label('scope', 'home') diff --git a/tests/e2e/General/HTTPTest.php b/tests/e2e/General/HTTPTest.php index 608afdccd3..087b984f9d 100644 --- a/tests/e2e/General/HTTPTest.php +++ b/tests/e2e/General/HTTPTest.php @@ -160,4 +160,15 @@ class HTTPTest extends Scope $this->assertIsString($body['server-ruby']); $this->assertIsString($body['console-cli']); } + + public function testDefaultOAuth2() + { + $response = $this->client->call(Client::METHOD_GET, '/auth/oauth2/success', $this->getHeaders()); + + $this->assertEquals(200, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_GET, '/auth/oauth2/failure', $this->getHeaders()); + + $this->assertEquals(200, $response['headers']['status-code']); + } } From 8b01c61de3fbfe058a8da36f280c7e81041303a5 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 3 Jun 2023 19:33:51 +0530 Subject: [PATCH 30/51] chore: update utopia-php/framework --- .github/workflows/build-cloud.yml | 53 +++++++++++++++++++++++++++++++ app/console | 2 +- composer.lock | 34 +++++++++++--------- 3 files changed, 73 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/build-cloud.yml diff --git a/.github/workflows/build-cloud.yml b/.github/workflows/build-cloud.yml new file mode 100644 index 0000000000..f4158a3180 --- /dev/null +++ b/.github/workflows/build-cloud.yml @@ -0,0 +1,53 @@ +name: "Release" + +on: + release: + types: [published] + +jobs: + tests: + name: Release + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + # Fetch submodules + submodules: recursive + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: appwrite/appwrite + tags: | + type=semver,pattern={{major}}.{{minor}}.{{patch}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64,linux/arm64 + build-args: | + VERSION=${{ steps.meta.outputs.version }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/app/console b/app/console index 9174d8f8cb..b981302dee 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit 9174d8f8cb584744dd7a53f69d324f490ee82ee3 +Subproject commit b981302dee30eab33e155af79f0088822b29a2b6 diff --git a/composer.lock b/composer.lock index 99273a9386..f9afb562f7 100644 --- a/composer.lock +++ b/composer.lock @@ -2218,16 +2218,16 @@ }, { "name": "utopia-php/framework", - "version": "0.28.3", + "version": "0.26.3", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "9b6171eeb99a2f0a550f51526d583e012dfac4e9" + "reference": "7a18a2b0d6c8dba878c926b73650fd2c4eeaa70d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/9b6171eeb99a2f0a550f51526d583e012dfac4e9", - "reference": "9b6171eeb99a2f0a550f51526d583e012dfac4e9", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/7a18a2b0d6c8dba878c926b73650fd2c4eeaa70d", + "reference": "7a18a2b0d6c8dba878c926b73650fd2c4eeaa70d", "shasum": "" }, "require": { @@ -2257,9 +2257,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.28.3" + "source": "https://github.com/utopia-php/framework/tree/0.26.3" }, - "time": "2023-06-02T10:57:17+00:00" + "time": "2023-06-03T14:01:15+00:00" }, { "name": "utopia-php/image", @@ -3083,25 +3083,29 @@ }, { "name": "doctrine/deprecations", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "8cffffb2218e01f3b370bf763e00e81697725259" + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/8cffffb2218e01f3b370bf763e00e81697725259", - "reference": "8cffffb2218e01f3b370bf763e00e81697725259", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -3120,9 +3124,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.1.0" + "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" }, - "time": "2023-05-29T18:55:17+00:00" + "time": "2023-06-03T09:27:29+00:00" }, { "name": "doctrine/instantiator", From 9dee8346370fc758198e9d287bdd87315667c519 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 3 Jun 2023 19:34:49 +0530 Subject: [PATCH 31/51] chore: remove unrelated files --- .github/workflows/build-cloud.yml | 53 ------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 .github/workflows/build-cloud.yml diff --git a/.github/workflows/build-cloud.yml b/.github/workflows/build-cloud.yml deleted file mode 100644 index f4158a3180..0000000000 --- a/.github/workflows/build-cloud.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: "Release" - -on: - release: - types: [published] - -jobs: - tests: - name: Release - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - # Fetch submodules - submodules: recursive - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 - with: - images: appwrite/appwrite - tags: | - type=semver,pattern={{major}}.{{minor}}.{{patch}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: . - platforms: linux/amd64,linux/arm64 - build-args: | - VERSION=${{ steps.meta.outputs.version }} - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From 329b6b93bfe3ce1d6356ccde06c824e97361b53e Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 3 Jun 2023 20:11:01 +0530 Subject: [PATCH 32/51] chore: update changelog --- CHANGES.md | 9 +++++++++ README-CN.md | 6 +++--- README.md | 6 +++--- app/init.php | 4 ++-- src/Appwrite/Migration/Migration.php | 1 + 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d1fe64df33..990f19db15 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,12 @@ +# Version 1.3.7 + +- Fix the routing for the default OAuth2 pages [#5640](https://github.com/appwrite/appwrite/pull/5640) [#5648](https://github.com/appwrite/appwrite/pull/5648) +- Add support for trailing slashes in Routes and URLs [#5647](https://github.com/appwrite/appwrite/pull/5647) [#5648](https://github.com/appwrite/appwrite/pull/5648) +## Bugs + +- Fix Console deep linking to result in a 404 [#5632](https://github.com/appwrite/appwrite/pull/5632) +- Fix ACME HTTP Challenge [#5632](https://github.com/appwrite/appwrite/pull/5632) + # Version 1.3.6 ## Bugs diff --git a/README-CN.md b/README-CN.md index bf0a73adaf..d3f52058b5 100644 --- a/README-CN.md +++ b/README-CN.md @@ -66,7 +66,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.3.6 + appwrite/appwrite:1.3.7 ``` ### Windows @@ -78,7 +78,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.3.6 + appwrite/appwrite:1.3.7 ``` #### PowerShell @@ -88,7 +88,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.3.6 + appwrite/appwrite:1.3.7 ``` 运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。 diff --git a/README.md b/README.md index 45caeaa564..b8fffd110a 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.3.6 + appwrite/appwrite:1.3.7 ``` ### Windows @@ -87,7 +87,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.3.6 + appwrite/appwrite:1.3.7 ``` #### PowerShell @@ -97,7 +97,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.3.6 + appwrite/appwrite:1.3.7 ``` Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation. diff --git a/app/init.php b/app/init.php index 5eb7f67aa3..0b6efe52c0 100644 --- a/app/init.php +++ b/app/init.php @@ -100,8 +100,8 @@ const APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT = 60; // Default maximum write rate pe const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return in list API calls const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours -const APP_CACHE_BUSTER = 505; -const APP_VERSION_STABLE = '1.3.6'; +const APP_CACHE_BUSTER = 506; +const APP_VERSION_STABLE = '1.3.7'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index b205fdc55a..7a1f3cad24 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -62,6 +62,7 @@ abstract class Migration '1.3.4' => 'V18', '1.3.5' => 'V18', '1.3.6' => 'V18', + '1.3.7' => 'V18', ]; /** From 9dcf164b2fbae7a23b02e46fe6f5b9f3bd776cdb Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 3 Jun 2023 20:14:11 +0530 Subject: [PATCH 33/51] chore: update composer --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index f9afb562f7..a261c416e7 100644 --- a/composer.lock +++ b/composer.lock @@ -2218,16 +2218,16 @@ }, { "name": "utopia-php/framework", - "version": "0.26.3", + "version": "0.28.4", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "7a18a2b0d6c8dba878c926b73650fd2c4eeaa70d" + "reference": "98c5469efe195aeecc63745dbf8e2f357f8cedac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/7a18a2b0d6c8dba878c926b73650fd2c4eeaa70d", - "reference": "7a18a2b0d6c8dba878c926b73650fd2c4eeaa70d", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/98c5469efe195aeecc63745dbf8e2f357f8cedac", + "reference": "98c5469efe195aeecc63745dbf8e2f357f8cedac", "shasum": "" }, "require": { @@ -2257,9 +2257,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.26.3" + "source": "https://github.com/utopia-php/framework/tree/0.28.4" }, - "time": "2023-06-03T14:01:15+00:00" + "time": "2023-06-03T14:09:22+00:00" }, { "name": "utopia-php/image", From a68f0826e78b2c543177f50009b2112bb5a5a0f1 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 3 Jun 2023 20:14:44 +0530 Subject: [PATCH 34/51] chore: update changelog --- CHANGES.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 990f19db15..abe1dacac1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,11 +1,8 @@ # Version 1.3.7 +## Bugs - Fix the routing for the default OAuth2 pages [#5640](https://github.com/appwrite/appwrite/pull/5640) [#5648](https://github.com/appwrite/appwrite/pull/5648) - Add support for trailing slashes in Routes and URLs [#5647](https://github.com/appwrite/appwrite/pull/5647) [#5648](https://github.com/appwrite/appwrite/pull/5648) -## Bugs - -- Fix Console deep linking to result in a 404 [#5632](https://github.com/appwrite/appwrite/pull/5632) -- Fix ACME HTTP Challenge [#5632](https://github.com/appwrite/appwrite/pull/5632) # Version 1.3.6 From 596998000b76407aaaced89a5ca72341839b7039 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 3 Jun 2023 20:15:40 +0530 Subject: [PATCH 35/51] chore: update console --- app/console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/console b/app/console index b981302dee..9174d8f8cb 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit b981302dee30eab33e155af79f0088822b29a2b6 +Subproject commit 9174d8f8cb584744dd7a53f69d324f490ee82ee3 From f7f14695f0943b101280d3f880348b74307d1060 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Fri, 2 Jun 2023 16:22:54 -0700 Subject: [PATCH 36/51] Don't default to console project Defaulting to the console project leads to misleading error messages. For example, you can get a CORS error saying you haven't configured a platform yet, but the actual error is missing project ID. --- app/controllers/general.php | 1 + app/init.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 1982ea0d7f..741b9f4111 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -41,6 +41,7 @@ Config::setParam('cookieDomain', 'localhost'); Config::setParam('cookieSamesite', Response::COOKIE_SAMESITE_NONE); App::init() + ->groups(['api']) ->inject('utopia') ->inject('request') ->inject('response') diff --git a/app/init.php b/app/init.php index 0b6efe52c0..fc7541513d 100644 --- a/app/init.php +++ b/app/init.php @@ -903,7 +903,7 @@ App::setResource('project', function ($dbForConsole, $request, $console) { /** @var Utopia\Database\Database $dbForConsole */ /** @var Utopia\Database\Document $console */ - $projectId = $request->getParam('project', $request->getHeader('x-appwrite-project', 'console')); + $projectId = $request->getParam('project', $request->getHeader('x-appwrite-project', '')); if ($projectId === 'console') { return $console; From b7f4f575219a5b9ccd2d09da89e07fe6a61a87c6 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 7 Jun 2023 13:51:24 +1200 Subject: [PATCH 37/51] Add new error message to differentiate between missing data and missing data + permissions for document updates --- app/config/errors.php | 7 ++++++- app/controllers/api/databases.php | 2 +- src/Appwrite/Extend/Exception.php | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index 9fadde6e93..450ea08141 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -403,9 +403,14 @@ return [ 'description' => 'The document structure is invalid. Please ensure the attributes match the collection definition.', 'code' => 400, ], + Exception::DOCUMENT_MISSING_DATA => [ + 'name' => Exception::DOCUMENT_MISSING_DATA, + 'description' => 'The document data is missing.', + 'code' => 400, + ], Exception::DOCUMENT_MISSING_PAYLOAD => [ 'name' => Exception::DOCUMENT_MISSING_PAYLOAD, - 'description' => 'The document payload is missing.', + 'description' => 'The document data or permissions must be provided.', 'code' => 400, ], Exception::DOCUMENT_ALREADY_EXISTS => [ diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index c4ff448ce4..a4de380561 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2653,7 +2653,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array if (empty($data)) { - throw new Exception(Exception::DOCUMENT_MISSING_PAYLOAD); + throw new Exception(Exception::DOCUMENT_MISSING_DATA); } if (isset($data['$id'])) { diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index ebd12851e2..7ed022b452 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -134,6 +134,7 @@ class Exception extends \Exception /** Documents */ public const DOCUMENT_NOT_FOUND = 'document_not_found'; public const DOCUMENT_INVALID_STRUCTURE = 'document_invalid_structure'; + public const DOCUMENT_MISSING_DATA = 'document_missing_data'; public const DOCUMENT_MISSING_PAYLOAD = 'document_missing_payload'; public const DOCUMENT_ALREADY_EXISTS = 'document_already_exists'; public const DOCUMENT_UPDATE_CONFLICT = 'document_update_conflict'; From ed2c1139a788608516ab08827addaadd95bd57ff Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 9 Jun 2023 13:03:19 +1200 Subject: [PATCH 38/51] Update messages --- app/config/errors.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index 450ea08141..2983d22cd8 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -405,12 +405,12 @@ return [ ], Exception::DOCUMENT_MISSING_DATA => [ 'name' => Exception::DOCUMENT_MISSING_DATA, - 'description' => 'The document data is missing.', + 'description' => 'The document data is missing. You must provide the document data.', 'code' => 400, ], Exception::DOCUMENT_MISSING_PAYLOAD => [ 'name' => Exception::DOCUMENT_MISSING_PAYLOAD, - 'description' => 'The document data or permissions must be provided.', + 'description' => 'The document data and permissions are missing. You must provide either the document data or permissions to be updated.', 'code' => 400, ], Exception::DOCUMENT_ALREADY_EXISTS => [ From 7e8f6f748a955ad789f00e91fd0a88861aed5955 Mon Sep 17 00:00:00 2001 From: faisalill Date: Sat, 17 Jun 2023 00:20:37 +0530 Subject: [PATCH 39/51] fixed incorrect audity activity on document create --- 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 a4de380561..418c36cc86 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2623,7 +2623,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].create') ->label('scope', 'documents.write') ->label('audits.event', 'document.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{response.$id}') ->label('usage.metric', 'documents.{scope}.requests.create') ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') From b3915fb1974c3ac08bdb98ecf6deb60138a2e699 Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Fri, 7 Jul 2023 18:27:44 +0530 Subject: [PATCH 40/51] Update getting started examples --- docs/sdks/dotnet/GETTING_STARTED.md | 55 +++++++++++++++-------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/docs/sdks/dotnet/GETTING_STARTED.md b/docs/sdks/dotnet/GETTING_STARTED.md index 23bab6f70a..5739fac371 100644 --- a/docs/sdks/dotnet/GETTING_STARTED.md +++ b/docs/sdks/dotnet/GETTING_STARTED.md @@ -1,44 +1,47 @@ ## Getting Started ### Initialize & Make API Request -Once you add the dependencies, its extremely easy to get started with the SDK; All you need to do is import the package in your code, set your Appwrite credentials, and start making API calls. Below is a simple example: +Once you have installed the package, it is extremely easy to get started with the SDK; all you need to do is import the package in your code, set your Appwrite credentials, and start making API calls. Below is a simple example: ```csharp using Appwrite; +using Appwrite.Services; +using Appwrite.Models; -static async Task Main(string[] args) -{ - var client = Client(); +var client = new Client() + .SetEndpoint("http://cloud.appwrite.io/v1") // Make sure your endpoint is accessible + .SetProject("5ff3379a01d25") // Your project ID + .SetKey("cd868db89") // Your secret API key + .SetSelfSigned(); // Use only on dev mode with a self-signed SSL cert - client - .setEndpoint('http://[HOSTNAME_OR_IP]/v1') // Make sure your endpoint is accessible - .setProject('5ff3379a01d25') // Your project ID - .setKey('cd868c7af8bdc893b4...93b7535db89') - .setSelfSigned() // Use only on dev mode with a self-signed SSL cert - ; +var users = new Users(client); - var users = Users(client); +var user = await users.Create( + userId: ID.Unique(), + email: "email@example.com", + password: "password", + name: "name"); - try { - var user = await users.Create(ID.Unique(), 'email@example.com', 'password', 'name'); - Console.WriteLine(user.ToMap()); - } catch (AppwriteException e) { - Console.WriteLine(e.Message); - } -} +Console.WriteLine(user.ToMap()); ``` ### Error Handling -The Appwrite .NET SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example. +The Appwrite .NET SDK raises an `AppwriteException` object with `message`, `code`, and `response` properties. You can handle any errors by catching `AppwriteException` and presenting the `message` to the user or handling it yourself based on the provided error information. Below is an example. ```csharp -var users = Users(client); +var users = new Users(client); -try { - var user = await users.Create(ID.Unique(), 'email@example.com', 'password', 'name'); - Console.WriteLine(user.ToMap()); -} catch (AppwriteException e) { - Console.WriteLine(e.Message); +try +{ + var user = await users.Create( + userId: ID.Unique(), + email: "email@example.com", + password: "password", + name: "name"); +} +catch (AppwriteException e) +{ + Console.WriteLine(e.Message); } ``` @@ -47,4 +50,4 @@ You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) -- 🚂 [Appwrite Dart Playground](https://github.com/appwrite/playground-for-dotnet) +- 🚂 [Appwrite .NET Playground](https://github.com/appwrite/playground-for-dotnet) From c617f0e07939bd5411b7c158115bebca3afa7aaf Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Fri, 7 Jul 2023 20:04:01 +0530 Subject: [PATCH 41/51] Remove unnecessary code --- docs/sdks/dotnet/GETTING_STARTED.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/sdks/dotnet/GETTING_STARTED.md b/docs/sdks/dotnet/GETTING_STARTED.md index 5739fac371..08d7742dd0 100644 --- a/docs/sdks/dotnet/GETTING_STARTED.md +++ b/docs/sdks/dotnet/GETTING_STARTED.md @@ -9,10 +9,9 @@ using Appwrite.Services; using Appwrite.Models; var client = new Client() - .SetEndpoint("http://cloud.appwrite.io/v1") // Make sure your endpoint is accessible + .SetEndpoint("http://cloud.appwrite.io/v1") .SetProject("5ff3379a01d25") // Your project ID - .SetKey("cd868db89") // Your secret API key - .SetSelfSigned(); // Use only on dev mode with a self-signed SSL cert + .SetKey("cd868db89"); // Your secret API key var users = new Users(client); From f24cf729c3b37dc6e2241a99bd9545ff13713ef4 Mon Sep 17 00:00:00 2001 From: Prateek Banga Date: Fri, 7 Jul 2023 23:50:06 +0530 Subject: [PATCH 42/51] fixed relationship update bug in two way type --- app/controllers/api/databases.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 418c36cc86..4459322baf 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -327,22 +327,22 @@ function updateAttribute( } if ($type === Database::VAR_RELATIONSHIP) { - $options = \array_merge($attribute->getAttribute('options', []), $options); - $attribute->setAttribute('options', $options); + $primaryDocumentOptions = \array_merge($attribute->getAttribute('options', []), $options); + $attribute->setAttribute('options', $primaryDocumentOptions); $dbForProject->updateRelationship( collection: $collectionId, id: $key, - onDelete: $options['onDelete'], + onDelete: $primaryDocumentOptions['onDelete'], ); - if ($options['twoWay']) { - $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection']); - $relatedAttribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $options['twoWayKey']); + if ($primaryDocumentOptions['twoWay']) { + $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryDocumentOptions['relatedCollection']); + + $relatedAttribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey']); $relatedOptions = \array_merge($relatedAttribute->getAttribute('options'), $options); $relatedAttribute->setAttribute('options', $relatedOptions); - - $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $options['twoWayKey'], $relatedAttribute); + $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey'], $relatedAttribute); $dbForProject->deleteCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId()); } } else { From a7dd5f617d58ac56cd4f8acf7b66196dc034cae4 Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Sat, 8 Jul 2023 00:59:57 +0530 Subject: [PATCH 43/51] Update .NET SDK version --- app/config/platforms.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index caff21b28b..2338326e1a 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -357,12 +357,12 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '2.0.0', + 'version' => '0.4.1', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', - 'enabled' => false, + 'enabled' => true, 'beta' => true, - 'dev' => true, + 'dev' => false, 'hidden' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'csharp', From 4542ec34aec1b3b2eac22093464252fd7982c40e Mon Sep 17 00:00:00 2001 From: Prateek Banga Date: Sat, 8 Jul 2023 01:28:24 +0530 Subject: [PATCH 44/51] added test case to verify update of two way relationship --- .../Databases/DatabasesCustomClientTest.php | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index de59723e53..8f5e5161d4 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -225,4 +225,95 @@ class DatabasesCustomClientTest extends Scope return []; } + + public function testUpdateTwoWayRelationship(): void + { + + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database' + ]); + + $databaseId = $database['body']['$id']; + + + //creating collection 1 + $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'level1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + //creating collection 2 + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'level2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + \sleep(2); + + //creating two way relationship between collection 1 and collection 2 from collection 1 + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'] . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection2['body']['$id'], + 'type' => 'oneToMany', + 'twoWay' => true, + 'onDelete' => 'cascade', + 'key' => $collection2['body']['$id'], + 'twoWayKey' => $collection1['body']['$id'] + ]); + + \sleep(3); + + //update relation from collection 2 to on delete restrict + $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection2['body']['$id'] . '/attributes/' . $collection1['body']['$id'] . '/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'onDelete' => 'restrict', + ]); + + //fetching attributes after updating relation to compare + $collection1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'], [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; + + $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); + $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); + $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); + $this->assertEquals('restrict', $collection1RelationAttribute['onDelete']); + } } From a98248478f72515ba535ddc392913964aa168e3c Mon Sep 17 00:00:00 2001 From: Prateek Banga Date: Sat, 8 Jul 2023 01:31:20 +0530 Subject: [PATCH 45/51] lint issues --- tests/e2e/Services/Databases/DatabasesCustomClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index 8f5e5161d4..9b0c337bc7 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -302,7 +302,7 @@ class DatabasesCustomClientTest extends Scope 'onDelete' => 'restrict', ]); - //fetching attributes after updating relation to compare + //fetching attributes after updating relation to compare $collection1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'], [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], From a8bc9e61548c2eadabc9d2b1a2746c9018e0c3ef Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Fri, 7 Jul 2023 20:02:51 +0000 Subject: [PATCH 46/51] Update sdk-generator version --- composer.json | 2 +- composer.lock | 77 +++++++++++++++++++++++++-------------------------- 2 files changed, 39 insertions(+), 40 deletions(-) diff --git a/composer.json b/composer.json index 78f960d3d1..0ba26540bd 100644 --- a/composer.json +++ b/composer.json @@ -79,7 +79,7 @@ } ], "require-dev": { - "appwrite/sdk-generator": "0.32.*", + "appwrite/sdk-generator": "0.33.*", "ext-fileinfo": "*", "phpunit/phpunit": "9.5.20", "squizlabs/php_codesniffer": "^3.6", diff --git a/composer.lock b/composer.lock index a261c416e7..017b9ec900 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": "169ab6e7dd540e45309d3c5093506fad", + "content-hash": "3eadbfe5543aafdf8682ea0465159e3c", "packages": [ { "name": "adhocore/jwt", @@ -2964,16 +2964,16 @@ }, { "name": "webonyx/graphql-php", - "version": "v14.11.9", + "version": "v14.11.10", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70" + "reference": "d9c2fdebc6aa01d831bc2969da00e8588cffef19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/ff91c9f3cf241db702e30b2c42bcc0920e70ac70", - "reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/d9c2fdebc6aa01d831bc2969da00e8588cffef19", + "reference": "d9c2fdebc6aa01d831bc2969da00e8588cffef19", "shasum": "" }, "require": { @@ -2993,8 +2993,7 @@ "phpunit/phpunit": "^7.2 || ^8.5", "psr/http-message": "^1.0", "react/promise": "2.*", - "simpod/php-coveralls-mirror": "^3.0", - "squizlabs/php_codesniffer": "3.5.4" + "simpod/php-coveralls-mirror": "^3.0" }, "suggest": { "psr/http-message": "To use standard GraphQL server", @@ -3018,7 +3017,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v14.11.9" + "source": "https://github.com/webonyx/graphql-php/tree/v14.11.10" }, "funding": [ { @@ -3026,22 +3025,22 @@ "type": "open_collective" } ], - "time": "2023-01-06T12:12:50+00:00" + "time": "2023-07-05T14:23:37+00:00" } ], "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.32.3", + "version": "0.33.5", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "4057e14a61335070034b1cbdce9e39bef94d997d" + "reference": "4e9dc898f8b52b1057abe1295c2ae44ca0501633" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4057e14a61335070034b1cbdce9e39bef94d997d", - "reference": "4057e14a61335070034b1cbdce9e39bef94d997d", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4e9dc898f8b52b1057abe1295c2ae44ca0501633", + "reference": "4e9dc898f8b52b1057abe1295c2ae44ca0501633", "shasum": "" }, "require": { @@ -3077,9 +3076,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.32.3" + "source": "https://github.com/appwrite/sdk-generator/tree/0.33.5" }, - "time": "2023-04-27T19:22:05+00:00" + "time": "2023-07-06T20:26:40+00:00" }, { "name": "doctrine/deprecations", @@ -3200,16 +3199,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.70", + "version": "1.3.71", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" + "reference": "ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1", + "reference": "ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1", "shasum": "" }, "require": { @@ -3259,7 +3258,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.71" }, "funding": [ { @@ -3267,7 +3266,7 @@ "type": "github" } ], - "time": "2022-12-09T12:56:44+00:00" + "time": "2023-04-25T20:33:03+00:00" }, { "name": "matthiasmullie/path-converter", @@ -3383,16 +3382,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { @@ -3433,9 +3432,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { "name": "phar-io/manifest", @@ -3786,16 +3785,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.22.0", + "version": "1.22.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c" + "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", - "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0", + "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0", "shasum": "" }, "require": { @@ -3827,9 +3826,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1" }, - "time": "2023-06-01T12:35:21+00:00" + "time": "2023-06-29T20:46:06+00:00" }, { "name": "phpunit/php-code-coverage", @@ -5581,16 +5580,16 @@ }, { "name": "twig/twig", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "106c170d08e8415d78be2d16c3d057d0d108262b" + "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/106c170d08e8415d78be2d16c3d057d0d108262b", - "reference": "106c170d08e8415d78be2d16c3d057d0d108262b", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", + "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", "shasum": "" }, "require": { @@ -5636,7 +5635,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.6.0" + "source": "https://github.com/twigphp/Twig/tree/v3.6.1" }, "funding": [ { @@ -5648,7 +5647,7 @@ "type": "tidelift" } ], - "time": "2023-05-03T19:06:57+00:00" + "time": "2023-06-08T12:52:13+00:00" } ], "aliases": [], From e1ba324196e0efa8b2fa1e9e674a9dd0a933f1dd Mon Sep 17 00:00:00 2001 From: Prateek Banga Date: Mon, 10 Jul 2023 13:34:32 +0530 Subject: [PATCH 47/51] fix formatting issues in comments according to feedback in PR. --- .../Services/Databases/DatabasesCustomClientTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index 9b0c337bc7..b0ab884a07 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -241,7 +241,7 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; - //creating collection 1 + // Creating collection 1 $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -258,7 +258,7 @@ class DatabasesCustomClientTest extends Scope ] ]); - //creating collection 2 + // Creating collection 2 $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -277,7 +277,7 @@ class DatabasesCustomClientTest extends Scope \sleep(2); - //creating two way relationship between collection 1 and collection 2 from collection 1 + // Creating two way relationship between collection 1 and collection 2 from collection 1 $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'] . '/attributes/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -293,7 +293,7 @@ class DatabasesCustomClientTest extends Scope \sleep(3); - //update relation from collection 2 to on delete restrict + // Update relation from collection 2 to on delete restrict $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection2['body']['$id'] . '/attributes/' . $collection1['body']['$id'] . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -302,7 +302,7 @@ class DatabasesCustomClientTest extends Scope 'onDelete' => 'restrict', ]); - //fetching attributes after updating relation to compare + // Fetching attributes after updating relation to compare $collection1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection1['body']['$id'], [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], From 5aefa88a507e0006baf480294f02cd5331ab1534 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 10 Jul 2023 21:36:17 +0400 Subject: [PATCH 48/51] feat: update python version --- app/config/platforms.php | 2 +- composer.json | 2 +- composer.lock | 77 ++++++++++++++++++++-------------------- 3 files changed, 40 insertions(+), 41 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index caff21b28b..a5e221fe84 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -285,7 +285,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '2.0.0', + 'version' => '2.0.2', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, diff --git a/composer.json b/composer.json index 78f960d3d1..0ba26540bd 100644 --- a/composer.json +++ b/composer.json @@ -79,7 +79,7 @@ } ], "require-dev": { - "appwrite/sdk-generator": "0.32.*", + "appwrite/sdk-generator": "0.33.*", "ext-fileinfo": "*", "phpunit/phpunit": "9.5.20", "squizlabs/php_codesniffer": "^3.6", diff --git a/composer.lock b/composer.lock index a261c416e7..0c6b961ea2 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": "169ab6e7dd540e45309d3c5093506fad", + "content-hash": "3eadbfe5543aafdf8682ea0465159e3c", "packages": [ { "name": "adhocore/jwt", @@ -2964,16 +2964,16 @@ }, { "name": "webonyx/graphql-php", - "version": "v14.11.9", + "version": "v14.11.10", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70" + "reference": "d9c2fdebc6aa01d831bc2969da00e8588cffef19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/ff91c9f3cf241db702e30b2c42bcc0920e70ac70", - "reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/d9c2fdebc6aa01d831bc2969da00e8588cffef19", + "reference": "d9c2fdebc6aa01d831bc2969da00e8588cffef19", "shasum": "" }, "require": { @@ -2993,8 +2993,7 @@ "phpunit/phpunit": "^7.2 || ^8.5", "psr/http-message": "^1.0", "react/promise": "2.*", - "simpod/php-coveralls-mirror": "^3.0", - "squizlabs/php_codesniffer": "3.5.4" + "simpod/php-coveralls-mirror": "^3.0" }, "suggest": { "psr/http-message": "To use standard GraphQL server", @@ -3018,7 +3017,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v14.11.9" + "source": "https://github.com/webonyx/graphql-php/tree/v14.11.10" }, "funding": [ { @@ -3026,22 +3025,22 @@ "type": "open_collective" } ], - "time": "2023-01-06T12:12:50+00:00" + "time": "2023-07-05T14:23:37+00:00" } ], "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.32.3", + "version": "0.33.6", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "4057e14a61335070034b1cbdce9e39bef94d997d" + "reference": "237fe97b68090a244382c36f96482c352880a38c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4057e14a61335070034b1cbdce9e39bef94d997d", - "reference": "4057e14a61335070034b1cbdce9e39bef94d997d", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/237fe97b68090a244382c36f96482c352880a38c", + "reference": "237fe97b68090a244382c36f96482c352880a38c", "shasum": "" }, "require": { @@ -3077,9 +3076,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.32.3" + "source": "https://github.com/appwrite/sdk-generator/tree/0.33.6" }, - "time": "2023-04-27T19:22:05+00:00" + "time": "2023-07-10T16:27:53+00:00" }, { "name": "doctrine/deprecations", @@ -3200,16 +3199,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.70", + "version": "1.3.71", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" + "reference": "ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1", + "reference": "ae42a47d7fecc1fbb7277b2f2d84c37a33edc3b1", "shasum": "" }, "require": { @@ -3259,7 +3258,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.71" }, "funding": [ { @@ -3267,7 +3266,7 @@ "type": "github" } ], - "time": "2022-12-09T12:56:44+00:00" + "time": "2023-04-25T20:33:03+00:00" }, { "name": "matthiasmullie/path-converter", @@ -3383,16 +3382,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { @@ -3433,9 +3432,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { "name": "phar-io/manifest", @@ -3786,16 +3785,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.22.0", + "version": "1.22.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c" + "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", - "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0", + "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0", "shasum": "" }, "require": { @@ -3827,9 +3826,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1" }, - "time": "2023-06-01T12:35:21+00:00" + "time": "2023-06-29T20:46:06+00:00" }, { "name": "phpunit/php-code-coverage", @@ -5581,16 +5580,16 @@ }, { "name": "twig/twig", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "106c170d08e8415d78be2d16c3d057d0d108262b" + "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/106c170d08e8415d78be2d16c3d057d0d108262b", - "reference": "106c170d08e8415d78be2d16c3d057d0d108262b", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", + "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", "shasum": "" }, "require": { @@ -5636,7 +5635,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.6.0" + "source": "https://github.com/twigphp/Twig/tree/v3.6.1" }, "funding": [ { @@ -5648,7 +5647,7 @@ "type": "tidelift" } ], - "time": "2023-05-03T19:06:57+00:00" + "time": "2023-06-08T12:52:13+00:00" } ], "aliases": [], From b4fea28787b851b88fc1c08d5d6cbf1cdc06281c Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Tue, 11 Jul 2023 00:15:46 +0530 Subject: [PATCH 49/51] Add .NET SDK docs examples --- app/config/platforms.php | 2 +- composer.lock | 12 +++++------ .../account/create-phone-verification.md | 12 +++++++++++ .../examples/account/create-recovery.md | 14 +++++++++++++ .../examples/account/create-verification.md | 13 ++++++++++++ .../examples/account/delete-session.md | 13 ++++++++++++ .../examples/account/delete-sessions.md | 12 +++++++++++ .../examples/account/get-prefs.md | 12 +++++++++++ .../examples/account/get-session.md | 13 ++++++++++++ .../server-dotnet/examples/account/get.md | 12 +++++++++++ .../examples/account/list-logs.md | 12 +++++++++++ .../examples/account/list-sessions.md | 12 +++++++++++ .../examples/account/update-email.md | 14 +++++++++++++ .../examples/account/update-name.md | 13 ++++++++++++ .../examples/account/update-password.md | 13 ++++++++++++ .../account/update-phone-verification.md | 14 +++++++++++++ .../examples/account/update-phone.md | 14 +++++++++++++ .../examples/account/update-prefs.md | 13 ++++++++++++ .../examples/account/update-recovery.md | 16 +++++++++++++++ .../examples/account/update-session.md | 13 ++++++++++++ .../examples/account/update-status.md | 12 +++++++++++ .../examples/account/update-verification.md | 14 +++++++++++++ .../examples/avatars/get-browser.md | 13 ++++++++++++ .../examples/avatars/get-credit-card.md | 13 ++++++++++++ .../examples/avatars/get-favicon.md | 13 ++++++++++++ .../examples/avatars/get-flag.md | 13 ++++++++++++ .../examples/avatars/get-image.md | 13 ++++++++++++ .../examples/avatars/get-initials.md | 12 +++++++++++ .../server-dotnet/examples/avatars/get-q-r.md | 13 ++++++++++++ .../databases/create-boolean-attribute.md | 16 +++++++++++++++ .../examples/databases/create-collection.md | 15 ++++++++++++++ .../databases/create-datetime-attribute.md | 16 +++++++++++++++ .../examples/databases/create-document.md | 16 +++++++++++++++ .../databases/create-email-attribute.md | 16 +++++++++++++++ .../databases/create-enum-attribute.md | 17 ++++++++++++++++ .../databases/create-float-attribute.md | 16 +++++++++++++++ .../examples/databases/create-index.md | 17 ++++++++++++++++ .../databases/create-integer-attribute.md | 16 +++++++++++++++ .../examples/databases/create-ip-attribute.md | 16 +++++++++++++++ .../create-relationship-attribute.md | 16 +++++++++++++++ .../databases/create-string-attribute.md | 17 ++++++++++++++++ .../databases/create-url-attribute.md | 16 +++++++++++++++ .../examples/databases/create.md | 14 +++++++++++++ .../examples/databases/delete-attribute.md | 15 ++++++++++++++ .../examples/databases/delete-collection.md | 14 +++++++++++++ .../examples/databases/delete-document.md | 15 ++++++++++++++ .../examples/databases/delete-index.md | 15 ++++++++++++++ .../examples/databases/delete.md | 13 ++++++++++++ .../examples/databases/get-attribute.md | 15 ++++++++++++++ .../examples/databases/get-collection.md | 14 +++++++++++++ .../examples/databases/get-document.md | 15 ++++++++++++++ .../examples/databases/get-index.md | 15 ++++++++++++++ .../server-dotnet/examples/databases/get.md | 13 ++++++++++++ .../examples/databases/list-attributes.md | 14 +++++++++++++ .../examples/databases/list-collections.md | 13 ++++++++++++ .../examples/databases/list-documents.md | 14 +++++++++++++ .../examples/databases/list-indexes.md | 14 +++++++++++++ .../server-dotnet/examples/databases/list.md | 12 +++++++++++ .../databases/update-boolean-attribute.md | 17 ++++++++++++++++ .../examples/databases/update-collection.md | 15 ++++++++++++++ .../databases/update-datetime-attribute.md | 17 ++++++++++++++++ .../examples/databases/update-document.md | 15 ++++++++++++++ .../databases/update-email-attribute.md | 17 ++++++++++++++++ .../databases/update-enum-attribute.md | 18 +++++++++++++++++ .../databases/update-float-attribute.md | 19 ++++++++++++++++++ .../databases/update-integer-attribute.md | 19 ++++++++++++++++++ .../examples/databases/update-ip-attribute.md | 17 ++++++++++++++++ .../update-relationship-attribute.md | 15 ++++++++++++++ .../databases/update-string-attribute.md | 17 ++++++++++++++++ .../databases/update-url-attribute.md | 17 ++++++++++++++++ .../examples/databases/update.md | 14 +++++++++++++ .../examples/functions/create-build.md | 15 ++++++++++++++ .../examples/functions/create-deployment.md | 16 +++++++++++++++ .../examples/functions/create-execution.md | 13 ++++++++++++ .../examples/functions/create-variable.md | 15 ++++++++++++++ .../examples/functions/create.md | 15 ++++++++++++++ .../examples/functions/delete-deployment.md | 14 +++++++++++++ .../examples/functions/delete-variable.md | 14 +++++++++++++ .../examples/functions/delete.md | 13 ++++++++++++ .../examples/functions/get-deployment.md | 14 +++++++++++++ .../examples/functions/get-execution.md | 14 +++++++++++++ .../examples/functions/get-variable.md | 14 +++++++++++++ .../server-dotnet/examples/functions/get.md | 13 ++++++++++++ .../examples/functions/list-deployments.md | 13 ++++++++++++ .../examples/functions/list-executions.md | 13 ++++++++++++ .../examples/functions/list-runtimes.md | 12 +++++++++++ .../examples/functions/list-variables.md | 13 ++++++++++++ .../server-dotnet/examples/functions/list.md | 12 +++++++++++ .../examples/functions/update-deployment.md | 14 +++++++++++++ .../examples/functions/update-variable.md | 15 ++++++++++++++ .../examples/functions/update.md | 14 +++++++++++++ .../examples/graphql/mutation.md | 13 ++++++++++++ .../server-dotnet/examples/graphql/query.md | 13 ++++++++++++ .../examples/health/get-antivirus.md | 12 +++++++++++ .../examples/health/get-cache.md | 12 +++++++++++ .../server-dotnet/examples/health/get-d-b.md | 12 +++++++++++ .../examples/health/get-queue-certificates.md | 12 +++++++++++ .../examples/health/get-queue-functions.md | 12 +++++++++++ .../examples/health/get-queue-logs.md | 12 +++++++++++ .../examples/health/get-queue-webhooks.md | 12 +++++++++++ .../examples/health/get-storage-local.md | 12 +++++++++++ .../server-dotnet/examples/health/get-time.md | 12 +++++++++++ .../server-dotnet/examples/health/get.md | 12 +++++++++++ .../server-dotnet/examples/locale/get.md | 12 +++++++++++ .../examples/locale/list-continents.md | 12 +++++++++++ .../examples/locale/list-countries-e-u.md | 12 +++++++++++ .../examples/locale/list-countries-phones.md | 12 +++++++++++ .../examples/locale/list-countries.md | 12 +++++++++++ .../examples/locale/list-currencies.md | 12 +++++++++++ .../examples/locale/list-languages.md | 12 +++++++++++ .../examples/storage/create-bucket.md | 14 +++++++++++++ .../examples/storage/create-file.md | 15 ++++++++++++++ .../examples/storage/delete-bucket.md | 13 ++++++++++++ .../examples/storage/delete-file.md | 14 +++++++++++++ .../examples/storage/get-bucket.md | 13 ++++++++++++ .../examples/storage/get-file-download.md | 14 +++++++++++++ .../examples/storage/get-file-preview.md | 14 +++++++++++++ .../examples/storage/get-file-view.md | 14 +++++++++++++ .../examples/storage/get-file.md | 14 +++++++++++++ .../examples/storage/list-buckets.md | 12 +++++++++++ .../examples/storage/list-files.md | 13 ++++++++++++ .../examples/storage/update-bucket.md | 14 +++++++++++++ .../examples/storage/update-file.md | 14 +++++++++++++ .../examples/teams/create-membership.md | 15 ++++++++++++++ .../server-dotnet/examples/teams/create.md | 14 +++++++++++++ .../examples/teams/delete-membership.md | 14 +++++++++++++ .../server-dotnet/examples/teams/delete.md | 13 ++++++++++++ .../examples/teams/get-membership.md | 14 +++++++++++++ .../server-dotnet/examples/teams/get-prefs.md | 13 ++++++++++++ .../1.3.x/server-dotnet/examples/teams/get.md | 13 ++++++++++++ .../examples/teams/list-memberships.md | 13 ++++++++++++ .../server-dotnet/examples/teams/list.md | 12 +++++++++++ .../examples/teams/update-membership-roles.md | 15 ++++++++++++++ .../teams/update-membership-status.md | 16 +++++++++++++++ .../examples/teams/update-name.md | 14 +++++++++++++ .../examples/teams/update-prefs.md | 14 +++++++++++++ .../examples/users/create-argon2user.md | 15 ++++++++++++++ .../examples/users/create-bcrypt-user.md | 15 ++++++++++++++ .../examples/users/create-m-d5user.md | 15 ++++++++++++++ .../examples/users/create-p-h-pass-user.md | 15 ++++++++++++++ .../examples/users/create-s-h-a-user.md | 15 ++++++++++++++ .../users/create-scrypt-modified-user.md | 18 +++++++++++++++++ .../examples/users/create-scrypt-user.md | 20 +++++++++++++++++++ .../server-dotnet/examples/users/create.md | 13 ++++++++++++ .../examples/users/delete-session.md | 14 +++++++++++++ .../examples/users/delete-sessions.md | 13 ++++++++++++ .../server-dotnet/examples/users/delete.md | 13 ++++++++++++ .../server-dotnet/examples/users/get-prefs.md | 13 ++++++++++++ .../1.3.x/server-dotnet/examples/users/get.md | 13 ++++++++++++ .../server-dotnet/examples/users/list-logs.md | 13 ++++++++++++ .../examples/users/list-memberships.md | 13 ++++++++++++ .../examples/users/list-sessions.md | 13 ++++++++++++ .../server-dotnet/examples/users/list.md | 12 +++++++++++ .../users/update-email-verification.md | 14 +++++++++++++ .../examples/users/update-email.md | 14 +++++++++++++ .../examples/users/update-name.md | 14 +++++++++++++ .../examples/users/update-password.md | 14 +++++++++++++ .../users/update-phone-verification.md | 14 +++++++++++++ .../examples/users/update-phone.md | 14 +++++++++++++ .../examples/users/update-prefs.md | 14 +++++++++++++ .../examples/users/update-status.md | 14 +++++++++++++ 161 files changed, 2229 insertions(+), 7 deletions(-) create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/create-recovery.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/create-verification.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/delete-session.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/delete-sessions.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/get-prefs.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/get-session.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/get.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/list-logs.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/list-sessions.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/update-email.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/update-name.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/update-password.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/update-phone.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/update-prefs.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/update-recovery.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/update-session.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/update-status.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/account/update-verification.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/avatars/get-browser.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/avatars/get-flag.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/avatars/get-image.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/avatars/get-initials.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-collection.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-document.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-index.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/create.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/delete-collection.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/delete-document.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/delete-index.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/delete.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/get-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/get-collection.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/get-document.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/get-index.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/get.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/list-attributes.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/list-collections.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/list-documents.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/list-indexes.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/list.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-collection.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-document.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/databases/update.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/create-build.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/create-deployment.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/create-execution.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/create-variable.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/create.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/delete-variable.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/delete.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/get-deployment.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/get-execution.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/get-variable.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/get.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/list-deployments.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/list-executions.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/list-variables.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/list.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/update-deployment.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/update-variable.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/functions/update.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/graphql/mutation.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/graphql/query.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/health/get-antivirus.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/health/get-cache.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/health/get-d-b.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/health/get-storage-local.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/health/get-time.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/health/get.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/locale/get.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/locale/list-continents.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/locale/list-countries.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/locale/list-currencies.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/locale/list-languages.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/create-bucket.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/create-file.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/delete-file.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/get-bucket.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/get-file-download.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/get-file-view.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/get-file.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/list-buckets.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/list-files.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/update-bucket.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/storage/update-file.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/create-membership.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/create.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/delete-membership.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/delete.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/get-membership.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/get-prefs.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/get.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/list-memberships.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/list.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/update-membership-roles.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/update-name.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/teams/update-prefs.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/create-argon2user.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/create.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/delete-session.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/delete-sessions.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/delete.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/get-prefs.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/get.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/list-logs.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/list-memberships.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/list-sessions.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/list.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/update-email-verification.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/update-email.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/update-name.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/update-password.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/update-phone.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/update-prefs.md create mode 100644 docs/examples/1.3.x/server-dotnet/examples/users/update-status.md diff --git a/app/config/platforms.php b/app/config/platforms.php index 2338326e1a..224f7a93c2 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -357,7 +357,7 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.4.1', + 'version' => '0.4.2', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, diff --git a/composer.lock b/composer.lock index 017b9ec900..0c6b961ea2 100644 --- a/composer.lock +++ b/composer.lock @@ -3031,16 +3031,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.33.5", + "version": "0.33.6", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "4e9dc898f8b52b1057abe1295c2ae44ca0501633" + "reference": "237fe97b68090a244382c36f96482c352880a38c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4e9dc898f8b52b1057abe1295c2ae44ca0501633", - "reference": "4e9dc898f8b52b1057abe1295c2ae44ca0501633", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/237fe97b68090a244382c36f96482c352880a38c", + "reference": "237fe97b68090a244382c36f96482c352880a38c", "shasum": "" }, "require": { @@ -3076,9 +3076,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.33.5" + "source": "https://github.com/appwrite/sdk-generator/tree/0.33.6" }, - "time": "2023-07-06T20:26:40+00:00" + "time": "2023-07-10T16:27:53+00:00" }, { "name": "doctrine/deprecations", diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/create-phone-verification.md b/docs/examples/1.3.x/server-dotnet/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..570bb20f5e --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/create-phone-verification.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.CreatePhoneVerification(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/create-recovery.md b/docs/examples/1.3.x/server-dotnet/examples/account/create-recovery.md new file mode 100644 index 0000000000..1edc79bc50 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.CreateRecovery( + email: "email@example.com", + url: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/create-verification.md b/docs/examples/1.3.x/server-dotnet/examples/account/create-verification.md new file mode 100644 index 0000000000..928fcb8561 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/create-verification.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.CreateVerification( + url: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/delete-session.md b/docs/examples/1.3.x/server-dotnet/examples/account/delete-session.md new file mode 100644 index 0000000000..c880a4f88d --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/delete-session.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +await account.DeleteSession( + sessionId: "[SESSION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/delete-sessions.md b/docs/examples/1.3.x/server-dotnet/examples/account/delete-sessions.md new file mode 100644 index 0000000000..8dcefaf71c --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/delete-sessions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +await account.DeleteSessions(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/get-prefs.md b/docs/examples/1.3.x/server-dotnet/examples/account/get-prefs.md new file mode 100644 index 0000000000..ce3ecc1179 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/get-prefs.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Preferences result = await account.GetPrefs(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/get-session.md b/docs/examples/1.3.x/server-dotnet/examples/account/get-session.md new file mode 100644 index 0000000000..9560b6a78a --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/get-session.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Session result = await account.GetSession( + sessionId: "[SESSION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/get.md b/docs/examples/1.3.x/server-dotnet/examples/account/get.md new file mode 100644 index 0000000000..5a50299c73 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.Get(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/list-logs.md b/docs/examples/1.3.x/server-dotnet/examples/account/list-logs.md new file mode 100644 index 0000000000..03b50407f5 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/list-logs.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +LogList result = await account.ListLogs(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/list-sessions.md b/docs/examples/1.3.x/server-dotnet/examples/account/list-sessions.md new file mode 100644 index 0000000000..aa813bc1dd --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/list-sessions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +SessionList result = await account.ListSessions(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/update-email.md b/docs/examples/1.3.x/server-dotnet/examples/account/update-email.md new file mode 100644 index 0000000000..0b457e0abb --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/update-email.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdateEmail( + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/update-name.md b/docs/examples/1.3.x/server-dotnet/examples/account/update-name.md new file mode 100644 index 0000000000..b41ba37289 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/update-name.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdateName( + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/update-password.md b/docs/examples/1.3.x/server-dotnet/examples/account/update-password.md new file mode 100644 index 0000000000..d8bab0b4d2 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/update-password.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdatePassword( + password: ""); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/update-phone-verification.md b/docs/examples/1.3.x/server-dotnet/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..6914e7805f --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.UpdatePhoneVerification( + userId: "[USER_ID]", + secret: "[SECRET]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/update-phone.md b/docs/examples/1.3.x/server-dotnet/examples/account/update-phone.md new file mode 100644 index 0000000000..f3e2f14df7 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/update-phone.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdatePhone( + phone: "+12065550100", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/update-prefs.md b/docs/examples/1.3.x/server-dotnet/examples/account/update-prefs.md new file mode 100644 index 0000000000..7a4f2378e4 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdatePrefs( + prefs: [object]); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/update-recovery.md b/docs/examples/1.3.x/server-dotnet/examples/account/update-recovery.md new file mode 100644 index 0000000000..d26f4ab8da --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.UpdateRecovery( + userId: "[USER_ID]", + secret: "[SECRET]", + password: "password", + passwordAgain: "password"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/update-session.md b/docs/examples/1.3.x/server-dotnet/examples/account/update-session.md new file mode 100644 index 0000000000..f3365bb96b --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/update-session.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Session result = await account.UpdateSession( + sessionId: "[SESSION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/update-status.md b/docs/examples/1.3.x/server-dotnet/examples/account/update-status.md new file mode 100644 index 0000000000..c5e3e2c576 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/update-status.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +User result = await account.UpdateStatus(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/account/update-verification.md b/docs/examples/1.3.x/server-dotnet/examples/account/update-verification.md new file mode 100644 index 0000000000..697d2dffa4 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/account/update-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var account = new Account(client); + +Token result = await account.UpdateVerification( + userId: "[USER_ID]", + secret: "[SECRET]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/avatars/get-browser.md b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-browser.md new file mode 100644 index 0000000000..3ac58f8b47 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-browser.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetBrowser( + code: "aa"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/avatars/get-credit-card.md b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..89f36fe35d --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-credit-card.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetCreditCard( + code: "amex"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/avatars/get-favicon.md b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..dbabf05d57 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetFavicon( + url: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/avatars/get-flag.md b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-flag.md new file mode 100644 index 0000000000..fc20581c1c --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-flag.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetFlag( + code: "af"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/avatars/get-image.md b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-image.md new file mode 100644 index 0000000000..35bf382f12 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-image.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetImage( + url: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/avatars/get-initials.md b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-initials.md new file mode 100644 index 0000000000..20ea37a3a4 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-initials.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetInitials(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/avatars/get-q-r.md b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..33dcac6f91 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/avatars/get-q-r.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var avatars = new Avatars(client); + +byte[] result = await avatars.GetQR( + text: "[TEXT]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-boolean-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..439537a9cb --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-boolean-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeBoolean result = await databases.CreateBooleanAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-collection.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-collection.md new file mode 100644 index 0000000000..1b7aa198a6 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-collection.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Collection result = await databases.CreateCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-datetime-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..1fff2965ff --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-datetime-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeDatetime result = await databases.CreateDatetimeAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-document.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-document.md new file mode 100644 index 0000000000..c0081f1f20 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-document.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Document result = await databases.CreateDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]", + data: [object]); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-email-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..e22ed7ddca --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-email-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeEmail result = await databases.CreateEmailAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-enum-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..773d41e9fa --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-enum-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeEnum result = await databases.CreateEnumAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + elements: new List {}, + required: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-float-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..d0915184e8 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-float-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeFloat result = await databases.CreateFloatAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-index.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-index.md new file mode 100644 index 0000000000..b13de722aa --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-index.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Index result = await databases.CreateIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + type: "key", + attributes: new List {}); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-integer-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..0d84ea7868 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-integer-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeInteger result = await databases.CreateIntegerAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-ip-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..ca571d00bd --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-ip-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeIp result = await databases.CreateIpAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-relationship-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..9c4a8c3604 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-relationship-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeRelationship result = await databases.CreateRelationshipAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + relatedCollectionId: "[RELATED_COLLECTION_ID]", + type: "oneToOne"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-string-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..645492eeab --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-string-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeString result = await databases.CreateStringAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + size: 1, + required: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create-url-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..9425882dec --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create-url-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeUrl result = await databases.CreateUrlAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/create.md b/docs/examples/1.3.x/server-dotnet/examples/databases/create.md new file mode 100644 index 0000000000..61ba46c03a --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/create.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Database result = await databases.Create( + databaseId: "[DATABASE_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/delete-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..8ebde257c5 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +await databases.DeleteAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: ""); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/delete-collection.md b/docs/examples/1.3.x/server-dotnet/examples/databases/delete-collection.md new file mode 100644 index 0000000000..398185c509 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +await databases.DeleteCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/delete-document.md b/docs/examples/1.3.x/server-dotnet/examples/databases/delete-document.md new file mode 100644 index 0000000000..6892b25438 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +await databases.DeleteDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/delete-index.md b/docs/examples/1.3.x/server-dotnet/examples/databases/delete-index.md new file mode 100644 index 0000000000..c5dab69e0f --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +await databases.DeleteIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: ""); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/delete.md b/docs/examples/1.3.x/server-dotnet/examples/databases/delete.md new file mode 100644 index 0000000000..cc8b4317e1 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/delete.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +await databases.Delete( + databaseId: "[DATABASE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/get-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/get-attribute.md new file mode 100644 index 0000000000..13eae946e9 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + + result = await databases.GetAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: ""); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/get-collection.md b/docs/examples/1.3.x/server-dotnet/examples/databases/get-collection.md new file mode 100644 index 0000000000..b617da7810 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Collection result = await databases.GetCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/get-document.md b/docs/examples/1.3.x/server-dotnet/examples/databases/get-document.md new file mode 100644 index 0000000000..079f93a403 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/get-document.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Document result = await databases.GetDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/get-index.md b/docs/examples/1.3.x/server-dotnet/examples/databases/get-index.md new file mode 100644 index 0000000000..d989ed4651 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/get-index.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Index result = await databases.GetIndex( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: ""); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/get.md b/docs/examples/1.3.x/server-dotnet/examples/databases/get.md new file mode 100644 index 0000000000..5dfa70eec1 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/get.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Database result = await databases.Get( + databaseId: "[DATABASE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/list-attributes.md b/docs/examples/1.3.x/server-dotnet/examples/databases/list-attributes.md new file mode 100644 index 0000000000..8af529df41 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeList result = await databases.ListAttributes( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/list-collections.md b/docs/examples/1.3.x/server-dotnet/examples/databases/list-collections.md new file mode 100644 index 0000000000..ed0d7bb56f --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/list-collections.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +CollectionList result = await databases.ListCollections( + databaseId: "[DATABASE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/list-documents.md b/docs/examples/1.3.x/server-dotnet/examples/databases/list-documents.md new file mode 100644 index 0000000000..92895692f0 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +DocumentList result = await databases.ListDocuments( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/list-indexes.md b/docs/examples/1.3.x/server-dotnet/examples/databases/list-indexes.md new file mode 100644 index 0000000000..dbbed3ca53 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +IndexList result = await databases.ListIndexes( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/list.md b/docs/examples/1.3.x/server-dotnet/examples/databases/list.md new file mode 100644 index 0000000000..ec234ddbab --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/list.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +DatabaseList result = await databases.List(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-boolean-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..2d6fa80849 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeBoolean result = await databases.UpdateBooleanAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-collection.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-collection.md new file mode 100644 index 0000000000..aa477e4ce0 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-collection.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Collection result = await databases.UpdateCollection( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-datetime-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..81966f05f1 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeDatetime result = await databases.UpdateDatetimeAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: ""); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-document.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-document.md new file mode 100644 index 0000000000..b19d9226c6 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-document.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Document result = await databases.UpdateDocument( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + documentId: "[DOCUMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-email-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..5baf67fd72 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeEmail result = await databases.UpdateEmailAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "email@example.com"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-enum-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..184ac1820f --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeEnum result = await databases.UpdateEnumAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + elements: new List {}, + required: false, + default: "[DEFAULT]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-float-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..d68815ab07 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeFloat result = await databases.UpdateFloatAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + min: 0, + max: 0, + default: 0); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-integer-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..2ad0e05754 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeInteger result = await databases.UpdateIntegerAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + min: 0, + max: 0, + default: 0); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-ip-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..10fd34b306 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeIp result = await databases.UpdateIpAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: ""); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-relationship-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..8a65da0a42 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-relationship-attribute.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeRelationship result = await databases.UpdateRelationshipAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: ""); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-string-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..84fc2b8da9 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-string-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeString result = await databases.UpdateStringAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "[DEFAULT]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update-url-attribute.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..e79812a77b --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +AttributeUrl result = await databases.UpdateUrlAttribute( + databaseId: "[DATABASE_ID]", + collectionId: "[COLLECTION_ID]", + key: "", + required: false, + default: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/databases/update.md b/docs/examples/1.3.x/server-dotnet/examples/databases/update.md new file mode 100644 index 0000000000..743108fc66 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/databases/update.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var databases = new Databases(client); + +Database result = await databases.Update( + databaseId: "[DATABASE_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/create-build.md b/docs/examples/1.3.x/server-dotnet/examples/functions/create-build.md new file mode 100644 index 0000000000..71eb842c6c --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/create-build.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + + result = await functions.CreateBuild( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]", + buildId: "[BUILD_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/create-deployment.md b/docs/examples/1.3.x/server-dotnet/examples/functions/create-deployment.md new file mode 100644 index 0000000000..c58d1ef68d --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/create-deployment.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Deployment result = await functions.CreateDeployment( + functionId: "[FUNCTION_ID]", + entrypoint: "[ENTRYPOINT]", + code: InputFile.FromPath("./path-to-files/image.jpg"), + activate: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/create-execution.md b/docs/examples/1.3.x/server-dotnet/examples/functions/create-execution.md new file mode 100644 index 0000000000..93cd65be5d --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/create-execution.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Execution result = await functions.CreateExecution( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/create-variable.md b/docs/examples/1.3.x/server-dotnet/examples/functions/create-variable.md new file mode 100644 index 0000000000..0724bc6eef --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Variable result = await functions.CreateVariable( + functionId: "[FUNCTION_ID]", + key: "[KEY]", + value: "[VALUE]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/create.md b/docs/examples/1.3.x/server-dotnet/examples/functions/create.md new file mode 100644 index 0000000000..75c9b242f6 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/create.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Function result = await functions.Create( + functionId: "[FUNCTION_ID]", + name: "[NAME]", + runtime: "node-14.5"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/delete-deployment.md b/docs/examples/1.3.x/server-dotnet/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..2c17dfae9f --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +await functions.DeleteDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/delete-variable.md b/docs/examples/1.3.x/server-dotnet/examples/functions/delete-variable.md new file mode 100644 index 0000000000..cf201480fa --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +await functions.DeleteVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/delete.md b/docs/examples/1.3.x/server-dotnet/examples/functions/delete.md new file mode 100644 index 0000000000..123e307c79 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/delete.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +await functions.Delete( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/get-deployment.md b/docs/examples/1.3.x/server-dotnet/examples/functions/get-deployment.md new file mode 100644 index 0000000000..7d895c6d82 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Deployment result = await functions.GetDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/get-execution.md b/docs/examples/1.3.x/server-dotnet/examples/functions/get-execution.md new file mode 100644 index 0000000000..ed65d26bef --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Execution result = await functions.GetExecution( + functionId: "[FUNCTION_ID]", + executionId: "[EXECUTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/get-variable.md b/docs/examples/1.3.x/server-dotnet/examples/functions/get-variable.md new file mode 100644 index 0000000000..12083e5acb --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Variable result = await functions.GetVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/get.md b/docs/examples/1.3.x/server-dotnet/examples/functions/get.md new file mode 100644 index 0000000000..1914ccf7ac --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/get.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Function result = await functions.Get( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/list-deployments.md b/docs/examples/1.3.x/server-dotnet/examples/functions/list-deployments.md new file mode 100644 index 0000000000..cd6a7b9446 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/list-deployments.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +DeploymentList result = await functions.ListDeployments( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/list-executions.md b/docs/examples/1.3.x/server-dotnet/examples/functions/list-executions.md new file mode 100644 index 0000000000..d4c73a0d36 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +ExecutionList result = await functions.ListExecutions( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/list-runtimes.md b/docs/examples/1.3.x/server-dotnet/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..ca1d125eb2 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/list-runtimes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +RuntimeList result = await functions.ListRuntimes(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/list-variables.md b/docs/examples/1.3.x/server-dotnet/examples/functions/list-variables.md new file mode 100644 index 0000000000..31177df9ff --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +VariableList result = await functions.ListVariables( + functionId: "[FUNCTION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/list.md b/docs/examples/1.3.x/server-dotnet/examples/functions/list.md new file mode 100644 index 0000000000..1b8897b76f --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/list.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +FunctionList result = await functions.List(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/update-deployment.md b/docs/examples/1.3.x/server-dotnet/examples/functions/update-deployment.md new file mode 100644 index 0000000000..8cd7fc5425 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/update-deployment.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Function result = await functions.UpdateDeployment( + functionId: "[FUNCTION_ID]", + deploymentId: "[DEPLOYMENT_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/update-variable.md b/docs/examples/1.3.x/server-dotnet/examples/functions/update-variable.md new file mode 100644 index 0000000000..63eac46609 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/update-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Variable result = await functions.UpdateVariable( + functionId: "[FUNCTION_ID]", + variableId: "[VARIABLE_ID]", + key: "[KEY]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/functions/update.md b/docs/examples/1.3.x/server-dotnet/examples/functions/update.md new file mode 100644 index 0000000000..d9b29e6e77 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/functions/update.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var functions = new Functions(client); + +Function result = await functions.Update( + functionId: "[FUNCTION_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/graphql/mutation.md b/docs/examples/1.3.x/server-dotnet/examples/graphql/mutation.md new file mode 100644 index 0000000000..8ab5f0e458 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var graphql = new Graphql(client); + +Any result = await graphql.Mutation( + query: [object]); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/graphql/query.md b/docs/examples/1.3.x/server-dotnet/examples/graphql/query.md new file mode 100644 index 0000000000..e019f43e5b --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/graphql/query.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var graphql = new Graphql(client); + +Any result = await graphql.Query( + query: [object]); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/health/get-antivirus.md b/docs/examples/1.3.x/server-dotnet/examples/health/get-antivirus.md new file mode 100644 index 0000000000..b8b0d5d95e --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/health/get-antivirus.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthAntivirus result = await health.GetAntivirus(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/health/get-cache.md b/docs/examples/1.3.x/server-dotnet/examples/health/get-cache.md new file mode 100644 index 0000000000..2f36c10f3b --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/health/get-cache.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthStatus result = await health.GetCache(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/health/get-d-b.md b/docs/examples/1.3.x/server-dotnet/examples/health/get-d-b.md new file mode 100644 index 0000000000..a263709073 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/health/get-d-b.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthStatus result = await health.GetDB(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-certificates.md b/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..b2f945cbc7 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthQueue result = await health.GetQueueCertificates(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-functions.md b/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..cf2ed7fc08 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthQueue result = await health.GetQueueFunctions(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-logs.md b/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..8821509dbc --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthQueue result = await health.GetQueueLogs(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-webhooks.md b/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..d2ffb01c4d --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthQueue result = await health.GetQueueWebhooks(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/health/get-storage-local.md b/docs/examples/1.3.x/server-dotnet/examples/health/get-storage-local.md new file mode 100644 index 0000000000..bc60cc6ccd --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/health/get-storage-local.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthStatus result = await health.GetStorageLocal(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/health/get-time.md b/docs/examples/1.3.x/server-dotnet/examples/health/get-time.md new file mode 100644 index 0000000000..15f1745453 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/health/get-time.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthTime result = await health.GetTime(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/health/get.md b/docs/examples/1.3.x/server-dotnet/examples/health/get.md new file mode 100644 index 0000000000..d1ddd8fdf0 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/health/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var health = new Health(client); + +HealthStatus result = await health.Get(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/locale/get.md b/docs/examples/1.3.x/server-dotnet/examples/locale/get.md new file mode 100644 index 0000000000..f049a92072 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/locale/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +Locale result = await locale.Get(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/locale/list-continents.md b/docs/examples/1.3.x/server-dotnet/examples/locale/list-continents.md new file mode 100644 index 0000000000..dd91caba9d --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/locale/list-continents.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +ContinentList result = await locale.ListContinents(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/locale/list-countries-e-u.md b/docs/examples/1.3.x/server-dotnet/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..8692c7b78e --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +CountryList result = await locale.ListCountriesEU(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/locale/list-countries-phones.md b/docs/examples/1.3.x/server-dotnet/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..8607ae90f5 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +PhoneList result = await locale.ListCountriesPhones(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/locale/list-countries.md b/docs/examples/1.3.x/server-dotnet/examples/locale/list-countries.md new file mode 100644 index 0000000000..c67d863856 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/locale/list-countries.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +CountryList result = await locale.ListCountries(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/locale/list-currencies.md b/docs/examples/1.3.x/server-dotnet/examples/locale/list-currencies.md new file mode 100644 index 0000000000..1bb3c427e0 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/locale/list-currencies.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +CurrencyList result = await locale.ListCurrencies(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/locale/list-languages.md b/docs/examples/1.3.x/server-dotnet/examples/locale/list-languages.md new file mode 100644 index 0000000000..1c2897d4fb --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/locale/list-languages.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var locale = new Locale(client); + +LanguageList result = await locale.ListLanguages(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/create-bucket.md b/docs/examples/1.3.x/server-dotnet/examples/storage/create-bucket.md new file mode 100644 index 0000000000..b1da6cb0bd --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/create-bucket.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +Bucket result = await storage.CreateBucket( + bucketId: "[BUCKET_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/create-file.md b/docs/examples/1.3.x/server-dotnet/examples/storage/create-file.md new file mode 100644 index 0000000000..f7d7315209 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/create-file.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +File result = await storage.CreateFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]", + file: InputFile.FromPath("./path-to-files/image.jpg")); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/delete-bucket.md b/docs/examples/1.3.x/server-dotnet/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..c8825f3063 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +await storage.DeleteBucket( + bucketId: "[BUCKET_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/delete-file.md b/docs/examples/1.3.x/server-dotnet/examples/storage/delete-file.md new file mode 100644 index 0000000000..8b70175d97 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +await storage.DeleteFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/get-bucket.md b/docs/examples/1.3.x/server-dotnet/examples/storage/get-bucket.md new file mode 100644 index 0000000000..aca9020f28 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +Bucket result = await storage.GetBucket( + bucketId: "[BUCKET_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/get-file-download.md b/docs/examples/1.3.x/server-dotnet/examples/storage/get-file-download.md new file mode 100644 index 0000000000..e6aa24bea3 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +byte[] result = await storage.GetFileDownload( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/get-file-preview.md b/docs/examples/1.3.x/server-dotnet/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..92565ae5ef --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +byte[] result = await storage.GetFilePreview( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/get-file-view.md b/docs/examples/1.3.x/server-dotnet/examples/storage/get-file-view.md new file mode 100644 index 0000000000..081f2dce7b --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +byte[] result = await storage.GetFileView( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/get-file.md b/docs/examples/1.3.x/server-dotnet/examples/storage/get-file.md new file mode 100644 index 0000000000..0299a91bbe --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/get-file.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +File result = await storage.GetFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/list-buckets.md b/docs/examples/1.3.x/server-dotnet/examples/storage/list-buckets.md new file mode 100644 index 0000000000..2caae5e0af --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/list-buckets.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +BucketList result = await storage.ListBuckets(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/list-files.md b/docs/examples/1.3.x/server-dotnet/examples/storage/list-files.md new file mode 100644 index 0000000000..9d861171ac --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/list-files.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +FileList result = await storage.ListFiles( + bucketId: "[BUCKET_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/update-bucket.md b/docs/examples/1.3.x/server-dotnet/examples/storage/update-bucket.md new file mode 100644 index 0000000000..eac7456209 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/update-bucket.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +Bucket result = await storage.UpdateBucket( + bucketId: "[BUCKET_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/storage/update-file.md b/docs/examples/1.3.x/server-dotnet/examples/storage/update-file.md new file mode 100644 index 0000000000..c51d335eef --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/storage/update-file.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var storage = new Storage(client); + +File result = await storage.UpdateFile( + bucketId: "[BUCKET_ID]", + fileId: "[FILE_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/create-membership.md b/docs/examples/1.3.x/server-dotnet/examples/teams/create-membership.md new file mode 100644 index 0000000000..bcc331724e --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/create-membership.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Membership result = await teams.CreateMembership( + teamId: "[TEAM_ID]", + roles: new List {}, + url: "https://example.com"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/create.md b/docs/examples/1.3.x/server-dotnet/examples/teams/create.md new file mode 100644 index 0000000000..fa34098cb2 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/create.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Team result = await teams.Create( + teamId: "[TEAM_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/delete-membership.md b/docs/examples/1.3.x/server-dotnet/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e3c7562f99 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +await teams.DeleteMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/delete.md b/docs/examples/1.3.x/server-dotnet/examples/teams/delete.md new file mode 100644 index 0000000000..8229839b1c --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/delete.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +await teams.Delete( + teamId: "[TEAM_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/get-membership.md b/docs/examples/1.3.x/server-dotnet/examples/teams/get-membership.md new file mode 100644 index 0000000000..108dbadbe0 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Membership result = await teams.GetMembership( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/get-prefs.md b/docs/examples/1.3.x/server-dotnet/examples/teams/get-prefs.md new file mode 100644 index 0000000000..08be12ba83 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var teams = new Teams(client); + +Preferences result = await teams.GetPrefs( + teamId: "[TEAM_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/get.md b/docs/examples/1.3.x/server-dotnet/examples/teams/get.md new file mode 100644 index 0000000000..f6c92a007b --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/get.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Team result = await teams.Get( + teamId: "[TEAM_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/list-memberships.md b/docs/examples/1.3.x/server-dotnet/examples/teams/list-memberships.md new file mode 100644 index 0000000000..145376cfb9 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/list-memberships.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +MembershipList result = await teams.ListMemberships( + teamId: "[TEAM_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/list.md b/docs/examples/1.3.x/server-dotnet/examples/teams/list.md new file mode 100644 index 0000000000..1acf615039 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/list.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +TeamList result = await teams.List(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/update-membership-roles.md b/docs/examples/1.3.x/server-dotnet/examples/teams/update-membership-roles.md new file mode 100644 index 0000000000..5f9db4401f --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/update-membership-roles.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Membership result = await teams.UpdateMembershipRoles( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + roles: new List {}); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/update-membership-status.md b/docs/examples/1.3.x/server-dotnet/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..bb377203cc --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var teams = new Teams(client); + +Membership result = await teams.UpdateMembershipStatus( + teamId: "[TEAM_ID]", + membershipId: "[MEMBERSHIP_ID]", + userId: "[USER_ID]", + secret: "[SECRET]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/update-name.md b/docs/examples/1.3.x/server-dotnet/examples/teams/update-name.md new file mode 100644 index 0000000000..1286730437 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/update-name.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var teams = new Teams(client); + +Team result = await teams.UpdateName( + teamId: "[TEAM_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/teams/update-prefs.md b/docs/examples/1.3.x/server-dotnet/examples/teams/update-prefs.md new file mode 100644 index 0000000000..3dfc0a3fc1 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token + +var teams = new Teams(client); + +Preferences result = await teams.UpdatePrefs( + teamId: "[TEAM_ID]", + prefs: [object]); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/create-argon2user.md b/docs/examples/1.3.x/server-dotnet/examples/users/create-argon2user.md new file mode 100644 index 0000000000..6038594547 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateArgon2User( + userId: "[USER_ID]", + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/create-bcrypt-user.md b/docs/examples/1.3.x/server-dotnet/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..954e1ad1cc --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateBcryptUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/create-m-d5user.md b/docs/examples/1.3.x/server-dotnet/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..de54ee98fe --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateMD5User( + userId: "[USER_ID]", + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/create-p-h-pass-user.md b/docs/examples/1.3.x/server-dotnet/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..e8ede042da --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreatePHPassUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/create-s-h-a-user.md b/docs/examples/1.3.x/server-dotnet/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..f381619651 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/create-s-h-a-user.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateSHAUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/create-scrypt-modified-user.md b/docs/examples/1.3.x/server-dotnet/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..c16cfe97f9 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateScryptModifiedUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password", + passwordSalt: "[PASSWORD_SALT]", + passwordSaltSeparator: "[PASSWORD_SALT_SEPARATOR]", + passwordSignerKey: "[PASSWORD_SIGNER_KEY]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/create-scrypt-user.md b/docs/examples/1.3.x/server-dotnet/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..1d6e60dd2d --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.CreateScryptUser( + userId: "[USER_ID]", + email: "email@example.com", + password: "password", + passwordSalt: "[PASSWORD_SALT]", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/create.md b/docs/examples/1.3.x/server-dotnet/examples/users/create.md new file mode 100644 index 0000000000..0a8421a544 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/create.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.Create( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/delete-session.md b/docs/examples/1.3.x/server-dotnet/examples/users/delete-session.md new file mode 100644 index 0000000000..841bd456c8 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/delete-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +await users.DeleteSession( + userId: "[USER_ID]", + sessionId: "[SESSION_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/delete-sessions.md b/docs/examples/1.3.x/server-dotnet/examples/users/delete-sessions.md new file mode 100644 index 0000000000..8ff8f76522 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +await users.DeleteSessions( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/delete.md b/docs/examples/1.3.x/server-dotnet/examples/users/delete.md new file mode 100644 index 0000000000..7833a7950f --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/delete.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +await users.Delete( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/get-prefs.md b/docs/examples/1.3.x/server-dotnet/examples/users/get-prefs.md new file mode 100644 index 0000000000..c19f5e0778 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +Preferences result = await users.GetPrefs( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/get.md b/docs/examples/1.3.x/server-dotnet/examples/users/get.md new file mode 100644 index 0000000000..9c315e6021 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/get.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.Get( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/list-logs.md b/docs/examples/1.3.x/server-dotnet/examples/users/list-logs.md new file mode 100644 index 0000000000..277addcd25 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/list-logs.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +LogList result = await users.ListLogs( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/list-memberships.md b/docs/examples/1.3.x/server-dotnet/examples/users/list-memberships.md new file mode 100644 index 0000000000..c25d98b41d --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/list-memberships.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +MembershipList result = await users.ListMemberships( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/list-sessions.md b/docs/examples/1.3.x/server-dotnet/examples/users/list-sessions.md new file mode 100644 index 0000000000..fcd87f01ad --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +SessionList result = await users.ListSessions( + userId: "[USER_ID]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/list.md b/docs/examples/1.3.x/server-dotnet/examples/users/list.md new file mode 100644 index 0000000000..9cb177b692 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/list.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +UserList result = await users.List(); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/update-email-verification.md b/docs/examples/1.3.x/server-dotnet/examples/users/update-email-verification.md new file mode 100644 index 0000000000..2b7a5b8674 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdateEmailVerification( + userId: "[USER_ID]", + emailVerification: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/update-email.md b/docs/examples/1.3.x/server-dotnet/examples/users/update-email.md new file mode 100644 index 0000000000..0d371b13fc --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/update-email.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdateEmail( + userId: "[USER_ID]", + email: "email@example.com"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/update-name.md b/docs/examples/1.3.x/server-dotnet/examples/users/update-name.md new file mode 100644 index 0000000000..f846543117 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/update-name.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdateName( + userId: "[USER_ID]", + name: "[NAME]"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/update-password.md b/docs/examples/1.3.x/server-dotnet/examples/users/update-password.md new file mode 100644 index 0000000000..ce3241dfd5 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/update-password.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdatePassword( + userId: "[USER_ID]", + password: ""); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/update-phone-verification.md b/docs/examples/1.3.x/server-dotnet/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..c2fd1673de --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdatePhoneVerification( + userId: "[USER_ID]", + phoneVerification: false); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/update-phone.md b/docs/examples/1.3.x/server-dotnet/examples/users/update-phone.md new file mode 100644 index 0000000000..90728d76c7 --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/update-phone.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdatePhone( + userId: "[USER_ID]", + number: "+12065550100"); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/update-prefs.md b/docs/examples/1.3.x/server-dotnet/examples/users/update-prefs.md new file mode 100644 index 0000000000..a39d54565a --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +Preferences result = await users.UpdatePrefs( + userId: "[USER_ID]", + prefs: [object]); \ No newline at end of file diff --git a/docs/examples/1.3.x/server-dotnet/examples/users/update-status.md b/docs/examples/1.3.x/server-dotnet/examples/users/update-status.md new file mode 100644 index 0000000000..713ece02ba --- /dev/null +++ b/docs/examples/1.3.x/server-dotnet/examples/users/update-status.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key + +var users = new Users(client); + +User result = await users.UpdateStatus( + userId: "[USER_ID]", + status: false); \ No newline at end of file From da44f65f2c8919c78f60e9efb6ca0d4ebd3585c5 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 10 Jul 2023 20:41:21 +0000 Subject: [PATCH 50/51] feat: update composer --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 017b9ec900..0c6b961ea2 100644 --- a/composer.lock +++ b/composer.lock @@ -3031,16 +3031,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.33.5", + "version": "0.33.6", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "4e9dc898f8b52b1057abe1295c2ae44ca0501633" + "reference": "237fe97b68090a244382c36f96482c352880a38c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4e9dc898f8b52b1057abe1295c2ae44ca0501633", - "reference": "4e9dc898f8b52b1057abe1295c2ae44ca0501633", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/237fe97b68090a244382c36f96482c352880a38c", + "reference": "237fe97b68090a244382c36f96482c352880a38c", "shasum": "" }, "require": { @@ -3076,9 +3076,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.33.5" + "source": "https://github.com/appwrite/sdk-generator/tree/0.33.6" }, - "time": "2023-07-06T20:26:40+00:00" + "time": "2023-07-10T16:27:53+00:00" }, { "name": "doctrine/deprecations", From 8bf8c96b01c9bf2ae5f56af6a28115d3faf53e07 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 11 Jul 2023 18:43:28 +0000 Subject: [PATCH 51/51] feat: update console --- app/console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/console b/app/console index ac4181aea4..9174d8f8cb 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit ac4181aea403d888e63cb527c700e80013c68ea8 +Subproject commit 9174d8f8cb584744dd7a53f69d324f490ee82ee3