diff --git a/app/config/sdks.php b/app/config/sdks.php index 1bf2725785..cb5b14fe62 100644 --- a/app/config/sdks.php +++ b/app/config/sdks.php @@ -11,7 +11,7 @@ return [ [ 'key' => 'web', 'name' => 'Web', - 'version' => '22.3.1', + 'version' => '22.4.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' => '21.1.0', + 'version' => '21.4.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' => '14.1.0', + 'version' => '14.3.0', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -117,7 +117,7 @@ return [ 'key' => 'android', 'name' => 'Android', 'namespace' => 'io.appwrite', - 'version' => '12.1.0', + 'version' => '12.2.0', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -140,7 +140,7 @@ return [ [ 'key' => 'react-native', 'name' => 'React Native', - 'version' => '0.23.1', + 'version' => '0.24.0', 'url' => 'https://github.com/appwrite/sdk-for-react-native', 'package' => 'https://npmjs.com/package/react-native-appwrite', 'enabled' => true, @@ -208,7 +208,7 @@ return [ [ 'key' => 'web', 'name' => 'Console', - 'version' => '0.3.0', + 'version' => '22.4.0', 'url' => '', 'package' => '', 'enabled' => true, @@ -227,7 +227,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '13.4.0', + 'version' => '13.5.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 67cd8d8ea8..6dd18ed0f3 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -36,6 +36,9 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId $projectId = $repository->getAttribute('projectId'); $project = $authorization->skip(fn () => $dbForPlatform->getDocument('projects', $projectId)); + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND, 'Repository references non-existent project'); + } $dbForProject = $getProjectDB($project); $resourceCollection = $resourceType === "function" ? 'functions' : 'sites'; diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index b6a708ec78..636ca62368 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -343,7 +343,7 @@ Http::init() * But, for actions on resources (sites, functions, etc.) in a non-console project, we explicitly check * whether the admin user has necessary permission on the project (sites, functions, etc. don't have permissions associated to them). */ - if (empty($apiKey) && $project->getId() !== 'console' && $mode === APP_MODE_ADMIN) { + if (empty($apiKey) && !$user->isEmpty() && $project->getId() !== 'console' && $mode === APP_MODE_ADMIN) { $input = new Input(Database::PERMISSION_READ, $project->getPermissionsByType(Database::PERMISSION_READ)); $initialStatus = $authorization->getStatus(); $authorization->enable(); diff --git a/app/init/resources.php b/app/init/resources.php index b0e6a33210..d7fb1baf54 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -568,11 +568,16 @@ Http::setResource('dbForProject', function (Group $pools, Database $dbForPlatfor return $dbForPlatform; } + $database = $project->getAttribute('database', ''); + if (empty($database)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Project database is not configured'); + } + try { - $dsn = new DSN($project->getAttribute('database')); + $dsn = new DSN($database); } catch (\InvalidArgumentException) { // TODO: Temporary until all projects are using shared tables - $dsn = new DSN('mysql://' . $project->getAttribute('database')); + $dsn = new DSN('mysql://' . $database); } $adapter = new DatabasePool($pools->get($dsn->getHost())); @@ -1129,11 +1134,16 @@ Http::setResource('getProjectDB', function (Group $pools, Database $dbForPlatfor return $dbForPlatform; } + $database = $project->getAttribute('database', ''); + if (empty($database)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Project database is not configured'); + } + try { - $dsn = new DSN($project->getAttribute('database')); + $dsn = new DSN($database); } catch (\InvalidArgumentException) { // TODO: Temporary until all projects are using shared tables - $dsn = new DSN('mysql://' . $project->getAttribute('database')); + $dsn = new DSN('mysql://' . $database); } $configure = (function (Database $database) use ($project, $dsn, $authorization) { diff --git a/composer.lock b/composer.lock index 4ba5f96947..83cb569b7d 100644 --- a/composer.lock +++ b/composer.lock @@ -5486,7 +5486,7 @@ "issues": "https://github.com/appwrite/sdk-generator/issues", "source": "https://github.com/appwrite/sdk-generator/tree/1.10.2" }, - "time": "2026-02-23T04:04:15+00:00" + "time": "2026-02-17T11:48:05+00:00" }, { "name": "doctrine/annotations", @@ -8937,19 +8937,10 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [ - { - "package": "utopia-php/migration", - "version": "dev-improve-columns-setup", - "alias": "1.6.1", - "alias_normalized": "1.6.1.0" - } - ], - "minimum-stability": "dev", - "stability-flags": { - "utopia-php/migration": 20 - }, - "prefer-stable": true, + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=8.3.0", diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-schedule.md b/docs/examples/1.8.x/console-cli/examples/projects/create-schedule.md new file mode 100644 index 0000000000..8eb8fd2c55 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-schedule.md @@ -0,0 +1,7 @@ +```bash +appwrite projects create-schedule \ + --project-id \ + --resource-type function \ + --resource-id \ + --schedule '' +``` diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-schedule.md b/docs/examples/1.8.x/console-cli/examples/projects/get-schedule.md new file mode 100644 index 0000000000..45f8e0429f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-schedule.md @@ -0,0 +1,5 @@ +```bash +appwrite projects get-schedule \ + --project-id \ + --schedule-id +``` diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list-schedules.md b/docs/examples/1.8.x/console-cli/examples/projects/list-schedules.md new file mode 100644 index 0000000000..f2b04e9f6b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list-schedules.md @@ -0,0 +1,4 @@ +```bash +appwrite projects list-schedules \ + --project-id +``` diff --git a/docs/sdks/android/CHANGELOG.md b/docs/sdks/android/CHANGELOG.md index 8b3298ebca..95b2f3423e 100644 --- a/docs/sdks/android/CHANGELOG.md +++ b/docs/sdks/android/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 12.2.0 + +* Added Channel<_Document>.upsert() and Channel<_Row>.upsert() API methods to upsert documents and rows in channels. +* Added new query filters: containsAny(attribute, List) and containsAll(attribute, List) for advanced matching on array/relationship attributes. +* Realtime improvements: improved WebSocket lifecycle and connection handling. Introduced generation-based checks to avoid processing messages from stale sockets and ensure sequential socket recreation on reconnects. + ## 12.1.0 * Add `queries` parameter to Realtime subscriptions for filtering events diff --git a/docs/sdks/apple/CHANGELOG.md b/docs/sdks/apple/CHANGELOG.md index 13779f095e..e25680b6c3 100644 --- a/docs/sdks/apple/CHANGELOG.md +++ b/docs/sdks/apple/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 14.3.0 + +* Added upsert() support for RealtimeChannel on both Document and Row variants to perform upsert operations over real-time channels. +* Introduced new Query filter methods: contains(_:, value:), containsAny(_:, value: [Any]), containsAll(_:, value: [Any]) for enhanced querying capabilities (substring and multi-value containment). +* Documentation and packaging updates to align with the new release: README dependency example updated from 14.2.0 to 14.1.0, and server compatibility note updated to indicate Appwrite server version 1.8.x compatibility. + ## 14.1.0 * Add `queries` parameter to Realtime subscriptions for filtering events diff --git a/docs/sdks/cli/CHANGELOG.md b/docs/sdks/cli/CHANGELOG.md index 9d83abe9c1..f5afc2e5d2 100644 --- a/docs/sdks/cli/CHANGELOG.md +++ b/docs/sdks/cli/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 13.5.0 + +* New: Added CLI commands under projects: `list-schedules`, `create-schedule`, and `get-schedule` for managing project schedules. +* Packaging/build: Updated packaging to support explicit ESM/CJS outputs with exports. main now points to dist/index.cjs, module to dist/index.js, and exports include type and entry-point mappings. This enables better compatibility for both ESM and CommonJS users. + ## 13.4.0 * Add `--queries` option to `list-keys` command diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index d6b62f2453..db327d3d9c 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 21.4.0 + +* Added upsert() to DocumentChannel and RowChannel to support upsert operations on documents and rows. +* Added Query.contains, Query.containsAny, and Query.containsAll for enhanced filtering capabilities. + +## 21.3.0 + +* Added memberships realtime channel helper + ## 21.1.0 * Add `queries` parameter to Realtime subscriptions for filtering events diff --git a/docs/sdks/react-native/CHANGELOG.md b/docs/sdks/react-native/CHANGELOG.md index 332b27ada4..9a2e91a9e5 100644 --- a/docs/sdks/react-native/CHANGELOG.md +++ b/docs/sdks/react-native/CHANGELOG.md @@ -1,5 +1,9 @@ # Change log +## 0.24.0 + +* Added Query.contains, Query.containsAny, and Query.containsAll for enhanced filtering capabilities. + ## 0.23.1 * Add `upsert` method to Realtime `Channels` helper class diff --git a/docs/sdks/web/CHANGELOG.md b/docs/sdks/web/CHANGELOG.md index a91f186fc4..cfdb85af7e 100644 --- a/docs/sdks/web/CHANGELOG.md +++ b/docs/sdks/web/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 22.4.0 + +* Added Query.containsAny(attribute, value[]) to filter resources where the attribute contains any of the given values. +* Added Query.containsAll(attribute, value[]) to filter resources where the attribute contains all of the given values. +* Updated Query.contains documentation to clarify behavior: string attributes are matched by substring, and for array attributes use containsAny/containsAll. + ## 22.3.1 * Add `upsert` method to Realtime `Channels` helper class