diff --git a/app/config/platforms.php b/app/config/platforms.php index edb94f1f96..34c0290832 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -60,7 +60,7 @@ return [ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '20.2.1', + 'version' => '20.2.2', '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' => '13.3.0', + 'version' => '13.3.1', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -226,7 +226,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '10.2.3', + 'version' => '11.0.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -300,7 +300,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '13.4.1', + 'version' => '13.5.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-export.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-export.md new file mode 100644 index 0000000000..e56afae786 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-export.md @@ -0,0 +1,4 @@ +appwrite migrations create-csv-export \ + --resource-id \ + --bucket-id \ + --filename diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-import.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-import.md new file mode 100644 index 0000000000..196112bdf8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-import.md @@ -0,0 +1,4 @@ +appwrite migrations create-csv-import \ + --bucket-id \ + --file-id \ + --resource-id diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-csv-export.md b/docs/examples/1.8.x/console-web/examples/migrations/create-csv-export.md new file mode 100644 index 0000000000..e1b909a852 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-csv-export.md @@ -0,0 +1,22 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createCSVExport({ + resourceId: '', + bucketId: '', + filename: '', + columns: [], // optional + queries: [], // optional + delimiter: '', // optional + enclosure: '', // optional + escape: '', // optional + header: false, // optional + notify: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-csv-import.md b/docs/examples/1.8.x/console-web/examples/migrations/create-csv-import.md new file mode 100644 index 0000000000..9b8b2b2b33 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-csv-import.md @@ -0,0 +1,16 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createCSVImport({ + bucketId: '', + fileId: '', + resourceId: '', + internalFile: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md index 8ad770d907..9bc014b59b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md @@ -11,7 +11,7 @@ const result = await databases.createCollection({ databaseId: '', collectionId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional documentSecurity: false, // optional enabled: false // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md index 6fe77c42be..e6b9b49553 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md @@ -18,6 +18,6 @@ const result = await databases.createDocument({ "age": 30, "isAdmin": false }, - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md index d0d25b74d6..4cdc3a203b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md @@ -11,7 +11,7 @@ const result = await databases.updateCollection({ databaseId: '', collectionId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional documentSecurity: false, // optional enabled: false // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md index 3e953760a1..d33d78d7d3 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md @@ -12,6 +12,6 @@ const result = await databases.updateDocument({ collectionId: '', documentId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md index 0aaec4e6cb..8fe4b35194 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md @@ -12,6 +12,6 @@ const result = await databases.upsertDocument({ collectionId: '', documentId: '', data: {}, - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md index f1f029491a..b47d2c8353 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md @@ -10,7 +10,7 @@ const storage = new sdk.Storage(client); const result = await storage.createBucket({ bucketId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional fileSecurity: false, // optional enabled: false, // optional maximumFileSize: 1, // optional diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md index 628faf7249..8dc1745585 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md @@ -12,5 +12,5 @@ const result = await storage.createFile({ bucketId: '', fileId: '', file: InputFile.fromPath('/path/to/file', 'filename'), - permissions: ["read("any")"] // optional + permissions: [sdk.Permission.read(sdk.Role.any())] // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md index 136ebafe1b..9535914eeb 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md @@ -10,7 +10,7 @@ const storage = new sdk.Storage(client); const result = await storage.updateBucket({ bucketId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional fileSecurity: false, // optional enabled: false, // optional maximumFileSize: 1, // optional diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md index 2d78d5fb91..131682134d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md @@ -11,5 +11,5 @@ const result = await storage.updateFile({ bucketId: '', fileId: '', name: '', // optional - permissions: ["read("any")"] // optional + permissions: [sdk.Permission.read(sdk.Role.any())] // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-row.md index 4468c168e8..d437501ba0 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-row.md @@ -18,6 +18,6 @@ const result = await tablesDB.createRow({ "age": 30, "isAdmin": false }, - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-table.md index 1b252f1484..6a4c12d34d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-table.md @@ -11,7 +11,7 @@ const result = await tablesDB.createTable({ databaseId: '', tableId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional rowSecurity: false, // optional enabled: false // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-row.md index 58583af745..d5d2ee3002 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-row.md @@ -12,6 +12,6 @@ const result = await tablesDB.updateRow({ tableId: '', rowId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-table.md index b61fd6ac4e..97483daa03 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-table.md @@ -11,7 +11,7 @@ const result = await tablesDB.updateTable({ databaseId: '', tableId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional rowSecurity: false, // optional enabled: false // optional }); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-row.md index bfb833356a..f48b0daebd 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-row.md @@ -12,6 +12,6 @@ const result = await tablesDB.upsertRow({ tableId: '', rowId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/sdks/apple/CHANGELOG.md b/docs/sdks/apple/CHANGELOG.md index 9ffa37cdf8..df3170cc4d 100644 --- a/docs/sdks/apple/CHANGELOG.md +++ b/docs/sdks/apple/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 13.3.1 + +* Fix `onOpen` callback not being called when the websocket connection is established +* Fix add missing `scheduled` value to `ExecutionStatus` enum + ## 13.3.0 * Add `onOpen`, `onClose` and `onError` callbacks to `Realtime` service diff --git a/docs/sdks/cli/CHANGELOG.md b/docs/sdks/cli/CHANGELOG.md index 8a1ea0f360..0ffcb91b80 100644 --- a/docs/sdks/cli/CHANGELOG.md +++ b/docs/sdks/cli/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## 11.0.0 + +* Rename `create-csv-migration` to `create-csv-import` command to create a CSV import of a collection/table +* Add `create-csv-export` command to create a CSV export of a collection/table +* Add `create-resend-provider` and `update-resend-provider` commands to create and update a Resend Email provider +* Fix syncing of tables deleted locally during `push tables` command +* Fix added push command support for cli spatial types +* Fix attribute changing during push +* Replace pkg with @yao-pkg/pkg in dependencies + ## 10.2.3 * Fix `init tables` command not working diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 7ac74d0c05..4c723b8017 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 20.2.2 + +* Widen `device_info_plus` and `package_info_plus` dependencies to allow for newer versions for Android 15+ support +* Fix `CHUNK_SIZE` constant to `chunkSize` +* Fix missing `@override` annotation to `toMap` method in all model classes + ## 20.2.1 * Add transaction support for Databases and TablesDB diff --git a/docs/sdks/python/CHANGELOG.md b/docs/sdks/python/CHANGELOG.md index 7d8327b919..cb7f47d379 100644 --- a/docs/sdks/python/CHANGELOG.md +++ b/docs/sdks/python/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 13.5.0 + +* Add `create_resend_provider` and `update_resend_provider` methods to `Messaging` service +* Improve deprecation warnings +* Fix adding `Optional[]` to optional parameters +* Fix passing of `None` to nullable parameters + ## 13.4.1 * Add transaction support for Databases and TablesDB diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index 2fb15c5f7d..f587e0f946 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -48,13 +48,18 @@ class SDKs extends Action ->param('message', null, new Nullable(new Text(256)), 'Commit Message', optional: true) ->param('release', null, new Nullable(new WhiteList(['yes', 'no'])), 'Should we create releases?', optional: true) ->param('commit', null, new Nullable(new WhiteList(['yes', 'no'])), 'Actually create releases (yes) or dry-run (no)?', optional: true) + ->param('sdks', null, new Nullable(new Text(256)), 'Selected SDKs', optional: true) ->callback($this->action(...)); } - public function action(?string $selectedPlatform, ?string $selectedSDK, ?string $version, ?string $git, ?string $production, ?string $message, ?string $release, ?string $commit): void + public function action(?string $selectedPlatform, ?string $selectedSDK, ?string $version, ?string $git, ?string $production, ?string $message, ?string $release, ?string $commit, ?string $sdks): void { - $selectedPlatform ??= Console::confirm('Choose Platform ("' . APP_PLATFORM_CLIENT . '", "' . APP_PLATFORM_SERVER . '", "' . APP_PLATFORM_CONSOLE . '" or "*" for all):'); - $selectedSDK ??= \strtolower(Console::confirm('Choose SDK ("*" for all):')); + if (!$sdks) { + $selectedPlatform ??= Console::confirm('Choose Platform ("' . APP_PLATFORM_CLIENT . '", "' . APP_PLATFORM_SERVER . '", "' . APP_PLATFORM_CONSOLE . '" or "*" for all):'); + $selectedSDK ??= \strtolower(Console::confirm('Choose SDK ("*" for all):')); + } else { + $sdks = explode(',', $sdks); + } $version ??= Console::confirm('Choose an Appwrite version'); $createRelease = ($release === 'yes'); @@ -104,12 +109,12 @@ class SDKs extends Action $platforms = Config::getParam('platforms'); foreach ($platforms as $key => $platform) { - if ($selectedPlatform !== $key && $selectedPlatform !== '*') { + if ($selectedPlatform !== $key && $selectedPlatform !== '*' && ($sdks === null)) { continue; } foreach ($platform['sdks'] as $language) { - if ($selectedSDK !== $language['key'] && $selectedSDK !== '*') { + if ($selectedSDK !== $language['key'] && $selectedSDK !== '*' && ($sdks === null || !\in_array($language['key'], $sdks))) { continue; } @@ -472,38 +477,60 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND $errorMessage = implode("\n", $prOutput); if (strpos($errorMessage, 'already exists') !== false) { Console::warning("Pull request already exists for {$language['name']} SDK, updating title and body..."); - - $updateCommand = 'cd ' . $target . ' && \ - gh pr edit "' . $gitBranch . '" \ + $prNumberCommand = 'cd ' . $target . ' && \ + gh pr list \ --repo "' . $repoName . '" \ - --title "' . $prTitle . '" \ - --body "' . $prBody . '" \ + --head "' . $gitBranch . '" \ + --json number \ + --jq ".[0].number" \ 2>&1'; - $updateOutput = []; - $updateReturnCode = 0; - \exec($updateCommand, $updateOutput, $updateReturnCode); + $prNumberOutput = []; + $prNumberReturnCode = 0; + \exec($prNumberCommand, $prNumberOutput, $prNumberReturnCode); - if ($updateReturnCode === 0) { - Console::success("Successfully updated pull request for {$language['name']} SDK"); + if ($prNumberReturnCode === 0 && !empty($prNumberOutput[0])) { + $prNumber = trim($prNumberOutput[0]); - $prUrlCommand = 'cd ' . $target . ' && \ - gh pr view "' . $gitBranch . '" \ - --repo "' . $repoName . '" \ - --json url \ - --jq .url \ + // Use API directly to update PR to avoid deprecated projectCards field + $updateCommand = 'cd ' . $target . ' && \ + gh api \ + --method PATCH \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/' . $repoName . '/pulls/' . $prNumber . ' \ + -f title="' . $prTitle . '" \ + -f body="' . $prBody . '" \ 2>&1'; - $prUrlOutput = []; - $prUrlReturnCode = 0; - \exec($prUrlCommand, $prUrlOutput, $prUrlReturnCode); + $updateOutput = []; + $updateReturnCode = 0; + \exec($updateCommand, $updateOutput, $updateReturnCode); - if ($prUrlReturnCode === 0 && !empty($prUrlOutput)) { - $prUrls[$language['name']] = $prUrlOutput[0]; + if ($updateReturnCode === 0) { + Console::success("Successfully updated pull request for {$language['name']} SDK"); + + $prUrlCommand = 'cd ' . $target . ' && \ + gh pr list \ + --repo "' . $repoName . '" \ + --head "' . $gitBranch . '" \ + --json url \ + --jq ".[0].url" \ + 2>&1'; + + $prUrlOutput = []; + $prUrlReturnCode = 0; + \exec($prUrlCommand, $prUrlOutput, $prUrlReturnCode); + + if ($prUrlReturnCode === 0 && !empty($prUrlOutput)) { + $prUrls[$language['name']] = trim($prUrlOutput[0]); + } + } else { + $updateErrorMessage = implode("\n", $updateOutput); + Console::error("Failed to update pull request for {$language['name']} SDK: " . $updateErrorMessage); } } else { - $updateErrorMessage = implode("\n", $updateOutput); - Console::error("Failed to update pull request for {$language['name']} SDK: " . $updateErrorMessage); + Console::error("Failed to get PR number for {$language['name']} SDK"); } } else { Console::error("Failed to create pull request for {$language['name']} SDK: " . $errorMessage);