From a0256d7cbf146ca671a517e40f40c6eb256b941b Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Wed, 3 Jun 2026 09:46:27 +0100 Subject: [PATCH] Expose project blocks and console access time --- .../Utopia/Response/Model/Project.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index 29d7964e0a..d475cfe5f2 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -179,6 +179,19 @@ class Project extends Model 'example' => new \stdClass(), 'array' => true, ]) + ->addRule('blocks', [ + 'type' => self::TYPE_STRING, + 'description' => 'Project blocks information.', + 'default' => [], + 'example' => [], + 'array' => true, + ]) + ->addRule('consoleAccessedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Last time the project was accessed via console.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) ; } @@ -213,10 +226,16 @@ class Project extends Model $this->expandServices($document); $this->expandProtocols($document); $this->expandAuthMethods($document); + $this->expandConsoleAccessedAt($document); return $document; } + private function expandConsoleAccessedAt(Document $document): void + { + $document->setAttribute('consoleAccessedAt', $document->getAttribute('accessedAt', '')); + } + private function expandSmtpFields(Document $document): void { if (!$document->isSet('smtp')) {