diff --git a/app/config/platforms.php b/app/config/platforms.php index ce60b2f6c2..ceb05235d3 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -226,7 +226,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '11.1.1', + 'version' => '12.0.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, diff --git a/app/config/scopes.php b/app/config/scopes.php index d90ca2eabf..a6ad98e4e0 100644 --- a/app/config/scopes.php +++ b/app/config/scopes.php @@ -47,10 +47,10 @@ return [ // List of publicly visible scopes 'description' => 'Access to create, update, and delete your project\'s database table\'s columns', ], 'indexes.read' => [ - 'description' => 'Access to read your project\'s database collection\'s indexes', + 'description' => 'Access to read your project\'s database table\'s indexes', ], 'indexes.write' => [ - 'description' => 'Access to create, update, and delete your project\'s database collection\'s indexes', + 'description' => 'Access to create, update, and delete your project\'s database table\'s indexes', ], 'documents.read' => [ 'description' => 'Access to read your project\'s database documents', 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 fded6c46b0..365f926685 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -14424,7 +14424,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -14524,7 +14524,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -32337,7 +32337,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -32438,7 +32438,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { 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 2cb6a74853..a2a97c046e 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -13213,7 +13213,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -13314,7 +13314,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -22861,7 +22861,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -22963,7 +22963,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index fded6c46b0..365f926685 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -14424,7 +14424,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -14524,7 +14524,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -32337,7 +32337,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -32438,7 +32438,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 2cb6a74853..a2a97c046e 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -13213,7 +13213,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -13314,7 +13314,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -22861,7 +22861,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -22963,7 +22963,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 28a4f76c61..5d2334764e 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -14366,7 +14366,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -14467,7 +14467,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -32441,7 +32441,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -32543,7 +32543,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index e760c1bb7d..b37aaac8e2 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -13182,7 +13182,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -13284,7 +13284,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -23014,7 +23014,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -23117,7 +23117,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 28a4f76c61..5d2334764e 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -14366,7 +14366,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -14467,7 +14467,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -32441,7 +32441,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -32543,7 +32543,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index e760c1bb7d..b37aaac8e2 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -13182,7 +13182,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -13284,7 +13284,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -23014,7 +23014,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -23117,7 +23117,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/docs/sdks/cli/CHANGELOG.md b/docs/sdks/cli/CHANGELOG.md index 8e50441769..3c2e7ef709 100644 --- a/docs/sdks/cli/CHANGELOG.md +++ b/docs/sdks/cli/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 12.0.0 + +* Change `create-deployment-template`'s `version` parameter to `type` and `reference`. eg. usage - `create-deployment-template --type tag --reference 1.0.0` +* Remove `bucket-id` parameter from `create-csv-export` command +* Allow enabling or disabling of image `transformations` in a bucket +* Fix type generation for `point`, `lineString` and `polygon` columns + ## 11.1.1 * Fix duplicate `enums` during type generation by prefixing them with table name. For example, `enum MyEnum` will now be generated as `enum MyTableMyEnum` to avoid conflicts. diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index fec378d7e9..f3d9d66672 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -62,9 +62,9 @@ class Create extends Action replaceWith: 'tablesDB.createEnumColumn', ), )) - ->param('databaseId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Database ID.', true, ['dbForProject']) - ->param('collectionId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Collection ID.', true, ['dbForProject']) - ->param('key', '', fn (Database $dbForProject) => new Key(false, $dbForProject->getAdapter()->getMaxUIDLength()), 'Attribute Key.', true, ['dbForProject']) + ->param('databaseId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Database ID.', false, ['dbForProject']) + ->param('collectionId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Collection ID.', false, ['dbForProject']) + ->param('key', '', fn (Database $dbForProject) => new Key(false, $dbForProject->getAdapter()->getMaxUIDLength()), 'Attribute Key.', false, ['dbForProject']) ->param('elements', [], new ArrayList(new Text(Database::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of enum values.') ->param('required', null, new Boolean(), 'Is attribute required?') ->param('default', null, new Nullable(new Text(0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 18b0926239..05bad48927 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -436,7 +436,7 @@ class Migrations extends Action $source?->success(); if ($migration->getAttribute('destination') === DestinationCSV::getName()) { - $this->handleCSVExportComplete($project, $migration, $queueForMails); + $this->handleCSVExportComplete($project, $migration, $queueForMails, $queueForRealtime); } } } @@ -473,7 +473,8 @@ class Migrations extends Action protected function handleCSVExportComplete( Document $project, Document $migration, - Mail $queueForMails + Mail $queueForMails, + Realtime $queueForRealtime, ): void { $options = $migration->getAttribute('options', []); $bucketId = 'default'; // Always use platform default bucket @@ -571,6 +572,9 @@ class Migrations extends Action $endpoint = System::getEnv('_APP_DOMAIN', ''); $protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS', 'disabled') === 'enabled' ? 'https' : 'http'; $downloadUrl = "{$protocol}://{$endpoint}/v1/storage/buckets/{$bucketId}/files/{$fileId}/push?project={$project->getId()}&jwt={$jwt}"; + $options['downloadUrl'] = $downloadUrl; + $migration->setAttribute('options', $options); + $this->updateMigrationDocument($migration, $project, $queueForRealtime); $this->sendCSVEmail( success: true, diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index 241dbb8ff0..d614a5983a 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -282,7 +282,13 @@ abstract class Format case 'createVcsDeployment': switch ($param) { case 'type': - return 'VCSDeploymentType'; + return 'VCSReferenceType'; + } + break; + case 'createTemplateDeployment': + switch ($param) { + case 'type': + return 'TemplateReferenceType'; } break; } @@ -305,7 +311,13 @@ abstract class Format case 'createVcsDeployment': switch ($param) { case 'type': - return 'VCSDeploymentType'; + return 'VCSReferenceType'; + } + break; + case 'createTemplateDeployment': + switch ($param) { + case 'type': + return 'TemplateReferenceType'; } break; } diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index e61f84f183..02867c7761 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -494,7 +494,7 @@ trait DatabasesBase $this->assertEquals(400, $attribute['headers']['status-code']); $message = $attribute['body']['message']; - if ($this->MongoDB()) { + if ($this->isMongoDB()) { $this->assertStringContainsString('Index length is longer than the maximum: 1024', $message); } else { // length depends on the shared table diff --git a/tests/e2e/Services/Sites/SitesCustomServerTest.php b/tests/e2e/Services/Sites/SitesCustomServerTest.php index 8c03ec7649..b7dc9e7334 100644 --- a/tests/e2e/Services/Sites/SitesCustomServerTest.php +++ b/tests/e2e/Services/Sites/SitesCustomServerTest.php @@ -2552,7 +2552,7 @@ class SitesCustomServerTest extends Scope $this->cleanupSite($siteId); } - public function testDomainForFailedDeloyment(): void + public function testDomainForFailedDeployment(): void { $siteId = $this->setupSite([ 'siteId' => ID::unique(),