From fc8326417b469ba9f58323aad99b622b0ebefedf Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 23 May 2025 19:20:26 +0530 Subject: [PATCH 01/58] update: z-index to be the highest! --- src/Appwrite/Transformation/Adapter/Preview.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Transformation/Adapter/Preview.php b/src/Appwrite/Transformation/Adapter/Preview.php index 70af19a188..7c08777413 100644 --- a/src/Appwrite/Transformation/Adapter/Preview.php +++ b/src/Appwrite/Transformation/Adapter/Preview.php @@ -47,7 +47,7 @@ class Preview extends Adapter position: fixed; right: 16px; bottom: 16px; - z-index: 1; + z-index: calc(infinity); border-radius: var(--border-radius-S, 8px); border: var(--border-width-S, 1px) solid var(--color-border-neutral, #EDEDF0); background: var(--color-bgColor-neutral-primary, #FFF); From 5eb7c3a7c83e13ca5899fa494f94aac31fbb87d5 Mon Sep 17 00:00:00 2001 From: Veeresh <75656445+Veera-mulge@users.noreply.github.com> Date: Wed, 3 Sep 2025 19:18:25 +0530 Subject: [PATCH 02/58] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 375b1ad48c..e0b5c5ab4b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> We just announced Opt-in relationship loading for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-opt-in-relationship-loading) +> We just announced time helper queries for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-time-helper-queries) > Appwrite Cloud is now Generally Available - [Learn more](https://appwrite.io/cloud-ga) From ba97cfb440332d8f735d8cb373a86f0d787893db Mon Sep 17 00:00:00 2001 From: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> Date: Wed, 3 Sep 2025 22:59:20 +0000 Subject: [PATCH 03/58] chore: create workflow to auto add labels to issues --- .github/labeler.yml | 83 ++++++++++++++++++++++++++ .github/workflows/auto-label-issue.yml | 22 +++++++ 2 files changed, 105 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/auto-label-issue.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..fb46eb5ba1 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,83 @@ +# Fixes and upgrades for the Appwrite Auth / Users / Teams services. +"product / auth": + - "(auth|session|login|logout|register|2fa|mfa|users|teams|memberships|invite|oauth|oauth2|sso|jwt)" + +# Fixes and upgrades for the Appwrite Realtime API. +"api / realtime": + - "(realtime|subscribe|websockets)" + +# Console, UI and UX issues +"product / console": + - "(console)" + +# Fixes and upgrades for the Appwrite Storage. +"product / storage": + - "(storage|bucket|file|image|preview|download)" + +# Fixes and upgrades for the Appwrite Database. +"product / databases": + - "(database|collection|tables|attribute|column|document|row|query|queries|indexes|search|filter|sort|pagination)" + +# Fixes and upgrades for the Appwrite Functions. +"product / functions": + - "(function|runtime|deployment|execution|trigger|cron|schedule)" + +# Fixes and upgrades for the Appwrite Docs. +# "product / docs": +# - + +# Fixes and upgrades for the Appwrite Migrations. +"product / migrations": + - "(migrate|migration)" + +# Fixes and upgrades for the Appwrite Messaging. +"product / messaging": + - "(messaging|email|sms|push|provider|topic|target|notification)" + +# Fixes and upgrades for the Appwrite Platform. +# "product / platform": +# - + +# Fixes and upgrades for database relationships +"feature / relationships": + - "(relationship)" + +# Issues found only on Appwrite Cloud +# "product / cloud": +# - + +# Fixes and upgrades for the Appwrite VCS. +"product / vcs": + - "(repo|push|vcs|repository)" + +# Fixes and upgrades for the Appwrite GraphQL API. +"api / graphql": + - "(graphql|gql|mutation)" + +# Fixes and upgrades for the Appwrite Assistant. +"product / assistant": + - "(assistant)" + +# Fixes and upgrades for the Appwrite Domains. +"product / domains": + - "(domain|dns|ssl|certificate)" + +# Fixes and upgrades for the Appwrite Locale. +"product / locale": + - "(locale|i18n|internationalization|localization|l10n|translation|timezone|country)" + +# Fixes and upgrades for the Appwrite Avatars. +"product / avatars": + - "(avatar|initial|flag|icon)" + +# Fixes and upgrades for Appwrite Sites. +"product / sites": + - "(site|web|hosting|domain|ssl|certificate|nextjs|nuxt|react|angular|vue|svelte|astro)" + +# Fixes and upgrades for the Appwrite CLI. +"sdk / cli": + - "(cli|command line)" + +# Issues only found when self-hosting Appwrite +"product / self-hosted": + - "(self-host|self host)" diff --git a/.github/workflows/auto-label-issue.yml b/.github/workflows/auto-label-issue.yml new file mode 100644 index 0000000000..e0eb0de98d --- /dev/null +++ b/.github/workflows/auto-label-issue.yml @@ -0,0 +1,22 @@ +name: Auto Label Issue + +on: + issues: + types: [opened] + +permissions: + issues: write + contents: read + +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - name: Issue Labeler + uses: github/issue-labeler@v3.4 + with: + configuration-path: .github/labeler.yml + enable-versioned-regex: false + include-title: 1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 01586653a1a62c37123b38c1fd8f43d8a317d4c7 Mon Sep 17 00:00:00 2001 From: Veeresh <75656445+Veera-mulge@users.noreply.github.com> Date: Thu, 4 Sep 2025 20:36:03 +0530 Subject: [PATCH 04/58] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e0b5c5ab4b..89390515eb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> We just announced time helper queries for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-time-helper-queries) +> We just announced inversion queries for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-inversion-queries) > Appwrite Cloud is now Generally Available - [Learn more](https://appwrite.io/cloud-ga) From 95f49559d08eb50b06267f5cd3ee805336c50ed4 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 10 Sep 2025 12:43:37 +0300 Subject: [PATCH 05/58] add finally --- src/Appwrite/Platform/Workers/StatsResources.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index da8c086bf4..655ebfbd52 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -206,6 +206,8 @@ class StatsResources extends Action $this->writeDocuments($dbForLogs, $project); } catch (Throwable $th) { call_user_func_array($this->logError, [$th, "StatsResources", "count_for_project_{$project->getId()}"]); + } finally { + $this->documents = []; } Console::info('End of count for: ' . $project->getId()); From de9e177bc84cb5ddc1a31fb10ede3d5260161e6d Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 10 Sep 2025 17:23:33 +0300 Subject: [PATCH 06/58] sort and hardcode bachSize --- .../Platform/Workers/StatsResources.php | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index 655ebfbd52..d26f4c06f3 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -206,8 +206,6 @@ class StatsResources extends Action $this->writeDocuments($dbForLogs, $project); } catch (Throwable $th) { call_user_func_array($this->logError, [$th, "StatsResources", "count_for_project_{$project->getId()}"]); - } finally { - $this->documents = []; } Console::info('End of count for: ' . $project->getId()); @@ -436,18 +434,32 @@ class StatsResources extends Action { $message = 'Stats writeDocuments project: ' . $project->getId() . '(' . $project->getSequence() . ')'; + // sort by unique index key to make + usort($this->documents, function($a, $b) { + // metric DESC + $cmp = strcmp($b['metric'], $a['metric']); + if ($cmp !== 0) return $cmp; + + // period ASC + $cmp = strcmp($a['period'], $b['period']); + if ($cmp !== 0) return $cmp; + + // time ASC + if ($a['time'] === $b['time']) return 0; + return ($a['time'] < $b['time']) ? -1 : 1; + }); + try { $dbForLogs->createOrUpdateDocuments( 'stats', - $this->documents + $this->documents, + 10 // See if this make an effect ); Console::success($message . ' | Documents: ' . count($this->documents)); } catch (\Throwable $e) { Console::error('Error: ' . $message . ' | Exception: ' . $e->getMessage()); throw $e; - } finally { - $this->documents = []; } } } From 494fe274b08f3ee3e5c5856aa7598f251149c891 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 10 Sep 2025 17:43:37 +0300 Subject: [PATCH 07/58] sort as strings --- src/Appwrite/Platform/Workers/StatsResources.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index d26f4c06f3..932b5072f9 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -444,9 +444,8 @@ class StatsResources extends Action $cmp = strcmp($a['period'], $b['period']); if ($cmp !== 0) return $cmp; - // time ASC - if ($a['time'] === $b['time']) return 0; - return ($a['time'] < $b['time']) ? -1 : 1; + // time ASC (string comparison is fine) + return strcmp($a['time'], $b['time']); }); try { From b44051e0a2377a8a1647096adf3213cfea65e30f Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 10 Sep 2025 17:48:58 +0300 Subject: [PATCH 08/58] Respect time nulls --- src/Appwrite/Platform/Workers/StatsResources.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index 932b5072f9..f7ee999a94 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -434,7 +434,7 @@ class StatsResources extends Action { $message = 'Stats writeDocuments project: ' . $project->getId() . '(' . $project->getSequence() . ')'; - // sort by unique index key to make + // sort by unique index key reduce locks usort($this->documents, function($a, $b) { // metric DESC $cmp = strcmp($b['metric'], $a['metric']); @@ -444,10 +444,15 @@ class StatsResources extends Action $cmp = strcmp($a['period'], $b['period']); if ($cmp !== 0) return $cmp; - // time ASC (string comparison is fine) + // time ASC, NULLs first + if ($a['time'] === null && $b['time'] === null) return 0; + if ($a['time'] === null) return -1; + if ($b['time'] === null) return 1; + return strcmp($a['time'], $b['time']); }); +var_dump($this->documents); try { $dbForLogs->createOrUpdateDocuments( 'stats', From 6ed4590e0f2b522188fb85cf1b5e0e9c2e0fd248 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 10 Sep 2025 18:04:35 +0300 Subject: [PATCH 09/58] Respect time nulls --- .../Platform/Workers/StatsResources.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index f7ee999a94..daecabf16a 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -434,25 +434,26 @@ class StatsResources extends Action { $message = 'Stats writeDocuments project: ' . $project->getId() . '(' . $project->getSequence() . ')'; - // sort by unique index key reduce locks - usort($this->documents, function($a, $b) { - // metric DESC + /** + * sort by unique index key reduce locks/deadlocks + */ + usort($this->documents, function ($a, $b) { + // Metric DESC $cmp = strcmp($b['metric'], $a['metric']); if ($cmp !== 0) return $cmp; - // period ASC + // Period ASC $cmp = strcmp($a['period'], $b['period']); if ($cmp !== 0) return $cmp; - // time ASC, NULLs first - if ($a['time'] === null && $b['time'] === null) return 0; - if ($a['time'] === null) return -1; + // Time ASC, NULLs first + if ($a['time'] === null) return ($b['time'] === null) ? 0 : -1; if ($b['time'] === null) return 1; return strcmp($a['time'], $b['time']); }); -var_dump($this->documents); + var_dump($this->documents); try { $dbForLogs->createOrUpdateDocuments( 'stats', From a31190422a7b3be745d1114e8c86bba071dd7636 Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 11 Sep 2025 09:41:17 +0300 Subject: [PATCH 10/58] formatting --- .../Platform/Workers/StatsResources.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index daecabf16a..0c8f11c07b 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -440,25 +440,31 @@ class StatsResources extends Action usort($this->documents, function ($a, $b) { // Metric DESC $cmp = strcmp($b['metric'], $a['metric']); - if ($cmp !== 0) return $cmp; + if ($cmp !== 0) { + return $cmp; + } // Period ASC $cmp = strcmp($a['period'], $b['period']); - if ($cmp !== 0) return $cmp; + if ($cmp !== 0) { + return $cmp; + } // Time ASC, NULLs first - if ($a['time'] === null) return ($b['time'] === null) ? 0 : -1; - if ($b['time'] === null) return 1; + if ($a['time'] === null) { + return ($b['time'] === null) ? 0 : -1; + } + if ($b['time'] === null) { + return 1; + } return strcmp($a['time'], $b['time']); }); - var_dump($this->documents); try { $dbForLogs->createOrUpdateDocuments( 'stats', $this->documents, - 10 // See if this make an effect ); Console::success($message . ' | Documents: ' . count($this->documents)); From 5740eb89012d474142c25646eed696ba3f55441a Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 11 Sep 2025 10:04:42 +0300 Subject: [PATCH 11/58] Add sorting --- src/Appwrite/Platform/Workers/StatsUsage.php | 64 ++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/src/Appwrite/Platform/Workers/StatsUsage.php b/src/Appwrite/Platform/Workers/StatsUsage.php index 3610381d5a..991fed633a 100644 --- a/src/Appwrite/Platform/Workers/StatsUsage.php +++ b/src/Appwrite/Platform/Workers/StatsUsage.php @@ -424,6 +424,34 @@ class StatsUsage extends Action try { $dbForProject = $getProjectDB($projectStats['project']); Console::log('Processing batch with ' . count($projectStats['stats']) . ' stats'); + + /** + * Sort by unique index key reduce locks/deadlocks + */ + usort($projectStats['stats'], function ($a, $b) { + // Metric DESC + $cmp = strcmp($b['metric'], $a['metric']); + if ($cmp !== 0) { + return $cmp; + } + + // Period ASC + $cmp = strcmp($a['period'], $b['period']); + if ($cmp !== 0) { + return $cmp; + } + + // Time ASC, NULLs first + if ($a['time'] === null) { + return ($b['time'] === null) ? 0 : -1; + } + if ($b['time'] === null) { + return 1; + } + + return strcmp($a['time'], $b['time']); + }); + $dbForProject->createOrUpdateDocumentsWithIncrease('stats', 'value', $projectStats['stats']); Console::success('Batch successfully written to DB'); @@ -468,6 +496,42 @@ class StatsUsage extends Action try { Console::log('Processing batch with ' . count($this->statDocuments) . ' stats'); + + /** + * Sort by UNIQUE KEY "_key_metric_period_time" ("_tenant","metric" DESC,"period","time") + * Here we sort by _tenant as well because of setTenantPerDocument + */ + + usort($this->statDocuments, function ($a, $b) { + // Tenant ASC + $cmp = $a['_tenant'] <=> $b['_tenant']; + if ($cmp !== 0) { + return $cmp; + } + + // Metric DESC + $cmp = strcmp($b['metric'], $a['metric']); + if ($cmp !== 0) { + return $cmp; + } + + // Period ASC + $cmp = strcmp($a['period'], $b['period']); + if ($cmp !== 0) { + return $cmp; + } + + // Time ASC, NULLs first + if ($a['time'] === null) { + return ($b['time'] === null) ? 0 : -1; + } + if ($b['time'] === null) { + return 1; + } + + return strcmp($a['time'], $b['time']); + }); + $dbForLogs->createOrUpdateDocumentsWithIncrease( 'stats', 'value', From 84aaaf810f7716e1cf983c0b87f25eaf0aa7cadd Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 11 Sep 2025 10:07:45 +0300 Subject: [PATCH 12/58] Question --- src/Appwrite/Platform/Workers/StatsUsage.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/StatsUsage.php b/src/Appwrite/Platform/Workers/StatsUsage.php index 991fed633a..ba72f7f30c 100644 --- a/src/Appwrite/Platform/Workers/StatsUsage.php +++ b/src/Appwrite/Platform/Workers/StatsUsage.php @@ -454,10 +454,10 @@ class StatsUsage extends Action $dbForProject->createOrUpdateDocumentsWithIncrease('stats', 'value', $projectStats['stats']); Console::success('Batch successfully written to DB'); - - unset($this->projects[$sequence]); } catch (Throwable $e) { Console::error('Error processing stats: ' . $e->getMessage()); + } finally { + unset($this->projects[$sequence]); } } @@ -538,6 +538,11 @@ class StatsUsage extends Action $this->statDocuments ); Console::success('Usage logs pushed to Logs DB'); + + /** + * todo: Do we need to unset $this->statDocuments? + */ + } catch (Throwable $th) { Console::error($th->getMessage()); } From e673d405d685b52e544817aceca57b6c7e8779b4 Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 11 Sep 2025 10:14:16 +0300 Subject: [PATCH 13/58] formatting? --- src/Appwrite/Platform/Workers/StatsUsage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/StatsUsage.php b/src/Appwrite/Platform/Workers/StatsUsage.php index ba72f7f30c..9d998d05bc 100644 --- a/src/Appwrite/Platform/Workers/StatsUsage.php +++ b/src/Appwrite/Platform/Workers/StatsUsage.php @@ -538,7 +538,7 @@ class StatsUsage extends Action $this->statDocuments ); Console::success('Usage logs pushed to Logs DB'); - + /** * todo: Do we need to unset $this->statDocuments? */ From ef3d38c5a65fb0bbbfd209238587092c43b3023d Mon Sep 17 00:00:00 2001 From: Divyansha Dubey Date: Fri, 12 Sep 2025 17:48:15 +0400 Subject: [PATCH 14/58] fixed db stats env var --- .../Platform/Modules/Databases/Http/Databases/Usage/Get.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index 4770d727a0..c9de9d5217 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -77,8 +77,8 @@ class Get extends Action str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_COLLECTIONS), str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_DOCUMENTS), str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_STORAGE), - str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASES_OPERATIONS_READS), - str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASES_OPERATIONS_WRITES) + str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), + str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES) ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { From f9ac0b48c8fc92c03895a65dc2ca257ef21bb449 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 10:28:34 +0530 Subject: [PATCH 15/58] fix: use 1.8.x --- app/config/specs/open-api3-1.8.x-client.json | 15 +- app/config/specs/open-api3-1.8.x-console.json | 188 ++++++++++++++++-- app/config/specs/open-api3-1.8.x-server.json | 163 +++++++++++++-- app/config/specs/open-api3-latest-client.json | 15 +- .../specs/open-api3-latest-console.json | 188 ++++++++++++++++-- app/config/specs/open-api3-latest-server.json | 163 +++++++++++++-- app/config/specs/swagger2-1.8.x-client.json | 15 +- app/config/specs/swagger2-1.8.x-console.json | 188 ++++++++++++++++-- app/config/specs/swagger2-1.8.x-server.json | 163 +++++++++++++-- app/config/specs/swagger2-latest-client.json | 15 +- app/config/specs/swagger2-latest-console.json | 188 ++++++++++++++++-- app/config/specs/swagger2-latest-server.json | 163 +++++++++++++-- .../SDK/Specification/Format/OpenAPI3.php | 11 + .../SDK/Specification/Format/Swagger2.php | 11 + src/Appwrite/Utopia/Response/Model.php | 1 + .../Utopia/Response/Model/Attribute.php | 3 +- .../Utopia/Response/Model/Deployment.php | 3 +- .../Utopia/Response/Model/Execution.php | 6 +- .../Utopia/Response/Model/HealthAntivirus.php | 3 +- .../Utopia/Response/Model/HealthStatus.php | 3 +- src/Appwrite/Utopia/Response/Model/Index.php | 3 +- .../Utopia/Response/Model/Platform.php | 3 +- src/Appwrite/Utopia/Response/Model/Rule.php | 6 +- 23 files changed, 1335 insertions(+), 182 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index d226fcc4e1..aabc7d66fb 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -11393,12 +11393,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 02d97fffc7..1e3a876192 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -46461,7 +46461,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46549,7 +46556,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46639,7 +46653,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46729,7 +46750,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46802,7 +46830,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46882,7 +46917,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46972,7 +47014,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47052,7 +47101,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47132,7 +47188,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47212,7 +47275,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47320,7 +47390,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47399,7 +47476,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47490,7 +47574,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48965,7 +49056,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52191,7 +52289,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52356,12 +52461,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -53312,7 +53428,16 @@ "type": { "type": "string", "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "ios", + "android", + "unity" + ] }, "key": { "type": "string", @@ -53614,7 +53739,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53662,7 +53792,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ @@ -55827,7 +55961,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55842,7 +55980,13 @@ "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 09d53dbdf0..af0ca8f886 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -35331,7 +35331,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35419,7 +35426,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35509,7 +35523,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35599,7 +35620,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35672,7 +35700,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35752,7 +35787,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35842,7 +35884,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35922,7 +35971,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36002,7 +36058,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36082,7 +36145,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36190,7 +36260,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36269,7 +36346,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36360,7 +36444,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37835,7 +37926,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40272,7 +40370,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40437,12 +40542,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40811,7 +40927,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40859,7 +40980,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index d226fcc4e1..aabc7d66fb 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -11393,12 +11393,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 02d97fffc7..1e3a876192 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -46461,7 +46461,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46549,7 +46556,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46639,7 +46653,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46729,7 +46750,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46802,7 +46830,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46882,7 +46917,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46972,7 +47014,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47052,7 +47101,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47132,7 +47188,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47212,7 +47275,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47320,7 +47390,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47399,7 +47476,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47490,7 +47574,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48965,7 +49056,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52191,7 +52289,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52356,12 +52461,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -53312,7 +53428,16 @@ "type": { "type": "string", "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "ios", + "android", + "unity" + ] }, "key": { "type": "string", @@ -53614,7 +53739,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53662,7 +53792,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ @@ -55827,7 +55961,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55842,7 +55980,13 @@ "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 09d53dbdf0..af0ca8f886 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -35331,7 +35331,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35419,7 +35426,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35509,7 +35523,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35599,7 +35620,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35672,7 +35700,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35752,7 +35787,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35842,7 +35884,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35922,7 +35971,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36002,7 +36058,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36082,7 +36145,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36190,7 +36260,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36269,7 +36346,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36360,7 +36444,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37835,7 +37926,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40272,7 +40370,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40437,12 +40542,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40811,7 +40927,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40859,7 +40980,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 55911e9556..61428740c1 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -11392,12 +11392,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 6d5721c73b..4f7abe599c 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -46398,7 +46398,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46486,7 +46493,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46576,7 +46590,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46666,7 +46687,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46739,7 +46767,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46819,7 +46854,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46909,7 +46951,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46989,7 +47038,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47069,7 +47125,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47149,7 +47212,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47257,7 +47327,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47336,7 +47413,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47427,7 +47511,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48903,7 +48994,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52139,7 +52237,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52304,12 +52409,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -53268,7 +53384,16 @@ "type": { "type": "string", "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "ios", + "android", + "unity" + ] }, "key": { "type": "string", @@ -53570,7 +53695,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53618,7 +53748,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ @@ -55874,7 +56008,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55889,7 +56027,13 @@ "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 98077f1050..10f1fb323d 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -35359,7 +35359,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35447,7 +35454,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35537,7 +35551,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35627,7 +35648,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35700,7 +35728,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35780,7 +35815,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35870,7 +35912,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35950,7 +35999,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36030,7 +36086,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36110,7 +36173,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36218,7 +36288,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36297,7 +36374,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36388,7 +36472,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37864,7 +37955,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40307,7 +40405,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40472,12 +40577,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40848,7 +40964,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40896,7 +41017,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 55911e9556..61428740c1 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -11392,12 +11392,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 6d5721c73b..4f7abe599c 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -46398,7 +46398,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46486,7 +46493,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46576,7 +46590,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46666,7 +46687,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46739,7 +46767,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46819,7 +46854,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46909,7 +46951,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46989,7 +47038,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47069,7 +47125,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47149,7 +47212,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47257,7 +47327,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47336,7 +47413,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47427,7 +47511,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48903,7 +48994,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52139,7 +52237,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52304,12 +52409,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -53268,7 +53384,16 @@ "type": { "type": "string", "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "ios", + "android", + "unity" + ] }, "key": { "type": "string", @@ -53570,7 +53695,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53618,7 +53748,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ @@ -55874,7 +56008,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55889,7 +56027,13 @@ "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 98077f1050..10f1fb323d 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -35359,7 +35359,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35447,7 +35454,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35537,7 +35551,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35627,7 +35648,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35700,7 +35728,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35780,7 +35815,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35870,7 +35912,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35950,7 +35999,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36030,7 +36086,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36110,7 +36173,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36218,7 +36288,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36297,7 +36374,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36388,7 +36472,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37864,7 +37955,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40307,7 +40405,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40472,12 +40577,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40848,7 +40964,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40896,7 +41017,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index c9c2135ab3..c11e55e733 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -682,6 +682,10 @@ class OpenAPI3 extends Format $type = 'string'; break; + case 'enum': + $type = 'string'; + break; + case 'json': $type = 'object'; $output['components']['schemas'][$model->getType()]['properties'][$name]['additionalProperties'] = true; @@ -770,6 +774,13 @@ class OpenAPI3 extends Format if ($items) { $output['components']['schemas'][$model->getType()]['properties'][$name]['items'] = $items; } + if ($rule['type'] === 'enum' && !empty($rule['enum'])) { + if ($rule['array']) { + $output['components']['schemas'][$model->getType()]['properties'][$name]['items']['enum'] = $rule['enum']; + } else { + $output['components']['schemas'][$model->getType()]['properties'][$name]['enum'] = $rule['enum']; + } + } if (!in_array($name, $required)) { $output['components']['schemas'][$model->getType()]['properties'][$name]['nullable'] = true; } diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index a923f40ffa..4e784e8116 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -690,6 +690,10 @@ class Swagger2 extends Format $type = 'string'; break; + case 'enum': + $type = 'string'; + break; + case 'json': $type = 'object'; break; @@ -792,6 +796,13 @@ class Swagger2 extends Format if ($items) { $output['definitions'][$model->getType()]['properties'][$name]['items'] = $items; } + if ($rule['type'] === 'enum' && !empty($rule['enum'])) { + if ($rule['array']) { + $output['definitions'][$model->getType()]['properties'][$name]['items']['enum'] = $rule['enum']; + } else { + $output['definitions'][$model->getType()]['properties'][$name]['enum'] = $rule['enum']; + } + } if (!in_array($name, $required)) { $output['definitions'][$model->getType()]['properties'][$name]['x-nullable'] = true; } diff --git a/src/Appwrite/Utopia/Response/Model.php b/src/Appwrite/Utopia/Response/Model.php index 04468521b6..59c786ee1f 100644 --- a/src/Appwrite/Utopia/Response/Model.php +++ b/src/Appwrite/Utopia/Response/Model.php @@ -16,6 +16,7 @@ abstract class Model public const TYPE_RELATIONSHIP = 'relationship'; public const TYPE_PAYLOAD = 'payload'; public const TYPE_ARRAY = 'array'; + public const TYPE_ENUM = 'enum'; /** * @var bool diff --git a/src/Appwrite/Utopia/Response/Model/Attribute.php b/src/Appwrite/Utopia/Response/Model/Attribute.php index 8c43f8d21c..35de6bacc5 100644 --- a/src/Appwrite/Utopia/Response/Model/Attribute.php +++ b/src/Appwrite/Utopia/Response/Model/Attribute.php @@ -23,10 +23,11 @@ class Attribute extends Model 'example' => 'string', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', 'default' => '', 'example' => 'available', + 'enum' => ['available', 'processing', 'deleting', 'stuck', 'failed'], ]) ->addRule('error', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Deployment.php b/src/Appwrite/Utopia/Response/Model/Deployment.php index 55c1589af0..45699f65d1 100644 --- a/src/Appwrite/Utopia/Response/Model/Deployment.php +++ b/src/Appwrite/Utopia/Response/Model/Deployment.php @@ -95,10 +95,11 @@ class Deployment extends Model 'example' => '5e5ea5c16897e', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'The deployment status. Possible values are "waiting", "processing", "building", "ready", and "failed".', 'default' => '', 'example' => 'ready', + 'enum' => ['waiting', 'processing', 'building', 'ready', 'failed'], ]) ->addRule('buildLogs', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index 39d2203bf9..f8e62fe824 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -52,16 +52,18 @@ class Execution extends Model 'example' => '5e5ea5c16897e', ]) ->addRule('trigger', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.', 'default' => '', 'example' => 'http', + 'enum' => ['http', 'schedule', 'event'], ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.', 'default' => '', 'example' => 'processing', + 'enum' => ['waiting', 'processing', 'completed', 'failed'], ]) ->addRule('requestMethod', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php b/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php index 7a74195371..d790dbc24c 100644 --- a/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php +++ b/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php @@ -17,10 +17,11 @@ class HealthAntivirus extends Model 'example' => '1.0.0', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Antivirus status. Possible values can are: `disabled`, `offline`, `online`', 'default' => '', 'example' => 'online', + 'enum' => ['disabled', 'offline', 'online'], ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/HealthStatus.php b/src/Appwrite/Utopia/Response/Model/HealthStatus.php index ba340107ac..89438c83f2 100644 --- a/src/Appwrite/Utopia/Response/Model/HealthStatus.php +++ b/src/Appwrite/Utopia/Response/Model/HealthStatus.php @@ -23,10 +23,11 @@ class HealthStatus extends Model 'example' => 128, ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Service status. Possible values can are: `pass`, `fail`', 'default' => '', 'example' => 'pass', + 'enum' => ['pass', 'fail'], ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/Index.php b/src/Appwrite/Utopia/Response/Model/Index.php index 62661738c2..5a4d606408 100644 --- a/src/Appwrite/Utopia/Response/Model/Index.php +++ b/src/Appwrite/Utopia/Response/Model/Index.php @@ -41,10 +41,11 @@ class Index extends Model 'example' => 'primary', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', 'default' => '', 'example' => 'available', + 'enum' => ['available', 'processing', 'deleting', 'stuck', 'failed'], ]) ->addRule('error', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Platform.php b/src/Appwrite/Utopia/Response/Model/Platform.php index 4b8ffb1486..5fc68ee808 100644 --- a/src/Appwrite/Utopia/Response/Model/Platform.php +++ b/src/Appwrite/Utopia/Response/Model/Platform.php @@ -40,10 +40,11 @@ class Platform extends Model 'example' => 'My Web App', ]) ->addRule('type', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.', 'default' => '', 'example' => 'web', + 'enum' => ['web', 'flutter-web', 'flutter-ios', 'flutter-android', 'ios', 'android', 'unity'], ]) ->addRule('key', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Rule.php b/src/Appwrite/Utopia/Response/Model/Rule.php index 12903b270e..67ba5db94d 100644 --- a/src/Appwrite/Utopia/Response/Model/Rule.php +++ b/src/Appwrite/Utopia/Response/Model/Rule.php @@ -65,10 +65,11 @@ class Rule extends Model 'example' => 'n3u9feiwmf', ]) ->addRule('deploymentResourceType', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Type of deployment. Possible values are "function", "site". Used if rule\'s type is "deployment".', 'default' => '', 'example' => 'function', + 'enum' => ['function', 'site'], ]) ->addRule('deploymentResourceId', [ 'type' => self::TYPE_STRING, @@ -83,10 +84,11 @@ class Rule extends Model 'example' => 'function', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Domain verification status. Possible values are "created", "verifying", "verified" and "unverified"', 'default' => false, 'example' => 'verified', + 'enum' => ['created', 'verifying', 'verified', 'unverified'], ]) ->addRule('logs', [ 'type' => self::TYPE_STRING, From 0f5cb2611d15b3d43d2ce8e0a9c76456a34bd6b1 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 10:32:06 +0530 Subject: [PATCH 16/58] fix: grammer --- app/config/specs/open-api3-1.8.x-console.json | 4 ++-- app/config/specs/open-api3-1.8.x-server.json | 4 ++-- app/config/specs/open-api3-latest-console.json | 4 ++-- app/config/specs/open-api3-latest-server.json | 4 ++-- app/config/specs/swagger2-1.8.x-console.json | 4 ++-- app/config/specs/swagger2-1.8.x-server.json | 4 ++-- app/config/specs/swagger2-latest-console.json | 4 ++-- app/config/specs/swagger2-latest-server.json | 4 ++-- src/Appwrite/Utopia/Response/Model/HealthAntivirus.php | 2 +- src/Appwrite/Utopia/Response/Model/HealthStatus.php | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 1e3a876192..f72da9c18a 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -53738,7 +53738,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -53791,7 +53791,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index af0ca8f886..926b3fa59f 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -40926,7 +40926,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -40979,7 +40979,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 1e3a876192..f72da9c18a 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -53738,7 +53738,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -53791,7 +53791,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index af0ca8f886..926b3fa59f 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -40926,7 +40926,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -40979,7 +40979,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 4f7abe599c..cd6c104c6e 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -53694,7 +53694,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -53747,7 +53747,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 10f1fb323d..f913753279 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -40963,7 +40963,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -41016,7 +41016,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 4f7abe599c..cd6c104c6e 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -53694,7 +53694,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -53747,7 +53747,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 10f1fb323d..f913753279 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -40963,7 +40963,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -41016,7 +41016,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php b/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php index d790dbc24c..29bd420ce5 100644 --- a/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php +++ b/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php @@ -18,7 +18,7 @@ class HealthAntivirus extends Model ]) ->addRule('status', [ 'type' => self::TYPE_ENUM, - 'description' => 'Antivirus status. Possible values can are: `disabled`, `offline`, `online`', + 'description' => 'Antivirus status. Possible values are: `disabled`, `offline`, `online`', 'default' => '', 'example' => 'online', 'enum' => ['disabled', 'offline', 'online'], diff --git a/src/Appwrite/Utopia/Response/Model/HealthStatus.php b/src/Appwrite/Utopia/Response/Model/HealthStatus.php index 89438c83f2..24fb8766ce 100644 --- a/src/Appwrite/Utopia/Response/Model/HealthStatus.php +++ b/src/Appwrite/Utopia/Response/Model/HealthStatus.php @@ -24,7 +24,7 @@ class HealthStatus extends Model ]) ->addRule('status', [ 'type' => self::TYPE_ENUM, - 'description' => 'Service status. Possible values can are: `pass`, `fail`', + 'description' => 'Service status. Possible values are: `pass`, `fail`', 'default' => '', 'example' => 'pass', 'enum' => ['pass', 'fail'], From 40eaf39d91dd6992b8957d67d9516715af575903 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 11:39:00 +0530 Subject: [PATCH 17/58] fix: graphql --- src/Appwrite/GraphQL/Types/Mapper.php | 31 ++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index f0394b2395..22a2c91d7e 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -6,6 +6,7 @@ use Appwrite\GraphQL\Resolvers; use Appwrite\GraphQL\Types; use Appwrite\SDK\Method; use Exception; +use GraphQL\Type\Definition\EnumType; use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; use GraphQL\Type\Definition\UnionType; @@ -58,7 +59,8 @@ class Mapper 'json' => Types::json(), 'none' => Types::json(), 'any' => Types::json(), - 'array' => Types::json() + 'array' => Types::json(), + 'enum' => Type::string() ]; foreach ($defaults as $type => $default) { @@ -213,6 +215,8 @@ class Mapper if (\is_array($rule['type'])) { $type = self::getUnionType($escapedKey, $rule); + } elseif ($rule['type'] === 'enum' && !empty($rule['enum'])) { + $type = self::createEnumType($rule, $escapedKey); } else { $type = self::getObjectType($rule); } @@ -387,6 +391,30 @@ class Mapper return $type; } + private static function createEnumType(array $rule, string $fieldName): Type + { + $enumTypeName = \ucfirst($fieldName) . 'Enum'; + + if (Registry::has($enumTypeName)) { + return Registry::get($enumTypeName); + } + + $values = []; + foreach ($rule['enum'] as $enumValue) { + $values[\strtoupper(\str_replace(['-', ' ', '.'], '_', $enumValue))] = [ + 'value' => $enumValue + ]; + } + + $enumType = new EnumType([ + 'name' => $enumTypeName, + 'values' => $values + ]); + + Registry::set($enumTypeName, $enumType); + return $enumType; + } + private static function getObjectType(array $rule): Type { $type = $rule['type']; @@ -460,6 +488,7 @@ class Mapper 'point' => static::model("{$prefix}Point"), 'linestring' => static::model("{$prefix}Line"), 'polygon' => static::model("{$prefix}Polygon"), + 'enum' => static::model("{$prefix}Enum"), default => throw new Exception('Unknown ' . strtolower($prefix) . ' implementation'), }; } From 579f6691f9111047263fa2246e6c17aa1fabf9f4 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 11:42:23 +0530 Subject: [PATCH 18/58] fix: default to be created --- src/Appwrite/Utopia/Response/Model/Rule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Model/Rule.php b/src/Appwrite/Utopia/Response/Model/Rule.php index 67ba5db94d..7974bc7f98 100644 --- a/src/Appwrite/Utopia/Response/Model/Rule.php +++ b/src/Appwrite/Utopia/Response/Model/Rule.php @@ -86,7 +86,7 @@ class Rule extends Model ->addRule('status', [ 'type' => self::TYPE_ENUM, 'description' => 'Domain verification status. Possible values are "created", "verifying", "verified" and "unverified"', - 'default' => false, + 'default' => 'created', 'example' => 'verified', 'enum' => ['created', 'verifying', 'verified', 'unverified'], ]) From ef69520f95d0469bf83532208119d8c210ac2157 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 11:51:47 +0530 Subject: [PATCH 19/58] fix: nitpick comments --- app/config/specs/open-api3-1.8.x-client.json | 2 +- app/config/specs/open-api3-1.8.x-console.json | 24 +++++++++---------- app/config/specs/open-api3-1.8.x-server.json | 16 ++++++------- app/config/specs/open-api3-latest-client.json | 2 +- .../specs/open-api3-latest-console.json | 24 +++++++++---------- app/config/specs/open-api3-latest-server.json | 16 ++++++------- app/config/specs/swagger2-1.8.x-client.json | 2 +- app/config/specs/swagger2-1.8.x-console.json | 24 +++++++++---------- app/config/specs/swagger2-1.8.x-server.json | 16 ++++++------- app/config/specs/swagger2-latest-client.json | 2 +- app/config/specs/swagger2-latest-console.json | 24 +++++++++---------- app/config/specs/swagger2-latest-server.json | 16 ++++++------- .../Utopia/Response/Model/Deployment.php | 6 ----- .../Utopia/Response/Model/Execution.php | 2 +- .../Utopia/Response/Model/Platform.php | 2 +- src/Appwrite/Utopia/Response/Model/Rule.php | 4 ++-- 16 files changed, 88 insertions(+), 94 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index aabc7d66fb..d57b9f83b2 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -11423,7 +11423,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index f72da9c18a..1dd58c3261 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -52324,11 +52324,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52354,6 +52349,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52381,12 +52381,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52410,12 +52410,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52491,7 +52491,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, @@ -53452,7 +53452,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53485,7 +53485,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -55975,7 +55975,7 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", @@ -56028,7 +56028,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 926b3fa59f..b437d56bfc 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -40405,11 +40405,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40435,6 +40430,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40462,12 +40462,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40491,12 +40491,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40572,7 +40572,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index aabc7d66fb..d57b9f83b2 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -11423,7 +11423,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index f72da9c18a..1dd58c3261 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -52324,11 +52324,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52354,6 +52349,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52381,12 +52381,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52410,12 +52410,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52491,7 +52491,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, @@ -53452,7 +53452,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53485,7 +53485,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -55975,7 +55975,7 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", @@ -56028,7 +56028,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 926b3fa59f..b437d56bfc 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -40405,11 +40405,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40435,6 +40430,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40462,12 +40462,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40491,12 +40491,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40572,7 +40572,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 61428740c1..c2628533d0 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -11422,7 +11422,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index cd6c104c6e..0f91a5433d 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -52272,11 +52272,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52302,6 +52297,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52329,12 +52329,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52358,12 +52358,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52439,7 +52439,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" @@ -53408,7 +53408,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53441,7 +53441,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -56022,7 +56022,7 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", @@ -56075,7 +56075,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index f913753279..679da75e5d 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -40440,11 +40440,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40470,6 +40465,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40497,12 +40497,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40526,12 +40526,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40607,7 +40607,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 61428740c1..c2628533d0 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -11422,7 +11422,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index cd6c104c6e..0f91a5433d 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -52272,11 +52272,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52302,6 +52297,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52329,12 +52329,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52358,12 +52358,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52439,7 +52439,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" @@ -53408,7 +53408,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53441,7 +53441,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -56022,7 +56022,7 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", @@ -56075,7 +56075,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index f913753279..679da75e5d 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -40440,11 +40440,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40470,6 +40465,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40497,12 +40497,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40526,12 +40526,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40607,7 +40607,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" diff --git a/src/Appwrite/Utopia/Response/Model/Deployment.php b/src/Appwrite/Utopia/Response/Model/Deployment.php index 45699f65d1..f0815630b3 100644 --- a/src/Appwrite/Utopia/Response/Model/Deployment.php +++ b/src/Appwrite/Utopia/Response/Model/Deployment.php @@ -131,12 +131,6 @@ class Deployment extends Model 'default' => '', 'example' => 'https://github.com/vermakhushboo/g4-node-function', ]) - ->addRule('providerBranch', [ - 'type' => self::TYPE_STRING, - 'description' => 'The branch name of the vcs provider repository', - 'default' => '', - 'example' => 'main', - ]) ->addRule('providerCommitHash', [ 'type' => self::TYPE_STRING, 'description' => 'The commit hash of the vcs commit', diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index f8e62fe824..f8ee32aa6e 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -79,7 +79,7 @@ class Execution extends Model ]) ->addRule('requestHeaders', [ 'type' => Response::MODEL_HEADERS, - 'description' => 'HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.', + 'description' => 'HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.', 'default' => [], 'example' => [['Content-Type' => 'application/json']], 'array' => true, diff --git a/src/Appwrite/Utopia/Response/Model/Platform.php b/src/Appwrite/Utopia/Response/Model/Platform.php index 5fc68ee808..65f3c343d4 100644 --- a/src/Appwrite/Utopia/Response/Model/Platform.php +++ b/src/Appwrite/Utopia/Response/Model/Platform.php @@ -61,7 +61,7 @@ class Platform extends Model 'type' => self::TYPE_STRING, 'description' => 'Web app hostname. Empty string for other platforms.', 'default' => '', - 'example' => true, + 'example' => 'app.example.com', ]) ->addRule('httpUser', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Rule.php b/src/Appwrite/Utopia/Response/Model/Rule.php index 7974bc7f98..d4b8ffd9e7 100644 --- a/src/Appwrite/Utopia/Response/Model/Rule.php +++ b/src/Appwrite/Utopia/Response/Model/Rule.php @@ -55,7 +55,7 @@ class Rule extends Model ->addRule('redirectStatusCode', [ 'type' => self::TYPE_INTEGER, 'description' => 'Status code to apply during redirect. Used if type is "redirect"', - 'default' => '', + 'default' => 301, 'example' => 301, ]) ->addRule('deploymentId', [ @@ -81,7 +81,7 @@ class Rule extends Model 'type' => self::TYPE_STRING, 'description' => 'Name of Git branch that updates rule. Used if type is "deployment"', 'default' => '', - 'example' => 'function', + 'example' => 'main', ]) ->addRule('status', [ 'type' => self::TYPE_ENUM, From 1f9bc650de2cdd2c8f17f0f6a0b841c9456839c0 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 12:13:48 +0530 Subject: [PATCH 20/58] work in progress --- src/Appwrite/GraphQL/Types/Mapper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index 22a2c91d7e..c6df475480 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -216,7 +216,7 @@ class Mapper if (\is_array($rule['type'])) { $type = self::getUnionType($escapedKey, $rule); } elseif ($rule['type'] === 'enum' && !empty($rule['enum'])) { - $type = self::createEnumType($rule, $escapedKey); + $type = self::getEnumType($escapedKey, $rule); } else { $type = self::getObjectType($rule); } @@ -391,9 +391,9 @@ class Mapper return $type; } - private static function createEnumType(array $rule, string $fieldName): Type + private static function getEnumType(string $name, array $rule): Type { - $enumTypeName = \ucfirst($fieldName) . 'Enum'; + $enumTypeName = \ucfirst($name) . 'Enum'; if (Registry::has($enumTypeName)) { return Registry::get($enumTypeName); From 31ed7264099c29dbb3c2646f12940a1b8dcc59c5 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 16 Sep 2025 09:48:17 +0530 Subject: [PATCH 21/58] keep graphql backwards --- src/Appwrite/GraphQL/Types/Mapper.php | 29 +-------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index c6df475480..b74e2a7549 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -6,7 +6,6 @@ use Appwrite\GraphQL\Resolvers; use Appwrite\GraphQL\Types; use Appwrite\SDK\Method; use Exception; -use GraphQL\Type\Definition\EnumType; use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; use GraphQL\Type\Definition\UnionType; @@ -215,8 +214,6 @@ class Mapper if (\is_array($rule['type'])) { $type = self::getUnionType($escapedKey, $rule); - } elseif ($rule['type'] === 'enum' && !empty($rule['enum'])) { - $type = self::getEnumType($escapedKey, $rule); } else { $type = self::getObjectType($rule); } @@ -391,30 +388,6 @@ class Mapper return $type; } - private static function getEnumType(string $name, array $rule): Type - { - $enumTypeName = \ucfirst($name) . 'Enum'; - - if (Registry::has($enumTypeName)) { - return Registry::get($enumTypeName); - } - - $values = []; - foreach ($rule['enum'] as $enumValue) { - $values[\strtoupper(\str_replace(['-', ' ', '.'], '_', $enumValue))] = [ - 'value' => $enumValue - ]; - } - - $enumType = new EnumType([ - 'name' => $enumTypeName, - 'values' => $values - ]); - - Registry::set($enumTypeName, $enumType); - return $enumType; - } - private static function getObjectType(array $rule): Type { $type = $rule['type']; @@ -480,6 +453,7 @@ class Mapper 'ip' => static::model("{$prefix}Ip"), default => static::model("{$prefix}String"), }, + 'enum' => static::model("{$prefix}String"), // TODO: Add enum type (breaking change if added) 'integer' => static::model("{$prefix}Integer"), 'double' => static::model("{$prefix}Float"), 'boolean' => static::model("{$prefix}Boolean"), @@ -488,7 +462,6 @@ class Mapper 'point' => static::model("{$prefix}Point"), 'linestring' => static::model("{$prefix}Line"), 'polygon' => static::model("{$prefix}Polygon"), - 'enum' => static::model("{$prefix}Enum"), default => throw new Exception('Unknown ' . strtolower($prefix) . ' implementation'), }; } From 081e2aeb6e1ce80006f1cd24b4cf737f1e9a8367 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 16 Sep 2025 17:51:22 +1200 Subject: [PATCH 22/58] Throw appropriate 400s from request filters --- src/Appwrite/Utopia/Request/Filters/V16.php | 2 - src/Appwrite/Utopia/Request/Filters/V17.php | 54 +++++++++++++-------- src/Appwrite/Utopia/Request/Filters/V20.php | 35 ++++++++----- 3 files changed, 59 insertions(+), 32 deletions(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V16.php b/src/Appwrite/Utopia/Request/Filters/V16.php index 51b05359b3..55db1f4756 100644 --- a/src/Appwrite/Utopia/Request/Filters/V16.php +++ b/src/Appwrite/Utopia/Request/Filters/V16.php @@ -11,8 +11,6 @@ class V16 extends Filter { switch ($model) { case 'functions.create': - $content['commands'] = $this->getCommands($content['runtime'] ?? ''); - break; case 'functions.update': $content['commands'] = $this->getCommands($content['runtime'] ?? ''); break; diff --git a/src/Appwrite/Utopia/Request/Filters/V17.php b/src/Appwrite/Utopia/Request/Filters/V17.php index 83ec62a168..2cdf3973b2 100644 --- a/src/Appwrite/Utopia/Request/Filters/V17.php +++ b/src/Appwrite/Utopia/Request/Filters/V17.php @@ -2,6 +2,7 @@ namespace Appwrite\Utopia\Request\Filters; +use Appwrite\Extend\Exception; use Appwrite\Utopia\Request\Filter; use Utopia\Database\Query; @@ -67,9 +68,9 @@ class V17 extends Filter foreach ($content['queries'] as $query) { try { $query = $this->parseQuery($query); - $parsed[] = json_encode(array_filter($query->toArray())); + $parsed[] = \json_encode(\array_filter($query->toArray())); } catch (\Throwable $th) { - throw new \Exception("Invalid query: {$query}", previous: $th); + throw new Exception(Exception::GENERAL_QUERY_INVALID, $th->getMessage()); } } @@ -83,6 +84,7 @@ class V17 extends Filter { // Init empty vars we fill later $method = ''; + $attribute = null; $params = []; // Separate method from filter @@ -92,7 +94,7 @@ class V17 extends Filter throw new \Exception('Invalid query'); } - $method = mb_substr($filter, 0, $paramsStart); + $method = \mb_substr($filter, 0, $paramsStart); // Separate params from filter $paramsEnd = \strlen($filter) - 1; // -1 to ignore ) @@ -103,14 +105,13 @@ class V17 extends Filter throw new \Exception('Invalid query method'); } - $currentParam = ""; // We build param here before pushing when it's ended + $currentParam = ''; // We build param here before pushing when it's ended $currentArrayParam = []; // We build array param here before pushing when it's ended $stack = []; // State for stack of parentheses $stackCount = 0; // Length of stack array. Kept as variable to improve performance $stringStackState = null; // State for string support - // Loop thorough all characters for ($i = $parametersStart; $i < $paramsEnd; $i++) { $char = $filter[$i]; @@ -135,20 +136,25 @@ class V17 extends Filter ($filter[$i - 1] !== static::CHAR_BACKSLASH || $filter[$i - 2] === static::CHAR_BACKSLASH) // Must not be escaped; ) { if ($isStringStack) { - // Dont mix-up string symbols. Only allow the same as on start + // Don't mix up string symbols. Only allow the same as on start if ($char === $stringStackState) { // End of string $stringStackState = null; } - - // Either way, add symbol to builder - static::appendSymbol($isStringStack, $char, $i, $filter, $currentParam); } else { // Start of string $stringStackState = $char; - static::appendSymbol($isStringStack, $char, $i, $filter, $currentParam); } + // Either way, add symbol to builder + static::appendSymbol( + $isStringStack, + $char, + $i, + $filter, + $currentParam, + ); + continue; } @@ -174,12 +180,12 @@ class V17 extends Filter continue; } elseif ($char === static::CHAR_COMMA) { // Params separation support - // If in array stack, dont merge yet, just mark it in array param builder + // If in array stack, don't merge yet, just mark it in array param builder if ($isArrayStack) { $currentArrayParam[] = $currentParam; $currentParam = ""; } else { - // Append from parap builder. Either value, or array + // Append from param builder. Either value, or array if (empty($currentArrayParam)) { if (strlen($currentParam)) { $params[] = $currentParam; @@ -193,23 +199,28 @@ class V17 extends Filter } // Value, not relevant to syntax - static::appendSymbol($isStringStack, $char, $i, $filter, $currentParam); + static::appendSymbol( + $isStringStack, + $char, + $i, + $filter, + $currentParam, + ); } - if (strlen($currentParam)) { + if (\strlen($currentParam)) { $params[] = $currentParam; - $currentParam = ""; + $currentParam = ''; } $parsedParams = []; foreach ($params as $param) { - // If array, parse each child separatelly + // If array, parse each child separately if (\is_array($param)) { foreach ($param as $element) { $arr[] = self::parseValue($element); } - $parsedParams[] = $arr ?? []; } else { $parsedParams[] = self::parseValue($param); @@ -295,8 +306,13 @@ class V17 extends Filter * @param string $currentParam * @return void */ - private function appendSymbol(bool $isStringStack, string $char, int $index, string $filter, string &$currentParam): void - { + private function appendSymbol( + bool $isStringStack, + string $char, + int $index, + string $filter, + string &$currentParam + ): void { // Ignore spaces and commas outside of string $canBeIgnored = false; diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index c8622f8b7a..51f8bcf23a 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -2,8 +2,10 @@ namespace Appwrite\Utopia\Request\Filters; +use Appwrite\Extend\Exception; use Appwrite\Utopia\Request\Filter; use Utopia\Database\Database; +use Utopia\Database\Exception\NotFound; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; @@ -54,8 +56,8 @@ class V20 extends Filter try { $parsed = Query::parseQueries($content['queries']); - } catch (QueryException) { - return $content; + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $selections = Query::groupByType($parsed)['selections'] ?? []; @@ -136,17 +138,28 @@ class V20 extends Filter return []; } - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty()) { - return []; + try { + $database = Authorization::skip(fn() => $dbForProject->getDocument( + 'databases', + $databaseId + )); + if ($database->isEmpty()) { + return []; + } + } catch (NotFound) { + throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument( - 'database_' . $database->getSequence(), - $collectionId - )); - if ($collection->isEmpty()) { - return []; + try { + $collection = Authorization::skip(fn() => $dbForProject->getDocument( + 'database_' . $database->getSequence(), + $collectionId + )); + if ($collection->isEmpty()) { + return []; + } + } catch (NotFound) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); } $attributes = $collection->getAttribute('attributes', []); From c9b39a3f28996af70e5c9b9ecca42b8c58a9c7ae Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 16 Sep 2025 18:37:52 +1200 Subject: [PATCH 23/58] Lint --- src/Appwrite/Utopia/Request/Filters/V20.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index 51f8bcf23a..3783a61947 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -139,7 +139,7 @@ class V20 extends Filter } try { - $database = Authorization::skip(fn() => $dbForProject->getDocument( + $database = Authorization::skip(fn () => $dbForProject->getDocument( 'databases', $databaseId )); @@ -151,7 +151,7 @@ class V20 extends Filter } try { - $collection = Authorization::skip(fn() => $dbForProject->getDocument( + $collection = Authorization::skip(fn () => $dbForProject->getDocument( 'database_' . $database->getSequence(), $collectionId )); From 832687dd091c7cc33482e946f5572652b4ebea67 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 16 Sep 2025 23:42:07 +1200 Subject: [PATCH 24/58] Catch query exception on bucket/file list --- app/controllers/api/storage.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 8cfeb5da3b..8bc383cabd 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -225,6 +225,8 @@ App::get('/v1/storage/buckets') $total = $dbForProject->count('buckets', $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $response->dynamic(new Document([ 'buckets' => $buckets, @@ -853,6 +855,8 @@ App::get('/v1/storage/buckets/:bucketId/files') throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $response->dynamic(new Document([ From f03a62d43dd8f9ee84e6d1a4004094b7ed930833 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 17 Sep 2025 01:33:36 +1200 Subject: [PATCH 25/58] Update database --- composer.lock | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/composer.lock b/composer.lock index e454de0313..0ed0d05dc5 100644 --- a/composer.lock +++ b/composer.lock @@ -756,24 +756,21 @@ }, { "name": "google/protobuf", - "version": "v4.32.0", + "version": "v4.32.1", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "9a9a92ecbe9c671dc1863f6d4a91ea3ea12c8646" + "reference": "c4ed1c1f9bbc1e91766e2cd6c0af749324fe87cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/9a9a92ecbe9c671dc1863f6d4a91ea3ea12c8646", - "reference": "9a9a92ecbe9c671dc1863f6d4a91ea3ea12c8646", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/c4ed1c1f9bbc1e91766e2cd6c0af749324fe87cb", + "reference": "c4ed1c1f9bbc1e91766e2cd6c0af749324fe87cb", "shasum": "" }, "require": { "php": ">=8.1.0" }, - "provide": { - "ext-protobuf": "*" - }, "require-dev": { "phpunit/phpunit": ">=5.0.0 <8.5.27" }, @@ -797,9 +794,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.32.0" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.32.1" }, - "time": "2025-08-14T20:00:33+00:00" + "time": "2025-09-14T05:14:52+00:00" }, { "name": "league/csv", @@ -3638,16 +3635,16 @@ }, { "name": "utopia-php/database", - "version": "1.4.8", + "version": "1.4.9", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "dbecdf89fde33a5f81ec19f4f97fe0c3715dc83a" + "reference": "066e2bda7b728bb843776db3640737d7350ba035" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/dbecdf89fde33a5f81ec19f4f97fe0c3715dc83a", - "reference": "dbecdf89fde33a5f81ec19f4f97fe0c3715dc83a", + "url": "https://api.github.com/repos/utopia-php/database/zipball/066e2bda7b728bb843776db3640737d7350ba035", + "reference": "066e2bda7b728bb843776db3640737d7350ba035", "shasum": "" }, "require": { @@ -3688,9 +3685,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/1.4.8" + "source": "https://github.com/utopia-php/database/tree/1.4.9" }, - "time": "2025-09-12T03:35:59+00:00" + "time": "2025-09-16T13:31:52+00:00" }, { "name": "utopia-php/detector", @@ -6236,16 +6233,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.26", + "version": "9.6.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a0139ea157533454f611038326f3020b3051f129" + "reference": "0a9aa4440b6a9528cf360071502628d717af3e0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a0139ea157533454f611038326f3020b3051f129", - "reference": "a0139ea157533454f611038326f3020b3051f129", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0a9aa4440b6a9528cf360071502628d717af3e0a", + "reference": "0a9aa4440b6a9528cf360071502628d717af3e0a", "shasum": "" }, "require": { @@ -6319,7 +6316,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.26" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.27" }, "funding": [ { @@ -6343,7 +6340,7 @@ "type": "tidelift" } ], - "time": "2025-09-11T06:17:45+00:00" + "time": "2025-09-14T06:18:03+00:00" }, { "name": "psr/cache", From 7d1a1d3ef479160b05fb24df665ad3ade5e7d35d Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 17 Sep 2025 08:45:23 +0300 Subject: [PATCH 26/58] use $tenant --- src/Appwrite/Platform/Workers/StatsUsage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/StatsUsage.php b/src/Appwrite/Platform/Workers/StatsUsage.php index 9d998d05bc..bd34d53b00 100644 --- a/src/Appwrite/Platform/Workers/StatsUsage.php +++ b/src/Appwrite/Platform/Workers/StatsUsage.php @@ -504,7 +504,7 @@ class StatsUsage extends Action usort($this->statDocuments, function ($a, $b) { // Tenant ASC - $cmp = $a['_tenant'] <=> $b['_tenant']; + $cmp = $a['$tenant'] <=> $b['$tenant']; if ($cmp !== 0) { return $cmp; } From 481578047690d2d49fc699c4dd7eff96bebffd9f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 17 Sep 2025 18:01:29 +0530 Subject: [PATCH 27/58] Add spatial column validation during required mode and tests for existing data in databases --- .../Collections/Attributes/Action.php | 9 +- .../Databases/Legacy/DatabasesBase.php | 130 +++++++++++++++++ .../Databases/TablesDB/DatabasesBase.php | 138 +++++++++++++++++- 3 files changed, 272 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index f3903d91a7..f8d49734eb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -366,13 +366,20 @@ abstract class Action extends UtopiaAction 'filters' => $filters, 'options' => $options, ]); - + if (!$dbForProject->getAdapter()->getSupportForSpatialIndexNull() && in_array($attribute->getAttribute('type'), Database::SPATIAL_TYPES) && $attribute->getAttribute('required')) { + $existingDataPresent = $dbForProject->findOne('database_' . $db->getSequence() . '_collection_' . $collection->getSequence()); + if (count($existingDataPresent)) { + throw new StructureException('Failed to add required spatial column: existing rows present. Make the column optional.'); + } + } $dbForProject->checkAttribute($collection, $attribute); $attribute = $dbForProject->createDocument('attributes', $attribute); } catch (DuplicateException) { throw new Exception($this->getDuplicateException()); } catch (LimitException) { throw new Exception($this->getLimitException()); + } catch (StructureException $e) { + throw new Exception($this->getInvalidStructureException(), $e->getMessage()); } catch (Throwable $e) { $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $collectionId); $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $collection->getSequence()); diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 8d27aa7230..89c0cb6de0 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -7798,4 +7798,134 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ])); } + + public function testSpatialColCreateOnExistingData(): 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' => 'Spatial Distance Meters Database' + ]); + + $databaseId = $database['body']['$id']; + + $colId = ID::unique(); + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => $colId, + 'name' => 'spatial-test', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 512, + 'required' => false, + 'default' => '', + ]); + + $this->assertEquals(202, $description['headers']['status-code']); + sleep(2); + + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'description' => 'description' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $document['headers']['status-code']); + + $point = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => true, + ]); + + $this->assertEquals(400, $point['headers']['status-code']); + + $point = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $point['headers']['status-code']); + + $line = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => true, + ]); + + $this->assertEquals(400, $line['headers']['status-code']); + + $line = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $line['headers']['status-code']); + + $poly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => true, + ]); + + $this->assertEquals(400, $poly['headers']['status-code']); + + $poly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $poly['headers']['status-code']); + } } diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index eba7ec96a7..70d4420828 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -3062,7 +3062,7 @@ trait DatabasesBase public function testInvalidRowStructure(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3735,7 +3735,7 @@ trait DatabasesBase public function testEnforceTableAndRowPermissions(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3928,7 +3928,7 @@ trait DatabasesBase public function testEnforceTablePermissions(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4284,7 +4284,7 @@ trait DatabasesBase public function testUpdatePermissionsWithEmptyPayload(): array { // Create Database - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -8828,4 +8828,134 @@ trait DatabasesBase $this->client->call(Client::METHOD_DELETE, "/tablesdb/{$databaseId}", $headers); } + public function testSpatialColCreateOnExistingData(): void + { + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Spatial Distance Meters Database' + ]); + + $databaseId = $database['body']['$id']; + + $tableId = ID::unique(); + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => $tableId, + 'name' => 'spatial-test', + 'rowSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + ], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + + $description = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 512, + 'required' => false, + 'default' => '', + ]); + + $this->assertEquals(202, $description['headers']['status-code']); + sleep(2); + + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'description' => 'description' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $row['headers']['status-code']); + + $point = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => true, + ]); + + $this->assertEquals(400, $point['headers']['status-code']); + + $point = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $point['headers']['status-code']); + + $line = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => true, + ]); + + $this->assertEquals(400, $line['headers']['status-code']); + + $line = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $line['headers']['status-code']); + + $poly = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => true, + ]); + + $this->assertEquals(400, $poly['headers']['status-code']); + + $poly = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(202, $poly['headers']['status-code']); + } + } From 5b09ebe54b494cd6479612b2ff850f176fd4f13c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 17 Sep 2025 19:46:06 +0530 Subject: [PATCH 28/58] added cases for with default values --- .../Databases/Legacy/DatabasesBase.php | 100 ++++++++++++++++++ .../Databases/TablesDB/DatabasesBase.php | 100 ++++++++++++++++++ 2 files changed, 200 insertions(+) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 89c0cb6de0..1dab5076ec 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -7928,4 +7928,104 @@ trait DatabasesBase $this->assertEquals(202, $poly['headers']['status-code']); } + + public function testSpatialColCreateOnExistingDataWithDefaults(): 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' => 'Spatial With Defaults Database' + ]); + + $databaseId = $database['body']['$id']; + + $colId = ID::unique(); + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => $colId, + 'name' => 'spatial-test-defaults', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 512, + 'required' => false, + 'default' => '', + ]); + + $this->assertEquals(202, $description['headers']['status-code']); + sleep(2); + + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'description' => 'description' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $document['headers']['status-code']); + + // Test point with default value + $point = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => false, + 'default' => [0.0, 0.0] + ]); + + $this->assertEquals(202, $point['headers']['status-code']); + + // Test line with default value + $line = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => false, + 'default' => [[0.0, 0.0], [1.0, 1.0]] + ]); + + $this->assertEquals(202, $line['headers']['status-code']); + + // Test polygon with default value + $poly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/attributes/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => false, + 'default' => [[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]] + ]); + + $this->assertEquals(202, $poly['headers']['status-code']); + } } diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index 70d4420828..ebfa0132e6 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -8958,4 +8958,104 @@ trait DatabasesBase $this->assertEquals(202, $poly['headers']['status-code']); } + public function testSpatialColCreateOnExistingDataWithDefaults(): void + { + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Spatial With Defaults Database' + ]); + + $databaseId = $database['body']['$id']; + + $tableId = ID::unique(); + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => $tableId, + 'name' => 'spatial-test-defaults', + 'rowSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + ], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + + $description = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 512, + 'required' => false, + 'default' => '', + ]); + + $this->assertEquals(202, $description['headers']['status-code']); + sleep(2); + + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'description' => 'description' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $row['headers']['status-code']); + + // Test point with default value + $point = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/point', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'loc', + 'required' => false, + 'default' => [0.0, 0.0] + ]); + + $this->assertEquals(202, $point['headers']['status-code']); + + // Test line with default value + $line = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/line', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'route', + 'required' => false, + 'default' => [[0.0, 0.0], [1.0, 1.0]] + ]); + + $this->assertEquals(202, $line['headers']['status-code']); + + // Test polygon with default value + $poly = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/polygon', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'area', + 'required' => false, + 'default' => [[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]] + ]); + + $this->assertEquals(202, $poly['headers']['status-code']); + } + } From c5e9ec396929e6683c7f55771046b88604ba2c9e Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 17 Sep 2025 20:00:10 +0530 Subject: [PATCH 29/58] added cases for checking default added or not --- .../Databases/Legacy/DatabasesBase.php | 35 +++++++++++++++++++ .../Databases/TablesDB/DatabasesBase.php | 35 +++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 1dab5076ec..c9a293dcb0 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -8027,5 +8027,40 @@ trait DatabasesBase ]); $this->assertEquals(202, $poly['headers']['status-code']); + + // Wait for attributes to be available + sleep(2); + + // Create a new document without spatial data to test default values + $newDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $colId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'description' => 'test default values' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $newDocument['headers']['status-code']); + + $newDocumentId = $newDocument['body']['$id']; + + // Fetch the document to verify default values are applied + $fetchedDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $colId . '/documents/' . $newDocumentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $fetchedDocument['headers']['status-code']); + + // Verify default values are applied + $this->assertEquals([0.0, 0.0], $fetchedDocument['body']['loc']); + $this->assertEquals([[0.0, 0.0], [1.0, 1.0]], $fetchedDocument['body']['route']); + $this->assertEquals([[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]], $fetchedDocument['body']['area']); } } diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index ebfa0132e6..7be23ca136 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -9056,6 +9056,41 @@ trait DatabasesBase ]); $this->assertEquals(202, $poly['headers']['status-code']); + + // Wait for columns to be available + sleep(2); + + // Create a new row without spatial data to test default values + $newRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'description' => 'test default values' + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $newRow['headers']['status-code']); + + $newRowId = $newRow['body']['$id']; + + // Fetch the row to verify default values are applied + $fetchedRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $newRowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $fetchedRow['headers']['status-code']); + + // Verify default values are applied + $this->assertEquals([0.0, 0.0], $fetchedRow['body']['loc']); + $this->assertEquals([[0.0, 0.0], [1.0, 1.0]], $fetchedRow['body']['route']); + $this->assertEquals([[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]], $fetchedRow['body']['area']); } } From 52ceddcd5ae1dad4ccf364cb931d0d9634275572 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 17 Sep 2025 20:02:36 +0530 Subject: [PATCH 30/58] linting --- tests/e2e/Services/Databases/Legacy/DatabasesBase.php | 8 ++++---- tests/e2e/Services/Databases/TablesDB/DatabasesBase.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index c9a293dcb0..8b4f78d3ea 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -8027,7 +8027,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $poly['headers']['status-code']); - + // Wait for attributes to be available sleep(2); @@ -8047,7 +8047,7 @@ trait DatabasesBase ] ]); $this->assertEquals(201, $newDocument['headers']['status-code']); - + $newDocumentId = $newDocument['body']['$id']; // Fetch the document to verify default values are applied @@ -8055,9 +8055,9 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - + $this->assertEquals(200, $fetchedDocument['headers']['status-code']); - + // Verify default values are applied $this->assertEquals([0.0, 0.0], $fetchedDocument['body']['loc']); $this->assertEquals([[0.0, 0.0], [1.0, 1.0]], $fetchedDocument['body']['route']); diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index 7be23ca136..387a7ec3f0 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -9056,7 +9056,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $poly['headers']['status-code']); - + // Wait for columns to be available sleep(2); @@ -9076,7 +9076,7 @@ trait DatabasesBase ] ]); $this->assertEquals(201, $newRow['headers']['status-code']); - + $newRowId = $newRow['body']['$id']; // Fetch the row to verify default values are applied @@ -9084,9 +9084,9 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - + $this->assertEquals(200, $fetchedRow['headers']['status-code']); - + // Verify default values are applied $this->assertEquals([0.0, 0.0], $fetchedRow['body']['loc']); $this->assertEquals([[0.0, 0.0], [1.0, 1.0]], $fetchedRow['body']['route']); From 0e2c5d93f5951a7f20cb0343593edeeb8791dd9a Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 18 Sep 2025 14:54:07 +1200 Subject: [PATCH 31/58] Update check --- composer.lock | 41 +++++++++---------- .../Collections/Attributes/Action.php | 21 ++++++---- .../Collections/Documents/Action.php | 2 +- .../Collections/Documents/Bulk/Update.php | 2 +- .../Collections/Documents/Bulk/Upsert.php | 2 +- .../Collections/Documents/Create.php | 2 +- .../Collections/Documents/Update.php | 2 +- .../Collections/Documents/Upsert.php | 2 +- 8 files changed, 39 insertions(+), 35 deletions(-) diff --git a/composer.lock b/composer.lock index 0ed0d05dc5..d8c17fbc91 100644 --- a/composer.lock +++ b/composer.lock @@ -1352,16 +1352,16 @@ }, { "name": "open-telemetry/gen-otlp-protobuf", - "version": "1.5.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/gen-otlp-protobuf.git", - "reference": "585bafddd4ae6565de154610b10a787a455c9ba0" + "reference": "673af5b06545b513466081884b47ef15a536edde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/585bafddd4ae6565de154610b10a787a455c9ba0", - "reference": "585bafddd4ae6565de154610b10a787a455c9ba0", + "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/673af5b06545b513466081884b47ef15a536edde", + "reference": "673af5b06545b513466081884b47ef15a536edde", "shasum": "" }, "require": { @@ -1411,7 +1411,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-01-15T23:07:07+00:00" + "time": "2025-09-17T23:10:12+00:00" }, { "name": "open-telemetry/sdk", @@ -3635,16 +3635,16 @@ }, { "name": "utopia-php/database", - "version": "1.4.9", + "version": "1.4.10", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "066e2bda7b728bb843776db3640737d7350ba035" + "reference": "5514bb7346e75996d061d08040248fe842f73785" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/066e2bda7b728bb843776db3640737d7350ba035", - "reference": "066e2bda7b728bb843776db3640737d7350ba035", + "url": "https://api.github.com/repos/utopia-php/database/zipball/5514bb7346e75996d061d08040248fe842f73785", + "reference": "5514bb7346e75996d061d08040248fe842f73785", "shasum": "" }, "require": { @@ -3685,9 +3685,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/1.4.9" + "source": "https://github.com/utopia-php/database/tree/1.4.10" }, - "time": "2025-09-16T13:31:52+00:00" + "time": "2025-09-18T02:42:25+00:00" }, { "name": "utopia-php/detector", @@ -5278,16 +5278,16 @@ }, { "name": "laravel/pint", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "0345f3b05f136801af8c339f9d16ef29e6b4df8a" + "reference": "595de38458c6b0ab4cae4bcc769c2e5c5d5b8e96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/0345f3b05f136801af8c339f9d16ef29e6b4df8a", - "reference": "0345f3b05f136801af8c339f9d16ef29e6b4df8a", + "url": "https://api.github.com/repos/laravel/pint/zipball/595de38458c6b0ab4cae4bcc769c2e5c5d5b8e96", + "reference": "595de38458c6b0ab4cae4bcc769c2e5c5d5b8e96", "shasum": "" }, "require": { @@ -5298,9 +5298,9 @@ "php": "^8.2.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.82.2", - "illuminate/view": "^11.45.1", - "larastan/larastan": "^3.5.0", + "friendsofphp/php-cs-fixer": "^3.87.2", + "illuminate/view": "^11.46.0", + "larastan/larastan": "^3.7.1", "laravel-zero/framework": "^11.45.0", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^2.3.1", @@ -5311,9 +5311,6 @@ ], "type": "project", "autoload": { - "files": [ - "overrides/Runner/Parallel/ProcessFactory.php" - ], "psr-4": { "App\\": "app/", "Database\\Seeders\\": "database/seeders/", @@ -5343,7 +5340,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2025-07-10T18:09:32+00:00" + "time": "2025-09-17T01:36:44+00:00" }, { "name": "matthiasmullie/minify", diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index f8d49734eb..22a90d2653 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -122,7 +122,7 @@ abstract class Action extends UtopiaAction /** * Get the correct invalid structure message. */ - protected function getInvalidStructureException(): string + protected function getStructureException(): string { return $this->isCollectionsAPI() ? Exception::DOCUMENT_INVALID_STRUCTURE @@ -366,9 +366,16 @@ abstract class Action extends UtopiaAction 'filters' => $filters, 'options' => $options, ]); - if (!$dbForProject->getAdapter()->getSupportForSpatialIndexNull() && in_array($attribute->getAttribute('type'), Database::SPATIAL_TYPES) && $attribute->getAttribute('required')) { - $existingDataPresent = $dbForProject->findOne('database_' . $db->getSequence() . '_collection_' . $collection->getSequence()); - if (count($existingDataPresent)) { + if ( + !$dbForProject->getAdapter()->getSupportForSpatialIndexNull() && + \in_array($attribute->getAttribute('type'), Database::SPATIAL_TYPES) && + $attribute->getAttribute('required') + ) { + $hasData = !Authorization::skip(fn () => $dbForProject + ->findOne('database_' . $db->getSequence() . '_collection_' . $collection->getSequence())) + ->isEmpty(); + + if ($hasData) { throw new StructureException('Failed to add required spatial column: existing rows present. Make the column optional.'); } } @@ -379,7 +386,7 @@ abstract class Action extends UtopiaAction } catch (LimitException) { throw new Exception($this->getLimitException()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } catch (Throwable $e) { $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $collectionId); $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $collection->getSequence()); @@ -423,7 +430,7 @@ abstract class Action extends UtopiaAction } catch (LimitException) { throw new Exception($this->getLimitException()); } catch (StructureException) { - throw new Exception($this->getInvalidStructureException()); + throw new Exception($this->getStructureException()); } catch (Throwable $e) { $dbForProject->deleteDocument('attributes', $attribute->getId()); throw $e; @@ -587,7 +594,7 @@ abstract class Action extends UtopiaAction } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } if ($primaryDocumentOptions['twoWay']) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index d1d0738990..e05e588201 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -160,7 +160,7 @@ abstract class Action extends AppwriteAction /** * Get the correct invalid structure message. */ - protected function getInvalidStructureException(): string + protected function getStructureException(): string { return $this->isCollectionsAPI() ? Exception::DOCUMENT_INVALID_STRUCTURE diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 0f0ae14020..baab45cdd3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -149,7 +149,7 @@ class Update extends Action } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } foreach ($documents as $document) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 395e3d757b..4ce3990a38 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -130,7 +130,7 @@ class Upsert extends Action } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } foreach ($upserted as $document) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index c03daabd4f..a8af1eda86 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -375,7 +375,7 @@ class Create extends Action } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } $queueForEvents diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 8382bdd5e9..e510aeb089 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -247,7 +247,7 @@ class Update extends Action } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } $collectionsCache = []; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 54b1cad950..3ac5e704e3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -258,7 +258,7 @@ class Upsert extends Action } catch (RelationshipException $e) { throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + throw new Exception($this->getStructureException(), $e->getMessage()); } $collectionsCache = []; From 427c891e0fa28bc822cd3cfab8de41307d0e33fb Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 18 Sep 2025 10:13:23 +0530 Subject: [PATCH 32/58] update cli to 10.0.0 --- app/config/platforms.php | 2 +- composer.lock | 12 ++++++------ docs/sdks/cli/CHANGELOG.md | 9 +++++++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 7623bb896e..7aec82d1cf 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -226,7 +226,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '9.1.0', + 'version' => '10.0.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, diff --git a/composer.lock b/composer.lock index d8c17fbc91..b31d0f78bd 100644 --- a/composer.lock +++ b/composer.lock @@ -5004,16 +5004,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.3.4", + "version": "1.3.5", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac" + "reference": "6fda9e58b37c9872c1a2a424e5467de8de1bc567" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac", - "reference": "d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/6fda9e58b37c9872c1a2a424e5467de8de1bc567", + "reference": "6fda9e58b37c9872c1a2a424e5467de8de1bc567", "shasum": "" }, "require": { @@ -5049,9 +5049,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/1.3.4" + "source": "https://github.com/appwrite/sdk-generator/tree/1.3.5" }, - "time": "2025-09-08T11:56:04+00:00" + "time": "2025-09-15T04:19:40+00:00" }, { "name": "doctrine/annotations", diff --git a/docs/sdks/cli/CHANGELOG.md b/docs/sdks/cli/CHANGELOG.md index 8964d059a9..000a7e0938 100644 --- a/docs/sdks/cli/CHANGELOG.md +++ b/docs/sdks/cli/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 10.0.0 + +* **Breaking:** Removed Avatars CLI command and all related subcommands; corresponding examples deleted +* **Feat:** Geo defaults now accept coordinate arrays for Databases and Tables DB, with automatic normalization +* **Feat:** Pull command skips deprecated resources by default and shows clearer totals/messages +* **Feat:** Updated CLI descriptions: Databases marked legacy; added tables-db, projects, and project +* Fix TypeScript type generation now quotes invalid property names to produce valid typings +* Update documentation: Removed Avatars CLI examples and updated help text to reflect new geo defaults and terminology + ## 8.3.0 * **Feat:** Add support for `appwrite.config.json` file From a7e9e58312afbb93b49eea2fee1a61c05b2767dc Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 18 Sep 2025 10:57:47 +0300 Subject: [PATCH 33/58] Add order by --- app/init/database/filters.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/init/database/filters.php b/app/init/database/filters.php index 33f5d8077a..8261cdbc30 100644 --- a/app/init/database/filters.php +++ b/app/init/database/filters.php @@ -255,6 +255,8 @@ Database::addFilter( ->find('variables', [ Query::equal('resourceInternalId', [$document->getSequence()]), Query::equal('resourceType', $resourceType), + Query::orderAsc('resourceType'), + Query::orderAsc('$sequence'), Query::limit(APP_LIMIT_SUBQUERY), ]); } From 4da7f04a5c81d8835857cfeacefafb4feb0a0dc4 Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 18 Sep 2025 10:58:27 +0300 Subject: [PATCH 34/58] Add order by --- app/init/database/filters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/init/database/filters.php b/app/init/database/filters.php index 8261cdbc30..c4cfd1ac81 100644 --- a/app/init/database/filters.php +++ b/app/init/database/filters.php @@ -256,7 +256,7 @@ Database::addFilter( Query::equal('resourceInternalId', [$document->getSequence()]), Query::equal('resourceType', $resourceType), Query::orderAsc('resourceType'), - Query::orderAsc('$sequence'), + Query::orderAsc(), Query::limit(APP_LIMIT_SUBQUERY), ]); } From 4b90998d1e0844b3b1de078f113e1adafbfe34b6 Mon Sep 17 00:00:00 2001 From: Veeresh <75656445+Veera-mulge@users.noreply.github.com> Date: Thu, 18 Sep 2025 18:04:27 +0530 Subject: [PATCH 35/58] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89390515eb..4cba193d4d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> We just announced inversion queries for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-inversion-queries) +> We just announced API for spatial columns for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-spatial-columns) > Appwrite Cloud is now Generally Available - [Learn more](https://appwrite.io/cloud-ga) From d9b657796b6f84d239802c44040ade2e3bb92a49 Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 18 Sep 2025 17:49:38 +0300 Subject: [PATCH 36/58] bump database 1.5.0 --- composer.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.lock b/composer.lock index d8c17fbc91..98089f9ed9 100644 --- a/composer.lock +++ b/composer.lock @@ -3635,16 +3635,16 @@ }, { "name": "utopia-php/database", - "version": "1.4.10", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "5514bb7346e75996d061d08040248fe842f73785" + "reference": "24c4519b4ac32aee13af31dddd984db2a3b34980" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/5514bb7346e75996d061d08040248fe842f73785", - "reference": "5514bb7346e75996d061d08040248fe842f73785", + "url": "https://api.github.com/repos/utopia-php/database/zipball/24c4519b4ac32aee13af31dddd984db2a3b34980", + "reference": "24c4519b4ac32aee13af31dddd984db2a3b34980", "shasum": "" }, "require": { @@ -3685,9 +3685,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/1.4.10" + "source": "https://github.com/utopia-php/database/tree/1.5.0" }, - "time": "2025-09-18T02:42:25+00:00" + "time": "2025-09-18T14:42:01+00:00" }, { "name": "utopia-php/detector", @@ -5004,16 +5004,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.3.4", + "version": "1.3.5", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac" + "reference": "6fda9e58b37c9872c1a2a424e5467de8de1bc567" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac", - "reference": "d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/6fda9e58b37c9872c1a2a424e5467de8de1bc567", + "reference": "6fda9e58b37c9872c1a2a424e5467de8de1bc567", "shasum": "" }, "require": { @@ -5049,9 +5049,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/1.3.4" + "source": "https://github.com/appwrite/sdk-generator/tree/1.3.5" }, - "time": "2025-09-08T11:56:04+00:00" + "time": "2025-09-15T04:19:40+00:00" }, { "name": "doctrine/annotations", @@ -8506,7 +8506,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From c1782f6f58998cf5a6f3d5fd270ed697f98999b1 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 19 Sep 2025 15:28:41 +1200 Subject: [PATCH 37/58] Don't remove required attributes --- .../Databases/Collections/Documents/XList.php | 37 ------------------- .../Databases/Legacy/DatabasesBase.php | 12 +++--- .../Databases/TablesDB/DatabasesBase.php | 12 +++--- 3 files changed, 12 insertions(+), 49 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 9c8405cf18..546cbeddd4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -158,43 +158,6 @@ class XList extends Action ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); - // Check if the SELECT query includes the removable attributes - $hasWildcard = false; - $hasSelectQueries = !empty($selectQueries); - $requestedAttributes = []; - - if ($hasSelectQueries) { - foreach ($selectQueries as $query) { - if ($query->getMethod() !== Query::TYPE_SELECT) { - continue; - } - - $values = $query->getValues(); - if (\in_array('*', $values, true)) { - $hasWildcard = true; - break; - } - - // Check which removable attributes are explicitly requested - foreach ($this->removableAttributes['*'] as $attribute) { - if (\in_array($attribute, $values, true)) { - $requestedAttributes[$attribute] = true; - } - } - } - - if (!$hasWildcard) { - foreach ($documents as $document) { - // Remove attributes that are not explicitly requested - foreach ($this->removableAttributes['*'] as $attribute) { - if (!isset($requestedAttributes[$attribute])) { - $document->removeAttribute($attribute); - } - } - } - } - } - $response->dynamic(new Document([ 'total' => $total, // rows or documents diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 8b4f78d3ea..a432bc0acd 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -5270,8 +5270,8 @@ trait DatabasesBase $this->assertEquals(2, count($response['body']['documents'])); $this->assertEquals(null, $response['body']['documents'][0]['fullName']); $this->assertArrayNotHasKey("libraries", $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$collectionId', $response['body']['documents'][0]); + $this->assertArrayHasKey('$databaseId', $response['body']['documents'][0]); + $this->assertArrayHasKey('$collectionId', $response['body']['documents'][0]); } /** @@ -5291,8 +5291,8 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayNotHasKey('libraries', $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$collectionId', $response['body']['documents'][0]); + $this->assertArrayHasKey('$databaseId', $response['body']['documents'][0]); + $this->assertArrayHasKey('$collectionId', $response['body']['documents'][0]); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -5305,8 +5305,8 @@ trait DatabasesBase $document = $response['body']['documents'][0]; $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayHasKey('libraries', $document); - $this->assertArrayNotHasKey('$databaseId', $document); - $this->assertArrayNotHasKey('$collectionId', $document); + $this->assertArrayHasKey('$databaseId', $document); + $this->assertArrayHasKey('$collectionId', $document); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents/' . $document['$id'], array_merge([ 'content-type' => 'application/json', diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index 387a7ec3f0..336193f5d9 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -5197,8 +5197,8 @@ trait DatabasesBase $this->assertEquals(2, count($response['body']['rows'])); $this->assertEquals(null, $response['body']['rows'][0]['fullName']); $this->assertArrayNotHasKey("libraries", $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); + $this->assertArrayHasKey('$databaseId', $response['body']['rows'][0]); + $this->assertArrayHasKey('$tableId', $response['body']['rows'][0]); } /** @@ -5218,8 +5218,8 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayNotHasKey('libraries', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); + $this->assertArrayHasKey('$databaseId', $response['body']['rows'][0]); + $this->assertArrayHasKey('$tableId', $response['body']['rows'][0]); $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', @@ -5232,8 +5232,8 @@ trait DatabasesBase $row = $response['body']['rows'][0]; $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayHasKey('libraries', $row); - $this->assertArrayNotHasKey('$databaseId', $row); - $this->assertArrayNotHasKey('$tableId', $row); + $this->assertArrayHasKey('$databaseId', $row); + $this->assertArrayHasKey('$tableId', $row); $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', From f944ad350ec8e356523b7651058f6ea1259c3c87 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 19 Sep 2025 17:32:34 +1200 Subject: [PATCH 38/58] Catch query exception on bulk update/delete --- .../Http/Databases/Collections/Documents/Bulk/Delete.php | 2 ++ .../Http/Databases/Collections/Documents/Bulk/Update.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index fc4e2a8a91..3467a9d11c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -124,6 +124,8 @@ class Delete extends Action throw new Exception($this->getConflictException()); } catch (RestrictedException) { throw new Exception($this->getRestrictedException()); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } foreach ($documents as $document) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index baab45cdd3..65bd255d32 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -150,6 +150,8 @@ class Update extends Action throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { throw new Exception($this->getStructureException(), $e->getMessage()); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } foreach ($documents as $document) { From 3e8211d6bd199cd731b0a637b6b5a9fe9beb000b Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Sat, 20 Sep 2025 19:45:44 +0530 Subject: [PATCH 39/58] refactor: improve code readability for schedules --- app/controllers/api/messaging.php | 13 +++++++------ src/Appwrite/Migration/Version/V19.php | 5 +++-- .../Modules/Functions/Http/Functions/Create.php | 3 ++- src/Appwrite/Platform/Tasks/ScheduleExecutions.php | 6 ++++++ src/Appwrite/Platform/Tasks/ScheduleFunctions.php | 7 ++++++- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index d22c5cb2c2..bde93305dd 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -10,6 +10,7 @@ use Appwrite\Extend\Exception; use Appwrite\Messaging\Status as MessageStatus; use Appwrite\Network\Validator\Email; use Appwrite\Permission; +use Appwrite\Platform\Tasks\ScheduleMessages; use Appwrite\Role; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -3102,7 +3103,7 @@ App::post('/v1/messaging/messages/email') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => ScheduleMessages::getSupportedResource(), 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3244,7 +3245,7 @@ App::post('/v1/messaging/messages/sms') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => ScheduleMessages::getSupportedResource(), 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3462,7 +3463,7 @@ App::post('/v1/messaging/messages/push') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => ScheduleMessages::getSupportedResource(), 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3863,7 +3864,7 @@ App::patch('/v1/messaging/messages/email/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => ScheduleMessages::getSupportedResource(), 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -4084,7 +4085,7 @@ App::patch('/v1/messaging/messages/sms/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => ScheduleMessages::getSupportedResource(), 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -4258,7 +4259,7 @@ App::patch('/v1/messaging/messages/push/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'message', + 'resourceType' => ScheduleMessages::getSupportedResource(), 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/src/Appwrite/Migration/Version/V19.php b/src/Appwrite/Migration/Version/V19.php index d4dda02d75..790a2fdfb7 100644 --- a/src/Appwrite/Migration/Version/V19.php +++ b/src/Appwrite/Migration/Version/V19.php @@ -3,6 +3,7 @@ namespace Appwrite\Migration\Version; use Appwrite\Migration\Migration; +use Appwrite\Platform\Tasks\ScheduleFunctions; use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; @@ -730,8 +731,8 @@ class V19 extends Migration if (empty($document->getAttribute('scheduleId', null))) { $schedule = $this->dbForPlatform->createDocument('schedules', new Document([ - 'region' => $project->getAttribute('region'), - 'resourceType' => 'function', + 'region' => $this->project->getAttribute('region'), + 'resourceType' => ScheduleFunctions::getSupportedResource(), 'resourceId' => $document->getId(), 'resourceInternalId' => $document->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php index 21a74f9a81..ccf5abc373 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php @@ -11,6 +11,7 @@ use Appwrite\Event\Webhook; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Compute\Base; use Appwrite\Platform\Modules\Compute\Validator\Specification; +use Appwrite\Platform\Tasks\ScheduleFunctions; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -235,7 +236,7 @@ class Create extends Base $schedule = Authorization::skip( fn () => $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => 'function', + 'resourceType' => ScheduleFunctions::getSupportedResource(), 'resourceId' => $function->getId(), 'resourceInternalId' => $function->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php index 14a4259e17..438341ad47 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php @@ -6,6 +6,12 @@ use Appwrite\Event\Func; use Swoole\Coroutine as Co; use Utopia\Database\Database; +/** + * ScheduleExecutions + * + * Handles delayed executions by processing one-time scheduled tasks + * that are executed at a specific future time. + */ class ScheduleExecutions extends ScheduleBase { public const UPDATE_TIMER = 3; // seconds diff --git a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php index 6f072425e4..090adcbccf 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php @@ -7,8 +7,13 @@ use Cron\CronExpression; use Utopia\CLI\Console; use Utopia\Database\Database; use Utopia\Database\DateTime; -use Utopia\Pools\Group; +/** + * ScheduleFunctions + * + * Handles cron job related executions by processing cron expressions + * and scheduling function executions based on recurring schedules. + */ class ScheduleFunctions extends ScheduleBase { public const UPDATE_TIMER = 10; // seconds From f09d5258ece14f4b3c9cf3ab9d0c82947269b47d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 22 Sep 2025 14:20:58 +0530 Subject: [PATCH 40/58] use constants --- app/init/constants.php | 10 ++++++++++ src/Appwrite/Platform/Tasks/ScheduleExecutions.php | 4 ++-- src/Appwrite/Platform/Tasks/ScheduleFunctions.php | 4 ++-- src/Appwrite/Platform/Tasks/ScheduleMessages.php | 4 ++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/init/constants.php b/app/init/constants.php index 28cf8a4052..2c94041276 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -279,3 +279,13 @@ const TOKENS_RESOURCE_TYPE_FILES = 'files'; const TOKENS_RESOURCE_TYPE_SITES = 'sites'; const TOKENS_RESOURCE_TYPE_FUNCTIONS = 'functions'; const TOKENS_RESOURCE_TYPE_DATABASES = 'databases'; + +// schedules types +const SCHEDULE_TYPE_EXECUTION = 'execution'; +const SCHEDULE_TYPE_FUNCTION = 'function'; +const SCHEDULE_TYPE_MESSAGE = 'message'; + +// collections types +const COLLECTION_TYPE_EXECUTIONS = 'executions'; +const COLLECTION_TYPE_FUNCTIONS = 'functions'; +const COLLECTION_TYPE_MESSAGES = 'messages'; diff --git a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php index 438341ad47..77cc056280 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php @@ -24,12 +24,12 @@ class ScheduleExecutions extends ScheduleBase public static function getSupportedResource(): string { - return 'execution'; + return SCHEDULE_TYPE_EXECUTION; } public static function getCollectionId(): string { - return 'executions'; + return COLLECTION_TYPE_EXECUTIONS; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void diff --git a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php index 090adcbccf..09c7296f93 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php @@ -28,12 +28,12 @@ class ScheduleFunctions extends ScheduleBase public static function getSupportedResource(): string { - return 'function'; + return SCHEDULE_TYPE_FUNCTION; } public static function getCollectionId(): string { - return 'functions'; + return COLLECTION_TYPE_FUNCTIONS; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void diff --git a/src/Appwrite/Platform/Tasks/ScheduleMessages.php b/src/Appwrite/Platform/Tasks/ScheduleMessages.php index fe4afbe69c..87e5ba5730 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleMessages.php +++ b/src/Appwrite/Platform/Tasks/ScheduleMessages.php @@ -17,12 +17,12 @@ class ScheduleMessages extends ScheduleBase public static function getSupportedResource(): string { - return 'message'; + return SCHEDULE_TYPE_MESSAGE; } public static function getCollectionId(): string { - return 'messages'; + return COLLECTION_TYPE_MESSAGES; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void From c52081dbed972c20686f343f7eb96d9d545dbb94 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 22 Sep 2025 19:58:18 +0530 Subject: [PATCH 41/58] fix: to use correct pattern --- app/init/constants.php | 15 ++++----------- .../Platform/Tasks/ScheduleExecutions.php | 4 ++-- src/Appwrite/Platform/Tasks/ScheduleFunctions.php | 4 ++-- src/Appwrite/Platform/Tasks/ScheduleMessages.php | 4 ++-- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/app/init/constants.php b/app/init/constants.php index 2c94041276..5c75dc4ce2 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -262,7 +262,6 @@ const METRIC_SITES_ID_INBOUND = 'sites.{siteInternalId}.inbound'; const METRIC_SITES_ID_OUTBOUND = 'sites.{siteInternalId}.outbound'; // Resource types - const RESOURCE_TYPE_PROJECTS = 'projects'; const RESOURCE_TYPE_FUNCTIONS = 'functions'; const RESOURCE_TYPE_SITES = 'sites'; @@ -274,18 +273,12 @@ const RESOURCE_TYPE_SUBSCRIBERS = 'subscribers'; const RESOURCE_TYPE_MESSAGES = 'messages'; // Resource types for Tokens - const TOKENS_RESOURCE_TYPE_FILES = 'files'; const TOKENS_RESOURCE_TYPE_SITES = 'sites'; const TOKENS_RESOURCE_TYPE_FUNCTIONS = 'functions'; const TOKENS_RESOURCE_TYPE_DATABASES = 'databases'; -// schedules types -const SCHEDULE_TYPE_EXECUTION = 'execution'; -const SCHEDULE_TYPE_FUNCTION = 'function'; -const SCHEDULE_TYPE_MESSAGE = 'message'; - -// collections types -const COLLECTION_TYPE_EXECUTIONS = 'executions'; -const COLLECTION_TYPE_FUNCTIONS = 'functions'; -const COLLECTION_TYPE_MESSAGES = 'messages'; +// Resource types for Schedules +const SCHEDULE_RESOURCE_TYPE_EXECUTION = 'execution'; +const SCHEDULE_RESOURCE_TYPE_FUNCTION = 'function'; +const SCHEDULE_RESOURCE_TYPE_MESSAGE = 'message'; diff --git a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php index 77cc056280..83a3f51b03 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php @@ -24,12 +24,12 @@ class ScheduleExecutions extends ScheduleBase public static function getSupportedResource(): string { - return SCHEDULE_TYPE_EXECUTION; + return SCHEDULE_RESOURCE_TYPE_EXECUTION; } public static function getCollectionId(): string { - return COLLECTION_TYPE_EXECUTIONS; + return RESOURCE_TYPE_EXECUTIONS; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void diff --git a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php index 09c7296f93..7fda2f75df 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php @@ -28,12 +28,12 @@ class ScheduleFunctions extends ScheduleBase public static function getSupportedResource(): string { - return SCHEDULE_TYPE_FUNCTION; + return SCHEDULE_RESOURCE_TYPE_FUNCTION; } public static function getCollectionId(): string { - return COLLECTION_TYPE_FUNCTIONS; + return RESOURCE_TYPE_FUNCTIONS; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void diff --git a/src/Appwrite/Platform/Tasks/ScheduleMessages.php b/src/Appwrite/Platform/Tasks/ScheduleMessages.php index 87e5ba5730..57f6dd8002 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleMessages.php +++ b/src/Appwrite/Platform/Tasks/ScheduleMessages.php @@ -17,12 +17,12 @@ class ScheduleMessages extends ScheduleBase public static function getSupportedResource(): string { - return SCHEDULE_TYPE_MESSAGE; + return SCHEDULE_RESOURCE_TYPE_MESSAGE; } public static function getCollectionId(): string { - return COLLECTION_TYPE_MESSAGES; + return RESOURCE_TYPE_MESSAGES; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void From 232b22b71eca4bc7b900b77b854dd539cfaf540d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 23 Sep 2025 07:35:17 +0530 Subject: [PATCH 42/58] use constants --- app/controllers/api/messaging.php | 13 ++++++------- app/init/constants.php | 1 + src/Appwrite/Migration/Version/V19.php | 3 +-- .../Modules/Functions/Http/Executions/Create.php | 3 +-- .../Modules/Functions/Http/Executions/Delete.php | 3 +-- .../Modules/Functions/Http/Functions/Create.php | 3 +-- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index bde93305dd..fd1a92e364 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -10,7 +10,6 @@ use Appwrite\Extend\Exception; use Appwrite\Messaging\Status as MessageStatus; use Appwrite\Network\Validator\Email; use Appwrite\Permission; -use Appwrite\Platform\Tasks\ScheduleMessages; use Appwrite\Role; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -3103,7 +3102,7 @@ App::post('/v1/messaging/messages/email') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => ScheduleMessages::getSupportedResource(), + 'resourceType' => RESOURCE_TYPE_MESSAGES, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3245,7 +3244,7 @@ App::post('/v1/messaging/messages/sms') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => ScheduleMessages::getSupportedResource(), + 'resourceType' => RESOURCE_TYPE_MESSAGES, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3463,7 +3462,7 @@ App::post('/v1/messaging/messages/push') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => ScheduleMessages::getSupportedResource(), + 'resourceType' => RESOURCE_TYPE_MESSAGES, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3864,7 +3863,7 @@ App::patch('/v1/messaging/messages/email/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => ScheduleMessages::getSupportedResource(), + 'resourceType' => RESOURCE_TYPE_MESSAGES, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -4085,7 +4084,7 @@ App::patch('/v1/messaging/messages/sms/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => ScheduleMessages::getSupportedResource(), + 'resourceType' => RESOURCE_TYPE_MESSAGES, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -4259,7 +4258,7 @@ App::patch('/v1/messaging/messages/push/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => ScheduleMessages::getSupportedResource(), + 'resourceType' => RESOURCE_TYPE_MESSAGES, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/app/init/constants.php b/app/init/constants.php index 5c75dc4ce2..74f04f25e9 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -271,6 +271,7 @@ const RESOURCE_TYPE_PROVIDERS = 'providers'; const RESOURCE_TYPE_TOPICS = 'topics'; const RESOURCE_TYPE_SUBSCRIBERS = 'subscribers'; const RESOURCE_TYPE_MESSAGES = 'messages'; +const RESOURCE_TYPE_EXECUTIONS = 'executions'; // Resource types for Tokens const TOKENS_RESOURCE_TYPE_FILES = 'files'; diff --git a/src/Appwrite/Migration/Version/V19.php b/src/Appwrite/Migration/Version/V19.php index 790a2fdfb7..f5892f07bd 100644 --- a/src/Appwrite/Migration/Version/V19.php +++ b/src/Appwrite/Migration/Version/V19.php @@ -3,7 +3,6 @@ namespace Appwrite\Migration\Version; use Appwrite\Migration\Migration; -use Appwrite\Platform\Tasks\ScheduleFunctions; use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; @@ -732,7 +731,7 @@ class V19 extends Migration if (empty($document->getAttribute('scheduleId', null))) { $schedule = $this->dbForPlatform->createDocument('schedules', new Document([ 'region' => $this->project->getAttribute('region'), - 'resourceType' => ScheduleFunctions::getSupportedResource(), + 'resourceType' => RESOURCE_TYPE_FUNCTIONS, 'resourceId' => $document->getId(), 'resourceInternalId' => $document->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php index 1603e8f997..69af3b7d04 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php @@ -11,7 +11,6 @@ use Appwrite\Extend\Exception; use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Functions\Validator\Headers; use Appwrite\Platform\Modules\Compute\Base; -use Appwrite\Platform\Tasks\ScheduleExecutions; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -313,7 +312,7 @@ class Create extends Base $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => ScheduleExecutions::getSupportedResource(), + 'resourceType' => SCHEDULE_RESOURCE_TYPE_EXECUTION, 'resourceId' => $execution->getId(), 'resourceInternalId' => $execution->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Delete.php b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Delete.php index 9c818cfacc..666cb8310c 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Delete.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Delete.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Functions\Http\Executions; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Compute\Base; -use Appwrite\Platform\Tasks\ScheduleExecutions; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -100,7 +99,7 @@ class Delete extends Base if ($status === 'scheduled') { $schedule = $dbForPlatform->findOne('schedules', [ Query::equal('resourceId', [$execution->getId()]), - Query::equal('resourceType', [ScheduleExecutions::getSupportedResource()]), + Query::equal('resourceType', [SCHEDULE_RESOURCE_TYPE_EXECUTION]), Query::equal('active', [true]), ]); diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php index ccf5abc373..13444634fb 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php @@ -11,7 +11,6 @@ use Appwrite\Event\Webhook; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Compute\Base; use Appwrite\Platform\Modules\Compute\Validator\Specification; -use Appwrite\Platform\Tasks\ScheduleFunctions; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -236,7 +235,7 @@ class Create extends Base $schedule = Authorization::skip( fn () => $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => ScheduleFunctions::getSupportedResource(), + 'resourceType' => RESOURCE_TYPE_FUNCTIONS, 'resourceId' => $function->getId(), 'resourceInternalId' => $function->getSequence(), 'resourceUpdatedAt' => DateTime::now(), From 734d2ce51240845abafe0e536f538a81a6ec164b Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 23 Sep 2025 07:49:07 +0530 Subject: [PATCH 43/58] fix: use correct constant --- app/controllers/api/messaging.php | 12 ++++++------ src/Appwrite/Migration/Version/V19.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index fd1a92e364..dbc384f3c4 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -3102,7 +3102,7 @@ App::post('/v1/messaging/messages/email') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => RESOURCE_TYPE_MESSAGES, + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3244,7 +3244,7 @@ App::post('/v1/messaging/messages/sms') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => RESOURCE_TYPE_MESSAGES, + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3462,7 +3462,7 @@ App::post('/v1/messaging/messages/push') case MessageStatus::SCHEDULED: $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => RESOURCE_TYPE_MESSAGES, + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -3863,7 +3863,7 @@ App::patch('/v1/messaging/messages/email/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => RESOURCE_TYPE_MESSAGES, + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -4084,7 +4084,7 @@ App::patch('/v1/messaging/messages/sms/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => RESOURCE_TYPE_MESSAGES, + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), @@ -4258,7 +4258,7 @@ App::patch('/v1/messaging/messages/push/:messageId') if (\is_null($currentScheduledAt) && !\is_null($scheduledAt)) { $schedule = $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => RESOURCE_TYPE_MESSAGES, + 'resourceType' => SCHEDULE_RESOURCE_TYPE_MESSAGE, 'resourceId' => $message->getId(), 'resourceInternalId' => $message->getSequence(), 'resourceUpdatedAt' => DateTime::now(), diff --git a/src/Appwrite/Migration/Version/V19.php b/src/Appwrite/Migration/Version/V19.php index f5892f07bd..f5cf84c95e 100644 --- a/src/Appwrite/Migration/Version/V19.php +++ b/src/Appwrite/Migration/Version/V19.php @@ -731,7 +731,7 @@ class V19 extends Migration if (empty($document->getAttribute('scheduleId', null))) { $schedule = $this->dbForPlatform->createDocument('schedules', new Document([ 'region' => $this->project->getAttribute('region'), - 'resourceType' => RESOURCE_TYPE_FUNCTIONS, + 'resourceType' => SCHEDULE_RESOURCE_TYPE_FUNCTION, 'resourceId' => $document->getId(), 'resourceInternalId' => $document->getSequence(), 'resourceUpdatedAt' => DateTime::now(), From 421ec6f3f8c72eb528aecacae39be1556e16c763 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 23 Sep 2025 07:49:55 +0530 Subject: [PATCH 44/58] fix: use correct constant --- .../Platform/Modules/Functions/Http/Functions/Create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php index 13444634fb..b00a2ad2bf 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php @@ -235,7 +235,7 @@ class Create extends Base $schedule = Authorization::skip( fn () => $dbForPlatform->createDocument('schedules', new Document([ 'region' => $project->getAttribute('region'), - 'resourceType' => RESOURCE_TYPE_FUNCTIONS, + 'resourceType' => SCHEDULE_RESOURCE_TYPE_FUNCTION, 'resourceId' => $function->getId(), 'resourceInternalId' => $function->getSequence(), 'resourceUpdatedAt' => DateTime::now(), From 84a4ef0bafe46163b5807db0781779e0eead6f00 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 23 Sep 2025 10:47:39 +0530 Subject: [PATCH 45/58] chore: include response model enum names --- app/config/specs/open-api3-1.8.x-console.json | 39 +++++--- app/config/specs/open-api3-1.8.x-server.json | 39 +++++--- .../specs/open-api3-latest-console.json | 39 +++++--- app/config/specs/open-api3-latest-server.json | 39 +++++--- app/config/specs/swagger2-1.8.x-console.json | 39 +++++--- app/config/specs/swagger2-1.8.x-server.json | 39 +++++--- app/config/specs/swagger2-latest-console.json | 39 +++++--- app/config/specs/swagger2-latest-server.json | 39 +++++--- src/Appwrite/SDK/Specification/Format.php | 89 ++++++++++++++++++- .../SDK/Specification/Format/OpenAPI3.php | 14 ++- .../SDK/Specification/Format/Swagger2.php | 14 ++- 11 files changed, 319 insertions(+), 110 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 1dd58c3261..d75265f552 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -46468,7 +46468,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46563,7 +46564,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46660,7 +46662,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46757,7 +46760,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46837,7 +46841,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46924,7 +46929,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47021,7 +47027,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47108,7 +47115,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47195,7 +47203,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47282,7 +47291,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47397,7 +47407,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47483,7 +47494,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47581,7 +47593,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index b437d56bfc..3cb3f01ace 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -35338,7 +35338,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35433,7 +35434,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35530,7 +35532,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35627,7 +35630,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35707,7 +35711,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35794,7 +35799,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35891,7 +35897,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35978,7 +35985,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36065,7 +36073,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36152,7 +36161,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36267,7 +36277,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36353,7 +36364,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36451,7 +36463,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 1dd58c3261..d75265f552 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -46468,7 +46468,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46563,7 +46564,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46660,7 +46662,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46757,7 +46760,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46837,7 +46841,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46924,7 +46929,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47021,7 +47027,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47108,7 +47115,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47195,7 +47203,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47282,7 +47291,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47397,7 +47407,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47483,7 +47494,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47581,7 +47593,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index b437d56bfc..3cb3f01ace 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -35338,7 +35338,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35433,7 +35434,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35530,7 +35532,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35627,7 +35630,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35707,7 +35711,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35794,7 +35799,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35891,7 +35897,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35978,7 +35985,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36065,7 +36073,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36152,7 +36161,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36267,7 +36277,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36353,7 +36364,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36451,7 +36463,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 0f91a5433d..072da6a403 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -46405,7 +46405,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46500,7 +46501,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46597,7 +46599,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46694,7 +46697,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46774,7 +46778,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46861,7 +46866,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46958,7 +46964,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47045,7 +47052,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47132,7 +47140,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47219,7 +47228,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47334,7 +47344,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47420,7 +47431,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47518,7 +47530,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 679da75e5d..3e997b2341 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -35366,7 +35366,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35461,7 +35462,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35558,7 +35560,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35655,7 +35658,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35735,7 +35739,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35822,7 +35827,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35919,7 +35925,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36006,7 +36013,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36093,7 +36101,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36180,7 +36189,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36295,7 +36305,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36381,7 +36392,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36479,7 +36491,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 0f91a5433d..072da6a403 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -46405,7 +46405,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46500,7 +46501,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46597,7 +46599,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46694,7 +46697,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46774,7 +46778,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46861,7 +46866,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -46958,7 +46964,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47045,7 +47052,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47132,7 +47140,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47219,7 +47228,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47334,7 +47344,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47420,7 +47431,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -47518,7 +47530,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 679da75e5d..3e997b2341 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -35366,7 +35366,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35461,7 +35462,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35558,7 +35560,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35655,7 +35658,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35735,7 +35739,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35822,7 +35827,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -35919,7 +35925,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36006,7 +36013,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36093,7 +36101,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36180,7 +36189,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36295,7 +36305,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36381,7 +36392,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", @@ -36479,7 +36491,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "AttributeStatus" }, "error": { "type": "string", diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index 825f9bf01d..d52f36c40c 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -112,7 +112,7 @@ abstract class Format return $this->params[$key] ?? $default; } - protected function getEnumName(string $service, string $method, string $param): ?string + protected function getRequestEnumName(string $service, string $method, string $param): ?string { /* `$service` is `$namespace` */ switch ($service) { @@ -450,7 +450,7 @@ abstract class Format return null; } - public function getEnumKeys(string $service, string $method, string $param): array + public function getRequestEnumKeys(string $service, string $method, string $param): array { $values = []; switch ($service) { @@ -543,6 +543,91 @@ abstract class Format return $values; } + public function getResponseEnumName(string $model, string $param): ?string + { + switch ($model) { + case 'attributeString': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeInteger': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeFloat': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeBoolean': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeEmail': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeEnum': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeIp': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeUrl': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeDatetime': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeRelationship': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributePoint': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributeLine': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + case 'attributePolygon': + switch ($param) { + case 'status': + return 'AttributeStatus'; + } + break; + } + return null; + } + protected function getNestedModels(Model $model, array &$usedModels): void { foreach ($model->getRules() as $rule) { diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index c11e55e733..2380f03920 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -9,6 +9,7 @@ use Appwrite\SDK\Response; use Appwrite\SDK\Specification\Format; use Appwrite\Template\Template; use Appwrite\Utopia\Response\Model; +use Appwrite\Utopia\Response\Model\Any; use Utopia\Database\Database; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; @@ -559,8 +560,8 @@ class OpenAPI3 extends Format if ($allowed) { $node['schema']['enum'] = $validator->getList(); - $node['schema']['x-enum-name'] = $this->getEnumName($sdk->getNamespace() ?? '', $methodName, $name); - $node['schema']['x-enum-keys'] = $this->getEnumKeys($sdk->getNamespace() ?? '', $methodName, $name); + $node['schema']['x-enum-name'] = $this->getRequestEnumName($sdk->getNamespace() ?? '', $methodName, $name); + $node['schema']['x-enum-keys'] = $this->getRequestEnumKeys($sdk->getNamespace() ?? '', $methodName, $name); } if ($validator->getType() === 'integer') { $node['format'] = 'int32'; @@ -777,8 +778,16 @@ class OpenAPI3 extends Format if ($rule['type'] === 'enum' && !empty($rule['enum'])) { if ($rule['array']) { $output['components']['schemas'][$model->getType()]['properties'][$name]['items']['enum'] = $rule['enum']; + $enumName = $this->getResponseEnumName($model->getType(), $name); + if ($enumName) { + $output['components']['schemas'][$model->getType()]['properties'][$name]['items']['x-enum-name'] = $enumName; + } } else { $output['components']['schemas'][$model->getType()]['properties'][$name]['enum'] = $rule['enum']; + $enumName = $this->getResponseEnumName($model->getType(), $name); + if ($enumName) { + $output['components']['schemas'][$model->getType()]['properties'][$name]['x-enum-name'] = $enumName; + } } } if (!in_array($name, $required)) { @@ -786,6 +795,7 @@ class OpenAPI3 extends Format } } + /** @var Any $model */ if ($model->isAny() && !empty($model->getSampleData())) { $examples = array_merge($examples, $model->getSampleData()); } diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 4e784e8116..ed1217d86c 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -9,6 +9,7 @@ use Appwrite\SDK\Response; use Appwrite\SDK\Specification\Format; use Appwrite\Template\Template; use Appwrite\Utopia\Response\Model; +use Appwrite\Utopia\Response\Model\Any; use Utopia\Database\Database; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; @@ -565,8 +566,8 @@ class Swagger2 extends Format if ($allowed && $validator->getType() === 'string') { $node['enum'] = $validator->getList(); - $node['x-enum-name'] = $this->getEnumName($namespace, $methodName, $name); - $node['x-enum-keys'] = $this->getEnumKeys($namespace, $methodName, $name); + $node['x-enum-name'] = $this->getRequestEnumName($namespace, $methodName, $name); + $node['x-enum-keys'] = $this->getRequestEnumKeys($namespace, $methodName, $name); } if ($validator->getType() === 'integer') { @@ -799,8 +800,16 @@ class Swagger2 extends Format if ($rule['type'] === 'enum' && !empty($rule['enum'])) { if ($rule['array']) { $output['definitions'][$model->getType()]['properties'][$name]['items']['enum'] = $rule['enum']; + $enumName = $this->getResponseEnumName($model->getType(), $name); + if ($enumName) { + $output['definitions'][$model->getType()]['properties'][$name]['items']['x-enum-name'] = $enumName; + } } else { $output['definitions'][$model->getType()]['properties'][$name]['enum'] = $rule['enum']; + $enumName = $this->getResponseEnumName($model->getType(), $name); + if ($enumName) { + $output['definitions'][$model->getType()]['properties'][$name]['x-enum-name'] = $enumName; + } } } if (!in_array($name, $required)) { @@ -808,6 +817,7 @@ class Swagger2 extends Format } } + /** @var Any $model */ if ($model->isAny() && !empty($model->getSampleData())) { $examples = array_merge($examples, $model->getSampleData()); } From 17f1cb214fbea4784a316488224d6929a0bcc54d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 23 Sep 2025 10:57:35 +0530 Subject: [PATCH 46/58] override healthstatus --- app/config/specs/open-api3-1.8.x-console.json | 3 ++- app/config/specs/open-api3-1.8.x-server.json | 3 ++- app/config/specs/open-api3-latest-console.json | 3 ++- app/config/specs/open-api3-latest-server.json | 3 ++- app/config/specs/swagger2-1.8.x-console.json | 3 ++- app/config/specs/swagger2-1.8.x-server.json | 3 ++- app/config/specs/swagger2-latest-console.json | 3 ++- app/config/specs/swagger2-latest-server.json | 3 ++- src/Appwrite/SDK/Specification/Format.php | 6 ++++++ 9 files changed, 22 insertions(+), 8 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index d75265f552..86b5f3ba6f 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -53809,7 +53809,8 @@ "enum": [ "pass", "fail" - ] + ], + "x-enum-name": "HealthStatus" } }, "required": [ diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 3cb3f01ace..b9270ad857 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -40997,7 +40997,8 @@ "enum": [ "pass", "fail" - ] + ], + "x-enum-name": "HealthStatus" } }, "required": [ diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index d75265f552..86b5f3ba6f 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -53809,7 +53809,8 @@ "enum": [ "pass", "fail" - ] + ], + "x-enum-name": "HealthStatus" } }, "required": [ diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 3cb3f01ace..b9270ad857 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -40997,7 +40997,8 @@ "enum": [ "pass", "fail" - ] + ], + "x-enum-name": "HealthStatus" } }, "required": [ diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 072da6a403..f682fc8670 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -53765,7 +53765,8 @@ "enum": [ "pass", "fail" - ] + ], + "x-enum-name": "HealthStatus" } }, "required": [ diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 3e997b2341..bade0bae90 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -41034,7 +41034,8 @@ "enum": [ "pass", "fail" - ] + ], + "x-enum-name": "HealthStatus" } }, "required": [ diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 072da6a403..f682fc8670 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -53765,7 +53765,8 @@ "enum": [ "pass", "fail" - ] + ], + "x-enum-name": "HealthStatus" } }, "required": [ diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 3e997b2341..bade0bae90 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -41034,7 +41034,8 @@ "enum": [ "pass", "fail" - ] + ], + "x-enum-name": "HealthStatus" } }, "required": [ diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index d52f36c40c..7db5d5f559 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -624,6 +624,12 @@ abstract class Format return 'AttributeStatus'; } break; + case 'healthStatus': + switch ($param) { + case 'status': + return 'HealthStatus'; + } + break; } return null; } From 5d8ac0a5b0628b7b3b9b6b3eca4205eaf5420b91 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 23 Sep 2025 11:31:29 +0530 Subject: [PATCH 47/58] add message status --- app/config/specs/open-api3-1.8.x-console.json | 9 ++++++++- app/config/specs/open-api3-1.8.x-server.json | 9 ++++++++- app/config/specs/open-api3-latest-console.json | 9 ++++++++- app/config/specs/open-api3-latest-server.json | 9 ++++++++- app/config/specs/swagger2-1.8.x-console.json | 9 ++++++++- app/config/specs/swagger2-1.8.x-server.json | 9 ++++++++- app/config/specs/swagger2-latest-console.json | 9 ++++++++- app/config/specs/swagger2-latest-server.json | 9 ++++++++- src/Appwrite/Utopia/Response/Model/Message.php | 6 ++++-- 9 files changed, 68 insertions(+), 10 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 86b5f3ba6f..31471b170c 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -56549,7 +56549,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index b9270ad857..259485c793 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -41463,7 +41463,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 86b5f3ba6f..31471b170c 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -56549,7 +56549,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index b9270ad857..259485c793 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -41463,7 +41463,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index f682fc8670..1abb7c4ef8 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -56598,7 +56598,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index bade0bae90..f350d10c54 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -41502,7 +41502,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index f682fc8670..1abb7c4ef8 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -56598,7 +56598,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index bade0bae90..f350d10c54 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -41502,7 +41502,14 @@ "status": { "type": "string", "description": "Status of delivery.", - "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + "x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ diff --git a/src/Appwrite/Utopia/Response/Model/Message.php b/src/Appwrite/Utopia/Response/Model/Message.php index e52b6836c5..4c1e08b9cb 100644 --- a/src/Appwrite/Utopia/Response/Model/Message.php +++ b/src/Appwrite/Utopia/Response/Model/Message.php @@ -34,6 +34,7 @@ class Message extends Model 'description' => 'Message provider type.', 'default' => '', 'example' => MESSAGE_TYPE_EMAIL, + 'enum' => [MESSAGE_TYPE_EMAIL, MESSAGE_TYPE_SMS, MESSAGE_TYPE_PUSH], ]) ->addRule('topics', [ 'type' => self::TYPE_STRING, @@ -50,7 +51,7 @@ class Message extends Model 'example' => ['5e5ea5c16897e'], ]) ->addRule('targets', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Target IDs set as recipients.', 'default' => '', 'array' => true, @@ -94,10 +95,11 @@ class Message extends Model ], ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Status of delivery.', 'default' => 'draft', 'example' => 'Message status can be one of the following: draft, processing, scheduled, sent, or failed.', + 'enum' => ['draft', 'processing', 'scheduled', 'sent', 'failed'], ]); } From 0995bd6a6edfd49e3138c1a2e172eace7c11de61 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 23 Sep 2025 19:17:06 +1200 Subject: [PATCH 48/58] SDK releases --- app/config/platforms.php | 28 +++--- composer.lock | 94 +++++++++++-------- .../functions/create-duplicate-deployment.md | 2 +- .../functions/create-template-deployment.md | 2 +- .../functions/create-vcs-deployment.md | 2 +- .../functions/update-deployment-status.md | 2 +- .../sites/create-duplicate-deployment.md | 2 +- .../sites/create-template-deployment.md | 2 +- .../examples/sites/create-vcs-deployment.md | 2 +- .../sites/update-deployment-status.md | 2 +- docs/sdks/dart/CHANGELOG.md | 4 + docs/sdks/flutter/CHANGELOG.md | 4 + 12 files changed, 83 insertions(+), 63 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 7aec82d1cf..8a33144b2f 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -11,7 +11,7 @@ return [ [ 'key' => 'web', 'name' => 'Web', - 'version' => '20.0.0', + 'version' => '20.1.0', 'url' => 'https://github.com/appwrite/sdk-for-web', 'package' => 'https://www.npmjs.com/package/appwrite', 'enabled' => true, @@ -60,7 +60,7 @@ return [ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '19.0.0', + 'version' => '19.1.0', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, @@ -79,7 +79,7 @@ return [ [ 'key' => 'apple', 'name' => 'Apple', - 'version' => '12.0.0', + 'version' => '12.1.0', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -116,7 +116,7 @@ return [ [ 'key' => 'android', 'name' => 'Android', - 'version' => '10.0.0', + 'version' => '10.1.0', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -139,7 +139,7 @@ return [ [ 'key' => 'react-native', 'name' => 'React Native', - 'version' => '0.13.0', + 'version' => '0.14.0', 'url' => 'https://github.com/appwrite/sdk-for-react-native', 'package' => 'https://npmjs.com/package/react-native-appwrite', 'enabled' => true, @@ -262,7 +262,7 @@ return [ [ 'key' => 'nodejs', 'name' => 'Node.js', - 'version' => '19.0.0', + 'version' => '19.1.0', 'url' => 'https://github.com/appwrite/sdk-for-node', 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, @@ -281,7 +281,7 @@ return [ [ 'key' => 'php', 'name' => 'PHP', - 'version' => '17.0.0', + 'version' => '17.1.0', 'url' => 'https://github.com/appwrite/sdk-for-php', 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, @@ -300,7 +300,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '13.0.0', + 'version' => '13.1.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -319,7 +319,7 @@ return [ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '18.0.0', + 'version' => '18.1.0', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -338,7 +338,7 @@ return [ [ 'key' => 'go', 'name' => 'Go', - 'version' => '0.11.0', + 'version' => '0.12.0', 'url' => 'https://github.com/appwrite/sdk-for-go', 'package' => 'https://github.com/appwrite/sdk-for-go', 'enabled' => true, @@ -357,7 +357,7 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.17.0', + 'version' => '0.18.0', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, @@ -376,7 +376,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '18.0.0', + 'version' => '18.1.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, @@ -395,7 +395,7 @@ return [ [ 'key' => 'kotlin', 'name' => 'Kotlin', - 'version' => '11.0.0', + 'version' => '11.1.0', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, @@ -418,7 +418,7 @@ return [ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '12.0.0', + 'version' => '12.1.0', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, diff --git a/composer.lock b/composer.lock index 98089f9ed9..b9475de5b9 100644 --- a/composer.lock +++ b/composer.lock @@ -1159,20 +1159,20 @@ }, { "name": "open-telemetry/api", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/api.git", - "reference": "7692075f486c14d8cfd37fba98a08a5667f089e5" + "reference": "ee17d937652eca06c2341b6fadc0f74c1c1a5af2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/7692075f486c14d8cfd37fba98a08a5667f089e5", - "reference": "7692075f486c14d8cfd37fba98a08a5667f089e5", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/ee17d937652eca06c2341b6fadc0f74c1c1a5af2", + "reference": "ee17d937652eca06c2341b6fadc0f74c1c1a5af2", "shasum": "" }, "require": { - "open-telemetry/context": "^1.0", + "open-telemetry/context": "^1.4", "php": "^8.1", "psr/log": "^1.1|^2.0|^3.0", "symfony/polyfill-php82": "^1.26" @@ -1225,20 +1225,20 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-08-07T23:07:38+00:00" + "time": "2025-09-19T00:05:49+00:00" }, { "name": "open-telemetry/context", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/context.git", - "reference": "438f71812242db3f196fb4c717c6f92cbc819be6" + "reference": "d4c4470b541ce72000d18c339cfee633e4c8e0cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/438f71812242db3f196fb4c717c6f92cbc819be6", - "reference": "438f71812242db3f196fb4c717c6f92cbc819be6", + "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/d4c4470b541ce72000d18c339cfee633e4c8e0cf", + "reference": "d4c4470b541ce72000d18c339cfee633e4c8e0cf", "shasum": "" }, "require": { @@ -1284,7 +1284,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-08-13T01:12:00+00:00" + "time": "2025-09-19T00:05:49+00:00" }, { "name": "open-telemetry/exporter-otlp", @@ -1415,23 +1415,23 @@ }, { "name": "open-telemetry/sdk", - "version": "1.7.1", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sdk.git", - "reference": "52690d4b37ae4f091af773eef3c238ed2bc0aa06" + "reference": "105c6e81e3d86150bd5704b00c7e4e165e957b89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/52690d4b37ae4f091af773eef3c238ed2bc0aa06", - "reference": "52690d4b37ae4f091af773eef3c238ed2bc0aa06", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/105c6e81e3d86150bd5704b00c7e4e165e957b89", + "reference": "105c6e81e3d86150bd5704b00c7e4e165e957b89", "shasum": "" }, "require": { "ext-json": "*", "nyholm/psr7-server": "^1.1", - "open-telemetry/api": "^1.4", - "open-telemetry/context": "^1.0", + "open-telemetry/api": "^1.6", + "open-telemetry/context": "^1.4", "open-telemetry/sem-conv": "^1.0", "php": "^8.1", "php-http/discovery": "^1.14", @@ -1508,7 +1508,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-09-05T07:17:06+00:00" + "time": "2025-09-19T00:05:49+00:00" }, { "name": "open-telemetry/sem-conv", @@ -1569,16 +1569,16 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.7.0", + "version": "v2.8.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" + "reference": "ce27936c8dfb73e3ab9c94469130428af9752c96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", - "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/ce27936c8dfb73e3ab9c94469130428af9752c96", + "reference": "ce27936c8dfb73e3ab9c94469130428af9752c96", "shasum": "" }, "require": { @@ -1632,7 +1632,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2024-05-08T12:18:48+00:00" + "time": "2025-09-22T20:41:46+00:00" }, { "name": "paragonie/random_compat", @@ -5004,16 +5004,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.3.5", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "6fda9e58b37c9872c1a2a424e5467de8de1bc567" + "reference": "3583fa6fddb1d1a902b37ff2048527a5827fc008" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/6fda9e58b37c9872c1a2a424e5467de8de1bc567", - "reference": "6fda9e58b37c9872c1a2a424e5467de8de1bc567", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/3583fa6fddb1d1a902b37ff2048527a5827fc008", + "reference": "3583fa6fddb1d1a902b37ff2048527a5827fc008", "shasum": "" }, "require": { @@ -5049,9 +5049,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/1.3.5" + "source": "https://github.com/appwrite/sdk-generator/tree/1.4.0" }, - "time": "2025-09-15T04:19:40+00:00" + "time": "2025-09-23T02:27:10+00:00" }, { "name": "doctrine/annotations", @@ -5278,16 +5278,16 @@ }, { "name": "laravel/pint", - "version": "v1.25.0", + "version": "v1.25.1", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "595de38458c6b0ab4cae4bcc769c2e5c5d5b8e96" + "reference": "5016e263f95d97670d71b9a987bd8996ade6d8d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/595de38458c6b0ab4cae4bcc769c2e5c5d5b8e96", - "reference": "595de38458c6b0ab4cae4bcc769c2e5c5d5b8e96", + "url": "https://api.github.com/repos/laravel/pint/zipball/5016e263f95d97670d71b9a987bd8996ade6d8d9", + "reference": "5016e263f95d97670d71b9a987bd8996ade6d8d9", "shasum": "" }, "require": { @@ -5340,7 +5340,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2025-09-17T01:36:44+00:00" + "time": "2025-09-19T02:57:12+00:00" }, { "name": "matthiasmullie/minify", @@ -6829,16 +6829,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.6", + "version": "4.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" + "reference": "eb49b981ef0817890129cb70f774506bebe57740" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/eb49b981ef0817890129cb70f774506bebe57740", + "reference": "eb49b981ef0817890129cb70f774506bebe57740", "shasum": "" }, "require": { @@ -6894,15 +6894,27 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.7" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" } ], - "time": "2024-03-02T06:33:00+00:00" + "time": "2025-09-22T05:18:21+00:00" }, { "name": "sebastian/global-state", @@ -8506,7 +8518,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md index cdd92c2a02..bc3587fcec 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md @@ -24,12 +24,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md index 12c50c32f3..0ce968e5f4 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md @@ -27,12 +27,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md index ebfced2c68..60a78c41ca 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md @@ -25,12 +25,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md index 50df97fd21..68735b35ca 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md @@ -23,12 +23,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md index 6226282651..1b2d3dc131 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md @@ -23,12 +23,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md index 72562556e4..f63d8c5e5a 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md @@ -27,12 +27,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md index ccc18cf2e0..6c5241e734 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md @@ -25,12 +25,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md index 92751c167f..24064428e2 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md @@ -23,12 +23,12 @@ mutation { providerRepositoryName providerRepositoryOwner providerRepositoryUrl - providerBranch providerCommitHash providerCommitAuthorUrl providerCommitAuthor providerCommitMessage providerCommitUrl + providerBranch providerBranchUrl } } diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index 7033bbdd1d..7e33794153 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 18.1.0 + +* Add `orderRandom` query support + ## 18.0.0 * Rename `CreditCard` enum value `unionChinaPay` to `unionPay` diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 7ff4a445b3..f704415675 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 19.1.0 + +* Add `orderRandom` query support + ## 19.0.0 * Rename `CreditCard` enum value `unionChinaPay` to `unionPay` From 9ede8cfb91bb59b748d87b94fa5e30525192a678 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 23 Sep 2025 16:52:35 +0530 Subject: [PATCH 49/58] fix: healthstatus enum override due to conflict --- app/config/specs/open-api3-1.8.x-console.json | 2 +- app/config/specs/open-api3-1.8.x-server.json | 2 +- app/config/specs/open-api3-latest-console.json | 2 +- app/config/specs/open-api3-latest-server.json | 2 +- app/config/specs/swagger2-1.8.x-console.json | 2 +- app/config/specs/swagger2-1.8.x-server.json | 2 +- app/config/specs/swagger2-latest-console.json | 2 +- app/config/specs/swagger2-latest-server.json | 2 +- src/Appwrite/SDK/Specification/Format.php | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 31471b170c..ab36ae475c 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -53810,7 +53810,7 @@ "pass", "fail" ], - "x-enum-name": "HealthStatus" + "x-enum-name": "HealthCheckStatus" } }, "required": [ diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 259485c793..93a0d9d46b 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -40998,7 +40998,7 @@ "pass", "fail" ], - "x-enum-name": "HealthStatus" + "x-enum-name": "HealthCheckStatus" } }, "required": [ diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 31471b170c..ab36ae475c 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -53810,7 +53810,7 @@ "pass", "fail" ], - "x-enum-name": "HealthStatus" + "x-enum-name": "HealthCheckStatus" } }, "required": [ diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 259485c793..93a0d9d46b 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -40998,7 +40998,7 @@ "pass", "fail" ], - "x-enum-name": "HealthStatus" + "x-enum-name": "HealthCheckStatus" } }, "required": [ diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 1abb7c4ef8..e830f768be 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -53766,7 +53766,7 @@ "pass", "fail" ], - "x-enum-name": "HealthStatus" + "x-enum-name": "HealthCheckStatus" } }, "required": [ diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index f350d10c54..0a5fc8fe95 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -41035,7 +41035,7 @@ "pass", "fail" ], - "x-enum-name": "HealthStatus" + "x-enum-name": "HealthCheckStatus" } }, "required": [ diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 1abb7c4ef8..e830f768be 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -53766,7 +53766,7 @@ "pass", "fail" ], - "x-enum-name": "HealthStatus" + "x-enum-name": "HealthCheckStatus" } }, "required": [ diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index f350d10c54..0a5fc8fe95 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -41035,7 +41035,7 @@ "pass", "fail" ], - "x-enum-name": "HealthStatus" + "x-enum-name": "HealthCheckStatus" } }, "required": [ diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index 7db5d5f559..db7335e40f 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -627,7 +627,7 @@ abstract class Format case 'healthStatus': switch ($param) { case 'status': - return 'HealthStatus'; + return 'HealthCheckStatus'; } break; } From 7ea01733ef3d565198df0f012eb1ac88523e764e Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 23 Sep 2025 18:28:29 +0530 Subject: [PATCH 50/58] chore: update afterbuild fn --- src/Appwrite/Platform/Modules/Functions/Workers/Builds.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 9547a752ef..72736a2c9b 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -899,7 +899,7 @@ class Builds extends Action Console::log('Build details stored'); - $this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment); + $this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment, $runtime); $logs = $deployment->getAttribute('buildLogs', ''); /** Screenshot site */ @@ -1392,11 +1392,12 @@ class Builds extends Action * @param Document $deployment * @return void */ - protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment): void + protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime): void { assert($queueForRealtime instanceof Realtime); assert($dbForProject instanceof Database); assert($deployment instanceof Document); + assert(is_array($runtime)); } protected function getRuntime(Document $resource, string $version): array From 5749b4175356a217f740b584ae3741c2cf7b7cc3 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 24 Sep 2025 10:00:55 +0530 Subject: [PATCH 51/58] updated to use if throw checks --- .../Modules/Functions/Workers/Builds.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 72736a2c9b..f2f3b132aa 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -1391,13 +1391,22 @@ class Builds extends Action * @param Database $dbForProject * @param Document $deployment * @return void + * @throws Exception */ protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime): void { - assert($queueForRealtime instanceof Realtime); - assert($dbForProject instanceof Database); - assert($deployment instanceof Document); - assert(is_array($runtime)); + if (!($queueForRealtime instanceof Realtime)) { + throw new Exception('queueForRealtime must be an instance of Realtime'); + } + if (!($dbForProject instanceof Database)) { + throw new Exception('dbForProject must be an instance of Database'); + } + if (!($deployment instanceof Document)) { + throw new Exception('deployment must be an instance of Document'); + } + if (!is_array($runtime)) { + throw new Exception('runtime must be an array'); + } } protected function getRuntime(Document $resource, string $version): array From 9d99f5cec254a531f57802e1e75d0ba3149cbc8f Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 24 Sep 2025 11:47:13 +0530 Subject: [PATCH 52/58] chore: update afterbuild pass adapter --- src/Appwrite/Platform/Modules/Functions/Workers/Builds.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index f2f3b132aa..9dc70718a5 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -899,7 +899,7 @@ class Builds extends Action Console::log('Build details stored'); - $this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment, $runtime); + $this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment, $runtime, $adapter); $logs = $deployment->getAttribute('buildLogs', ''); /** Screenshot site */ @@ -1393,7 +1393,7 @@ class Builds extends Action * @return void * @throws Exception */ - protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime): void + protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime, string $adapter): void { if (!($queueForRealtime instanceof Realtime)) { throw new Exception('queueForRealtime must be an instance of Realtime'); @@ -1407,6 +1407,9 @@ class Builds extends Action if (!is_array($runtime)) { throw new Exception('runtime must be an array'); } + if (!is_string($adapter)) { + throw new Exception('adapter must be a string'); + } } protected function getRuntime(Document $resource, string $version): array From 85da691aecfb9434cd1062b5cd47536845ffc79d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 24 Sep 2025 13:05:37 +0530 Subject: [PATCH 53/58] allow null adapter --- .../Platform/Modules/Functions/Workers/Builds.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 9dc70718a5..ce45d6b629 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -1390,10 +1390,12 @@ class Builds extends Action * @param Realtime $queueForRealtime * @param Database $dbForProject * @param Document $deployment + * @param array $runtime + * @param string|null $adapter * @return void * @throws Exception */ - protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime, string $adapter): void + protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime, ?string $adapter): void { if (!($queueForRealtime instanceof Realtime)) { throw new Exception('queueForRealtime must be an instance of Realtime'); @@ -1407,8 +1409,8 @@ class Builds extends Action if (!is_array($runtime)) { throw new Exception('runtime must be an array'); } - if (!is_string($adapter)) { - throw new Exception('adapter must be a string'); + if (!is_string($adapter) && !is_null($adapter)) { + throw new Exception('adapter must be a string or null'); } } From c00eec948a32befb81968772342cbe55d3665309 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 24 Sep 2025 18:01:43 +0530 Subject: [PATCH 54/58] remove: unnecessary changes. --- .github/labeler.yml | 83 -------------------------- .github/workflows/auto-label-issue.yml | 22 ------- README.md | 2 +- 3 files changed, 1 insertion(+), 106 deletions(-) delete mode 100644 .github/labeler.yml delete mode 100644 .github/workflows/auto-label-issue.yml diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index fb46eb5ba1..0000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,83 +0,0 @@ -# Fixes and upgrades for the Appwrite Auth / Users / Teams services. -"product / auth": - - "(auth|session|login|logout|register|2fa|mfa|users|teams|memberships|invite|oauth|oauth2|sso|jwt)" - -# Fixes and upgrades for the Appwrite Realtime API. -"api / realtime": - - "(realtime|subscribe|websockets)" - -# Console, UI and UX issues -"product / console": - - "(console)" - -# Fixes and upgrades for the Appwrite Storage. -"product / storage": - - "(storage|bucket|file|image|preview|download)" - -# Fixes and upgrades for the Appwrite Database. -"product / databases": - - "(database|collection|tables|attribute|column|document|row|query|queries|indexes|search|filter|sort|pagination)" - -# Fixes and upgrades for the Appwrite Functions. -"product / functions": - - "(function|runtime|deployment|execution|trigger|cron|schedule)" - -# Fixes and upgrades for the Appwrite Docs. -# "product / docs": -# - - -# Fixes and upgrades for the Appwrite Migrations. -"product / migrations": - - "(migrate|migration)" - -# Fixes and upgrades for the Appwrite Messaging. -"product / messaging": - - "(messaging|email|sms|push|provider|topic|target|notification)" - -# Fixes and upgrades for the Appwrite Platform. -# "product / platform": -# - - -# Fixes and upgrades for database relationships -"feature / relationships": - - "(relationship)" - -# Issues found only on Appwrite Cloud -# "product / cloud": -# - - -# Fixes and upgrades for the Appwrite VCS. -"product / vcs": - - "(repo|push|vcs|repository)" - -# Fixes and upgrades for the Appwrite GraphQL API. -"api / graphql": - - "(graphql|gql|mutation)" - -# Fixes and upgrades for the Appwrite Assistant. -"product / assistant": - - "(assistant)" - -# Fixes and upgrades for the Appwrite Domains. -"product / domains": - - "(domain|dns|ssl|certificate)" - -# Fixes and upgrades for the Appwrite Locale. -"product / locale": - - "(locale|i18n|internationalization|localization|l10n|translation|timezone|country)" - -# Fixes and upgrades for the Appwrite Avatars. -"product / avatars": - - "(avatar|initial|flag|icon)" - -# Fixes and upgrades for Appwrite Sites. -"product / sites": - - "(site|web|hosting|domain|ssl|certificate|nextjs|nuxt|react|angular|vue|svelte|astro)" - -# Fixes and upgrades for the Appwrite CLI. -"sdk / cli": - - "(cli|command line)" - -# Issues only found when self-hosting Appwrite -"product / self-hosted": - - "(self-host|self host)" diff --git a/.github/workflows/auto-label-issue.yml b/.github/workflows/auto-label-issue.yml deleted file mode 100644 index e0eb0de98d..0000000000 --- a/.github/workflows/auto-label-issue.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Auto Label Issue - -on: - issues: - types: [opened] - -permissions: - issues: write - contents: read - -jobs: - labeler: - runs-on: ubuntu-latest - steps: - - name: Issue Labeler - uses: github/issue-labeler@v3.4 - with: - configuration-path: .github/labeler.yml - enable-versioned-regex: false - include-title: 1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index c9b8a39fb2..9cd5808e33 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> We just announced API for spatial columns for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-spatial-columns) +> We just announced Timestamp Overrides for Appwrite Databases - [Learn more](https://appwrite.io/blog/post/announcing-timestamp-overrides) > Appwrite Cloud is now Generally Available - [Learn more](https://appwrite.io/cloud-ga) From 14c64e405b582cb55450444e5a29e71af6d28e47 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 25 Sep 2025 19:45:32 +0530 Subject: [PATCH 55/58] chore: update framework lib --- composer.lock | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/composer.lock b/composer.lock index b9475de5b9..f5a8c43b32 100644 --- a/composer.lock +++ b/composer.lock @@ -1569,16 +1569,16 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.8.0", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "ce27936c8dfb73e3ab9c94469130428af9752c96" + "reference": "e30811f7bc69e4b5b6d5783e712c06c8eabf0226" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/ce27936c8dfb73e3ab9c94469130428af9752c96", - "reference": "ce27936c8dfb73e3ab9c94469130428af9752c96", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/e30811f7bc69e4b5b6d5783e712c06c8eabf0226", + "reference": "e30811f7bc69e4b5b6d5783e712c06c8eabf0226", "shasum": "" }, "require": { @@ -1632,7 +1632,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2025-09-22T20:41:46+00:00" + "time": "2025-09-24T15:12:37+00:00" }, { "name": "paragonie/random_compat", @@ -3939,16 +3939,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.27", + "version": "0.33.28", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "d9d10a895e85c8c7675220347cc6109db9d3bd37" + "reference": "5aaa94d406577b0059ad28c78022606890dc6de0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/d9d10a895e85c8c7675220347cc6109db9d3bd37", - "reference": "d9d10a895e85c8c7675220347cc6109db9d3bd37", + "url": "https://api.github.com/repos/utopia-php/http/zipball/5aaa94d406577b0059ad28c78022606890dc6de0", + "reference": "5aaa94d406577b0059ad28c78022606890dc6de0", "shasum": "" }, "require": { @@ -3980,9 +3980,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.27" + "source": "https://github.com/utopia-php/http/tree/0.33.28" }, - "time": "2025-09-07T18:40:53+00:00" + "time": "2025-09-25T10:44:24+00:00" }, { "name": "utopia-php/image", @@ -4187,16 +4187,16 @@ }, { "name": "utopia-php/migration", - "version": "1.1.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "c42935a6a4ee3701c68d24244e82ecb39e945ec4" + "reference": "42ff497c5231f5a727d1e229419ff1d2195d8093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/c42935a6a4ee3701c68d24244e82ecb39e945ec4", - "reference": "c42935a6a4ee3701c68d24244e82ecb39e945ec4", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/42ff497c5231f5a727d1e229419ff1d2195d8093", + "reference": "42ff497c5231f5a727d1e229419ff1d2195d8093", "shasum": "" }, "require": { @@ -4237,9 +4237,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.1.1" + "source": "https://github.com/utopia-php/migration/tree/1.2.0" }, - "time": "2025-09-10T06:17:20+00:00" + "time": "2025-09-24T10:32:24+00:00" }, { "name": "utopia-php/orchestration", @@ -6230,16 +6230,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.27", + "version": "9.6.29", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0a9aa4440b6a9528cf360071502628d717af3e0a" + "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0a9aa4440b6a9528cf360071502628d717af3e0a", - "reference": "0a9aa4440b6a9528cf360071502628d717af3e0a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ecfec57835a5581bc888ea7e13b51eb55ab9dd3", + "reference": "9ecfec57835a5581bc888ea7e13b51eb55ab9dd3", "shasum": "" }, "require": { @@ -6264,7 +6264,7 @@ "sebastian/comparator": "^4.0.9", "sebastian/diff": "^4.0.6", "sebastian/environment": "^5.1.5", - "sebastian/exporter": "^4.0.6", + "sebastian/exporter": "^4.0.8", "sebastian/global-state": "^5.0.8", "sebastian/object-enumerator": "^4.0.4", "sebastian/resource-operations": "^3.0.4", @@ -6313,7 +6313,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.27" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.29" }, "funding": [ { @@ -6337,7 +6337,7 @@ "type": "tidelift" } ], - "time": "2025-09-14T06:18:03+00:00" + "time": "2025-09-24T06:29:11+00:00" }, { "name": "psr/cache", @@ -6829,16 +6829,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.7", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "eb49b981ef0817890129cb70f774506bebe57740" + "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/eb49b981ef0817890129cb70f774506bebe57740", - "reference": "eb49b981ef0817890129cb70f774506bebe57740", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c", + "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c", "shasum": "" }, "require": { @@ -6894,7 +6894,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.7" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.8" }, "funding": [ { @@ -6914,7 +6914,7 @@ "type": "tidelift" } ], - "time": "2025-09-22T05:18:21+00:00" + "time": "2025-09-24T06:03:27+00:00" }, { "name": "sebastian/global-state", From a0f0449c21d903badf4dd5b3d62f996a850749b8 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 26 Sep 2025 12:33:10 +0530 Subject: [PATCH 56/58] fix: enum typing for platform in specs --- app/config/specs/open-api3-1.8.x-console.json | 16 +++++++++---- .../specs/open-api3-latest-console.json | 16 +++++++++---- app/config/specs/swagger2-1.8.x-console.json | 16 +++++++++---- app/config/specs/swagger2-latest-console.json | 16 +++++++++---- app/controllers/api/projects.php | 23 ++++++++++++++++++- .../Utopia/Response/Model/Platform.php | 4 ++-- 6 files changed, 72 insertions(+), 19 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index ab36ae475c..5eac3ca9f6 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -25153,7 +25153,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", @@ -53440,16 +53440,24 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", "flutter-web", "flutter-ios", "flutter-android", - "ios", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", "android", - "unity" + "unity", + "react-native-ios", + "react-native-android" ] }, "key": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index ab36ae475c..5eac3ca9f6 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -25153,7 +25153,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", @@ -53440,16 +53440,24 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", "flutter-web", "flutter-ios", "flutter-android", - "ios", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", "android", - "unity" + "unity", + "react-native-ios", + "react-native-android" ] }, "key": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index e830f768be..0a6bdf0889 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -25305,7 +25305,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "default": null, "x-example": "web", "enum": [ @@ -53396,16 +53396,24 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", "flutter-web", "flutter-ios", "flutter-android", - "ios", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", "android", - "unity" + "unity", + "react-native-ios", + "react-native-android" ] }, "key": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index e830f768be..0a6bdf0889 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -25305,7 +25305,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "default": null, "x-example": "web", "enum": [ @@ -53396,16 +53396,24 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", "flutter-web", "flutter-ios", "flutter-android", - "ios", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", "android", - "unity" + "unity", + "react-native-ios", + "react-native-android" ] }, "key": { diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index ea3a00dcb6..80d407322e 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -1756,7 +1756,28 @@ App::post('/v1/projects/:projectId/platforms') ] )) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('type', null, new WhiteList([Platform::TYPE_WEB, Platform::TYPE_FLUTTER_WEB, Platform::TYPE_FLUTTER_IOS, Platform::TYPE_FLUTTER_ANDROID, Platform::TYPE_FLUTTER_LINUX, Platform::TYPE_FLUTTER_MACOS, Platform::TYPE_FLUTTER_WINDOWS, Platform::TYPE_APPLE_IOS, Platform::TYPE_APPLE_MACOS, Platform::TYPE_APPLE_WATCHOS, Platform::TYPE_APPLE_TVOS, Platform::TYPE_ANDROID, Platform::TYPE_UNITY, Platform::TYPE_REACT_NATIVE_IOS, Platform::TYPE_REACT_NATIVE_ANDROID], true), 'Platform type.') + ->param( + 'type', + null, + new WhiteList([ + Platform::TYPE_WEB, + Platform::TYPE_FLUTTER_WEB, + Platform::TYPE_FLUTTER_IOS, + Platform::TYPE_FLUTTER_ANDROID, + Platform::TYPE_FLUTTER_LINUX, + Platform::TYPE_FLUTTER_MACOS, + Platform::TYPE_FLUTTER_WINDOWS, + Platform::TYPE_APPLE_IOS, + Platform::TYPE_APPLE_MACOS, + Platform::TYPE_APPLE_WATCHOS, + Platform::TYPE_APPLE_TVOS, + Platform::TYPE_ANDROID, + Platform::TYPE_UNITY, + Platform::TYPE_REACT_NATIVE_IOS, + Platform::TYPE_REACT_NATIVE_ANDROID, + ], true), + 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.' + ) ->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.') ->param('key', '', new Text(256), 'Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.', true) ->param('store', '', new Text(256), 'App store or Google Play store ID. Max length: 256 chars.', true) diff --git a/src/Appwrite/Utopia/Response/Model/Platform.php b/src/Appwrite/Utopia/Response/Model/Platform.php index 65f3c343d4..151e43780d 100644 --- a/src/Appwrite/Utopia/Response/Model/Platform.php +++ b/src/Appwrite/Utopia/Response/Model/Platform.php @@ -41,10 +41,10 @@ class Platform extends Model ]) ->addRule('type', [ 'type' => self::TYPE_ENUM, - 'description' => 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.', + 'description' => 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.', 'default' => '', 'example' => 'web', - 'enum' => ['web', 'flutter-web', 'flutter-ios', 'flutter-android', 'ios', 'android', 'unity'], + 'enum' => ['web', 'flutter-web', 'flutter-ios', 'flutter-android', 'flutter-linux', 'flutter-macos', 'flutter-windows', 'apple-ios', 'apple-macos', 'apple-watchos', 'apple-tvos', 'android', 'unity', 'react-native-ios', 'react-native-android'], ]) ->addRule('key', [ 'type' => self::TYPE_STRING, From d5e1f9952ae05efab0b1320395949ea19bf903e2 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 29 Sep 2025 11:26:00 +0530 Subject: [PATCH 57/58] chore: add enums for database type and column status --- app/config/specs/open-api3-1.8.x-console.json | 123 ++++++++++++++++-- app/config/specs/open-api3-1.8.x-server.json | 123 ++++++++++++++++-- .../specs/open-api3-latest-console.json | 123 ++++++++++++++++-- app/config/specs/open-api3-latest-server.json | 123 ++++++++++++++++-- app/config/specs/swagger2-1.8.x-console.json | 123 ++++++++++++++++-- app/config/specs/swagger2-1.8.x-server.json | 123 ++++++++++++++++-- app/config/specs/swagger2-latest-console.json | 123 ++++++++++++++++-- app/config/specs/swagger2-latest-server.json | 123 ++++++++++++++++-- src/Appwrite/Utopia/Response/Model/Column.php | 3 +- .../Utopia/Response/Model/Database.php | 3 +- 10 files changed, 876 insertions(+), 114 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 5eac3ca9f6..4a27d5a49b 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -46223,7 +46223,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -47910,7 +47914,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47998,7 +48009,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48088,7 +48106,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48178,7 +48203,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48251,7 +48283,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48331,7 +48370,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48421,7 +48467,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48501,7 +48554,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48581,7 +48641,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48661,7 +48728,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48769,7 +48843,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48848,7 +48929,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48939,7 +49027,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 93a0d9d46b..50f668ea64 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -35093,7 +35093,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -36780,7 +36784,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36868,7 +36879,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36958,7 +36976,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37048,7 +37073,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37121,7 +37153,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37201,7 +37240,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37291,7 +37337,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37371,7 +37424,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37451,7 +37511,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37531,7 +37598,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37639,7 +37713,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37718,7 +37799,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37809,7 +37897,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 5eac3ca9f6..4a27d5a49b 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -46223,7 +46223,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -47910,7 +47914,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47998,7 +48009,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48088,7 +48106,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48178,7 +48203,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48251,7 +48283,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48331,7 +48370,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48421,7 +48467,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48501,7 +48554,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48581,7 +48641,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48661,7 +48728,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48769,7 +48843,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48848,7 +48929,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48939,7 +49027,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 93a0d9d46b..50f668ea64 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -35093,7 +35093,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -36780,7 +36784,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36868,7 +36879,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36958,7 +36976,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37048,7 +37073,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37121,7 +37153,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37201,7 +37240,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37291,7 +37337,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37371,7 +37424,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37451,7 +37511,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37531,7 +37598,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37639,7 +37713,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37718,7 +37799,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37809,7 +37897,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 0a6bdf0889..aa0f0ec520 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -46159,7 +46159,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -47848,7 +47852,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47936,7 +47947,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48026,7 +48044,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48116,7 +48141,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48189,7 +48221,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48269,7 +48308,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48359,7 +48405,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48439,7 +48492,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48519,7 +48579,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48599,7 +48666,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48707,7 +48781,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48786,7 +48867,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48877,7 +48965,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 0a5fc8fe95..b1b10f4543 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -35120,7 +35120,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -36809,7 +36813,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36897,7 +36908,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36987,7 +37005,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37077,7 +37102,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37150,7 +37182,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37230,7 +37269,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37320,7 +37366,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37400,7 +37453,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37480,7 +37540,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37560,7 +37627,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37668,7 +37742,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37747,7 +37828,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37838,7 +37926,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 0a6bdf0889..aa0f0ec520 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -46159,7 +46159,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -47848,7 +47852,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47936,7 +47947,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48026,7 +48044,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48116,7 +48141,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48189,7 +48221,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48269,7 +48308,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48359,7 +48405,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48439,7 +48492,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48519,7 +48579,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48599,7 +48666,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48707,7 +48781,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48786,7 +48867,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48877,7 +48965,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 0a5fc8fe95..b1b10f4543 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -35120,7 +35120,11 @@ "type": { "type": "string", "description": "Database type.", - "x-example": "legacy" + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb" + ] } }, "required": [ @@ -36809,7 +36813,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36897,7 +36908,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36987,7 +37005,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37077,7 +37102,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37150,7 +37182,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37230,7 +37269,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37320,7 +37366,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37400,7 +37453,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37480,7 +37540,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37560,7 +37627,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37668,7 +37742,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37747,7 +37828,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37838,7 +37926,14 @@ "status": { "type": "string", "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", diff --git a/src/Appwrite/Utopia/Response/Model/Column.php b/src/Appwrite/Utopia/Response/Model/Column.php index 5562de39f2..cae8d1fadb 100644 --- a/src/Appwrite/Utopia/Response/Model/Column.php +++ b/src/Appwrite/Utopia/Response/Model/Column.php @@ -23,10 +23,11 @@ class Column extends Model 'example' => 'string', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', 'default' => '', 'example' => 'available', + 'enum' => ['available', 'processing', 'deleting', 'stuck', 'failed'], ]) ->addRule('error', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Database.php b/src/Appwrite/Utopia/Response/Model/Database.php index 44a0d52af8..59f32b3162 100644 --- a/src/Appwrite/Utopia/Response/Model/Database.php +++ b/src/Appwrite/Utopia/Response/Model/Database.php @@ -41,10 +41,11 @@ class Database extends Model 'example' => false, ]) ->addRule('type', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Database type.', 'default' => 'legacy', 'example' => 'legacy', + 'enum' => ['legacy', 'tablesdb'], ]) ; } From 5245ff7167dcbbe72e798a4a1eb819eaf460afcf Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 29 Sep 2025 11:29:40 +0530 Subject: [PATCH 58/58] update enum name --- app/config/specs/open-api3-1.8.x-console.json | 39 ++++++---- app/config/specs/open-api3-1.8.x-server.json | 39 ++++++---- .../specs/open-api3-latest-console.json | 39 ++++++---- app/config/specs/open-api3-latest-server.json | 39 ++++++---- app/config/specs/swagger2-1.8.x-console.json | 39 ++++++---- app/config/specs/swagger2-1.8.x-server.json | 39 ++++++---- app/config/specs/swagger2-latest-console.json | 39 ++++++---- app/config/specs/swagger2-latest-server.json | 39 ++++++---- src/Appwrite/SDK/Specification/Format.php | 78 +++++++++++++++++++ 9 files changed, 286 insertions(+), 104 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 4a27d5a49b..bdff664cbc 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -47921,7 +47921,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48016,7 +48017,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48113,7 +48115,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48210,7 +48213,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48290,7 +48294,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48377,7 +48382,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48474,7 +48480,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48561,7 +48568,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48648,7 +48656,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48735,7 +48744,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48850,7 +48860,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48936,7 +48947,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -49034,7 +49046,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 50f668ea64..6b766dbdee 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -36791,7 +36791,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36886,7 +36887,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36983,7 +36985,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37080,7 +37083,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37160,7 +37164,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37247,7 +37252,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37344,7 +37350,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37431,7 +37438,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37518,7 +37526,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37605,7 +37614,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37720,7 +37730,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37806,7 +37817,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37904,7 +37916,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 4a27d5a49b..bdff664cbc 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -47921,7 +47921,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48016,7 +48017,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48113,7 +48115,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48210,7 +48213,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48290,7 +48294,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48377,7 +48382,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48474,7 +48480,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48561,7 +48568,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48648,7 +48656,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48735,7 +48744,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48850,7 +48860,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48936,7 +48947,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -49034,7 +49046,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 50f668ea64..6b766dbdee 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -36791,7 +36791,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36886,7 +36887,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36983,7 +36985,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37080,7 +37083,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37160,7 +37164,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37247,7 +37252,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37344,7 +37350,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37431,7 +37438,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37518,7 +37526,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37605,7 +37614,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37720,7 +37730,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37806,7 +37817,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37904,7 +37916,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index aa0f0ec520..ee3702d27d 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -47859,7 +47859,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -47954,7 +47955,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48051,7 +48053,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48148,7 +48151,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48228,7 +48232,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48315,7 +48320,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48412,7 +48418,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48499,7 +48506,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48586,7 +48594,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48673,7 +48682,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48788,7 +48798,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48874,7 +48885,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48972,7 +48984,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index b1b10f4543..ff5056b35a 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -36820,7 +36820,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36915,7 +36916,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37012,7 +37014,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37109,7 +37112,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37189,7 +37193,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37276,7 +37281,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37373,7 +37379,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37460,7 +37467,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37547,7 +37555,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37634,7 +37643,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37749,7 +37759,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37835,7 +37846,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37933,7 +37945,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index aa0f0ec520..ee3702d27d 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -47859,7 +47859,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -47954,7 +47955,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48051,7 +48053,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48148,7 +48151,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48228,7 +48232,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48315,7 +48320,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48412,7 +48418,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48499,7 +48506,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48586,7 +48594,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48673,7 +48682,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48788,7 +48798,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48874,7 +48885,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -48972,7 +48984,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index b1b10f4543..ff5056b35a 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -36820,7 +36820,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -36915,7 +36916,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37012,7 +37014,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37109,7 +37112,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37189,7 +37193,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37276,7 +37281,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37373,7 +37379,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37460,7 +37467,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37547,7 +37555,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37634,7 +37643,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37749,7 +37759,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37835,7 +37846,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", @@ -37933,7 +37945,8 @@ "deleting", "stuck", "failed" - ] + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index db7335e40f..c687df143a 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -624,6 +624,84 @@ abstract class Format return 'AttributeStatus'; } break; + case 'columnString': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnInteger': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnFloat': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnBoolean': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnEmail': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnEnum': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnIp': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnUrl': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnDatetime': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnRelationship': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnPoint': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnLine': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; + case 'columnPolygon': + switch ($param) { + case 'status': + return 'ColumnStatus'; + } + break; case 'healthStatus': switch ($param) { case 'status':