From ce4eb563b3202c0352e3c2da36a05f54893a051d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 8 Apr 2026 09:29:12 +0200 Subject: [PATCH] AI review fixes --- app/config/errors.php | 2 +- .../Project/Http/Project/Platforms/Android/Create.php | 3 +-- .../Project/Http/Project/Platforms/Android/Update.php | 3 +-- .../Project/Http/Project/Platforms/Apple/Create.php | 3 +-- .../Project/Http/Project/Platforms/Apple/Update.php | 3 +-- .../Modules/Project/Http/Project/Platforms/Delete.php | 3 +-- .../Modules/Project/Http/Project/Platforms/Get.php | 3 +-- .../Project/Http/Project/Platforms/Linux/Create.php | 3 +-- .../Project/Http/Project/Platforms/Linux/Update.php | 3 +-- .../Project/Http/Project/Platforms/Web/Create.php | 11 +++++------ .../Project/Http/Project/Platforms/Web/Update.php | 4 ++-- .../Project/Http/Project/Platforms/Windows/Create.php | 3 +-- .../Project/Http/Project/Platforms/Windows/Update.php | 3 +-- .../Modules/Project/Http/Project/Platforms/XList.php | 3 +-- .../Modules/Project/Http/Project/Variables/Create.php | 3 +-- .../Modules/Project/Http/Project/Variables/Delete.php | 3 +-- .../Modules/Project/Http/Project/Variables/Get.php | 3 +-- .../Modules/Project/Http/Project/Variables/Update.php | 3 +-- .../Modules/Project/Http/Project/Variables/XList.php | 3 +-- .../Modules/Webhooks/Http/Webhooks/Create.php | 3 +-- .../Modules/Webhooks/Http/Webhooks/Delete.php | 3 +-- .../Platform/Modules/Webhooks/Http/Webhooks/Get.php | 3 +-- .../Webhooks/Http/Webhooks/Signature/Update.php | 3 +-- .../Modules/Webhooks/Http/Webhooks/Update.php | 3 +-- .../Platform/Modules/Webhooks/Http/Webhooks/XList.php | 3 +-- src/Appwrite/Utopia/Response/Model/PlatformWeb.php | 2 ++ src/Appwrite/Utopia/Response/Model/Project.php | 5 ----- 27 files changed, 32 insertions(+), 58 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index b6cfa54bdb..4190c6e277 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -1181,7 +1181,7 @@ return [ ], Exception::PLATFORM_METHOD_UNSUPPORTED => [ 'name' => Exception::PLATFORM_METHOD_UNSUPPORTED, - 'description' => 'The requested platform has invalid type. Please use coresponding update method for the platform type.', + 'description' => 'The requested platform has invalid type. Please use corresponding update method for the platform type.', 'code' => 400, ], Exception::PLATFORM_ALREADY_EXISTS => [ diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Android/Create.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Android/Create.php index 1fe9ca97ae..e33e531017 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Android/Create.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Android/Create.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms\Android; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -20,7 +19,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Text; -class Create extends Base +class Create extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Android/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Android/Update.php index bc555fd2ab..cd12f2da74 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Android/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Android/Update.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms\Android; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -19,7 +18,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Text; -class Update extends Base +class Update extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Apple/Create.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Apple/Create.php index 35158449db..4054face8e 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Apple/Create.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Apple/Create.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms\Apple; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -20,7 +19,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Text; -class Create extends Base +class Create extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Apple/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Apple/Update.php index bc38beb7e7..95d67be26c 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Apple/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Apple/Update.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms\Apple; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -19,7 +18,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Text; -class Update extends Base +class Update extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Delete.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Delete.php index 9762a7f64b..907046d27e 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Delete.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Delete.php @@ -4,7 +4,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms; use Appwrite\Event\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -17,7 +16,7 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -class Delete extends Base +class Delete extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Get.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Get.php index bba826abf1..c5f4b8fc81 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Get.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Get.php @@ -4,7 +4,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -16,7 +15,7 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -class Get extends Base +class Get extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Linux/Create.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Linux/Create.php index e8dbf5ac40..ae568740b8 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Linux/Create.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Linux/Create.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms\Linux; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -20,7 +19,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Text; -class Create extends Base +class Create extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Linux/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Linux/Update.php index ba52ce3135..92674d2276 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Linux/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Linux/Update.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms\Linux; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -19,7 +18,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Text; -class Update extends Base +class Update extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Web/Create.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Web/Create.php index e6ffa47b6d..f16c0af3fa 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Web/Create.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Web/Create.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms\Web; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -27,7 +26,7 @@ use Utopia\Validator\WhiteList; * WARNING: This kind of platform has most complex action, because it holds backwards compatibility too. * If possible, refer to any other type of platform for APIs, for more simpler endpoint. */ -class Create extends Base +class Create extends Action { use HTTP; @@ -96,9 +95,8 @@ class Create extends Base // Backwards compatibility // Used to have: type, name, key, hostname if (!empty($type)) { - // Validate deprecated type, and rename to new type - $deprecatedtypeMapping = [ + $deprecatedTypeMapping = [ // Web 'web' => Platform::TYPE_WEB, 'flutter-web' => Platform::TYPE_WEB, @@ -118,15 +116,16 @@ class Create extends Base 'android' => Platform::TYPE_ANDROID, 'react-native-android' => Platform::TYPE_ANDROID, + 'flutter-linux' => Platform::TYPE_LINUX, 'flutter-windows' => Platform::TYPE_WINDOWS, ]; - $typeValidator = new WhiteList(\array_keys($deprecatedtypeMapping)); + $typeValidator = new WhiteList(\array_keys($deprecatedTypeMapping)); if (!$typeValidator->isValid($request->getParam('type', ''))) { throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Param "type" is invalid: ' . $typeValidator->getDescription()); } - $type = $deprecatedtypeMapping[$request->getParam('type', '')] ?? ''; + $type = $deprecatedTypeMapping[$request->getParam('type', '')] ?? ''; } if (!empty($key)) { diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Web/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Web/Update.php index 7866e03fdb..3677466452 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Web/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Web/Update.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms\Web; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -20,7 +19,7 @@ use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Hostname; use Utopia\Validator\Text; -class Update extends Base +class Update extends Action { use HTTP; @@ -116,6 +115,7 @@ class Update extends Base 'flutter-android', 'react-native-android', 'flutter-windows', + 'flutter-linux', ]; if (!in_array($platform->getAttribute('type', ''), $supportedTypes)) { throw new Exception(Exception::PLATFORM_METHOD_UNSUPPORTED); diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Windows/Create.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Windows/Create.php index 7943dd4bc8..a7e583cadb 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Windows/Create.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Windows/Create.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms\Windows; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -20,7 +19,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Text; -class Create extends Base +class Create extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Windows/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Windows/Update.php index eff231ebda..43d6c65d44 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Windows/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/Windows/Update.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms\Windows; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; use Appwrite\Network\Platform; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -19,7 +18,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Text; -class Update extends Base +class Update extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/XList.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/XList.php index 998a275843..14a67418ee 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/XList.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Platforms/XList.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Platforms; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -20,7 +19,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Boolean; -class XList extends Base +class XList extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Create.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Create.php index acc39bb68d..8dbc720045 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Create.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Create.php @@ -4,7 +4,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Variables; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -19,7 +18,7 @@ use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Boolean; use Utopia\Validator\Text; -class Create extends Base +class Create extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Delete.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Delete.php index ac47ec3dbb..131cf7245b 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Delete.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Delete.php @@ -4,7 +4,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Variables; use Appwrite\Event\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -16,7 +15,7 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -class Delete extends Base +class Delete extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Get.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Get.php index 6de51dacaf..af14148c92 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Get.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Get.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Variables; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -13,7 +12,7 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -class Get extends Base +class Get extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Update.php index 61a943b618..988a7c0849 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Update.php @@ -4,7 +4,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Variables; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -19,7 +18,7 @@ use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; use Utopia\Validator\Text; -class Update extends Base +class Update extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/XList.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/XList.php index cd11fe68c6..bd391ea3b4 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/XList.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/XList.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Project\Http\Project\Variables; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -19,7 +18,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Boolean; -class XList extends Base +class XList extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Create.php b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Create.php index 91daf33b2b..3c716202af 100644 --- a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Create.php +++ b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Create.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Webhooks\Http\Webhooks; use Appwrite\Event\Event as QueueEvent; use Appwrite\Event\Validator\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -25,7 +24,7 @@ use Utopia\Validator\Multiple; use Utopia\Validator\Text; use Utopia\Validator\URL; -class Create extends Base +class Create extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Delete.php b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Delete.php index 7730e9fc2c..cd05b6210c 100644 --- a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Delete.php +++ b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Delete.php @@ -4,7 +4,6 @@ namespace Appwrite\Platform\Modules\Webhooks\Http\Webhooks; use Appwrite\Event\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -18,7 +17,7 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -class Delete extends Base +class Delete extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Get.php b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Get.php index 52ac455fc9..ebe6fa7bcb 100644 --- a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Get.php +++ b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Get.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Webhooks\Http\Webhooks; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -16,7 +15,7 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -class Get extends Base +class Get extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Signature/Update.php b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Signature/Update.php index 9b2612863f..51c5bfbaf9 100644 --- a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Signature/Update.php +++ b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Signature/Update.php @@ -4,7 +4,6 @@ namespace Appwrite\Platform\Modules\Webhooks\Http\Webhooks\Signature; use Appwrite\Event\Event as QueueEvent; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -17,7 +16,7 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -class Update extends Base +class Update extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Update.php b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Update.php index a1387c356c..968c15dae2 100644 --- a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Update.php +++ b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/Update.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Webhooks\Http\Webhooks; use Appwrite\Event\Event as QueueEvent; use Appwrite\Event\Validator\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -24,7 +23,7 @@ use Utopia\Validator\Multiple; use Utopia\Validator\Text; use Utopia\Validator\URL; -class Update extends Base +class Update extends Action { use HTTP; diff --git a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/XList.php b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/XList.php index fae95d7c5d..2a4c4f9e59 100644 --- a/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/XList.php +++ b/src/Appwrite/Platform/Modules/Webhooks/Http/Webhooks/XList.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Webhooks\Http\Webhooks; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Compute\Base; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -20,7 +19,7 @@ use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\Boolean; -class XList extends Base +class XList extends Action { use HTTP; diff --git a/src/Appwrite/Utopia/Response/Model/PlatformWeb.php b/src/Appwrite/Utopia/Response/Model/PlatformWeb.php index 5a56252685..af03194fdb 100644 --- a/src/Appwrite/Utopia/Response/Model/PlatformWeb.php +++ b/src/Appwrite/Utopia/Response/Model/PlatformWeb.php @@ -25,6 +25,7 @@ class PlatformWeb extends PlatformBase 'flutter-android', 'react-native-android', 'flutter-windows', + 'flutter-linux', ], ]; @@ -39,6 +40,7 @@ class PlatformWeb extends PlatformBase ]) // Backwards compatibility ->addRule('key', [ + 'hidden' => true, 'type' => self::TYPE_STRING, 'description' => 'Deprecated for old versions using alias endpoint to create universal platform.', 'default' => '', diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index 8fccb6f983..1ef73aa769 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -9,11 +9,6 @@ use Utopia\Database\Document; class Project extends Model { - /** - * @var bool - */ - protected bool $public = true; - public function __construct() { $this