From 32bb8b7c7ee56ecb428039cf23d3fd18d6d030c0 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 24 Jul 2025 13:42:55 +0530 Subject: [PATCH 01/14] chore: update sdks 1.7.x --- app/config/platforms.php | 18 ++++++++--------- composer.lock | 12 ++++++------ docs/sdks/android/CHANGELOG.md | 17 +++++++++++++++- docs/sdks/apple/CHANGELOG.md | 30 ++++++++++++++++++++++++++++- docs/sdks/dart/CHANGELOG.md | 6 ++++++ docs/sdks/flutter/CHANGELOG.md | 6 ++++++ docs/sdks/nodejs/CHANGELOG.md | 5 +++++ docs/sdks/react-native/CHANGELOG.md | 8 +++++++- docs/sdks/web/CHANGELOG.md | 7 +++++++ 9 files changed, 91 insertions(+), 18 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 15eb8b3893..3c26d9b72c 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -11,7 +11,7 @@ return [ [ 'key' => 'web', 'name' => 'Web', - 'version' => '18.1.0', + 'version' => '18.2.0', 'url' => 'https://github.com/appwrite/sdk-for-web', 'package' => 'https://www.npmjs.com/package/appwrite', 'enabled' => true, @@ -57,9 +57,9 @@ return [ ] ], [ - 'key' => 'flutter', + 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '17.0.2', + 'version' => '17.1.0', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, @@ -77,7 +77,7 @@ return [ [ 'key' => 'apple', 'name' => 'Apple', - 'version' => '10.1.1', + 'version' => '10.2.0', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -112,7 +112,7 @@ return [ [ 'key' => 'android', 'name' => 'Android', - 'version' => '8.1.0', + 'version' => '8.2.0', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -134,7 +134,7 @@ return [ [ 'key' => 'react-native', 'name' => 'React Native', - 'version' => '0.10.1', + 'version' => '0.10.2', 'url' => 'https://github.com/appwrite/sdk-for-react-native', 'package' => 'https://npmjs.com/package/react-native-appwrite', 'enabled' => true, @@ -199,7 +199,7 @@ return [ [ 'key' => 'web', 'name' => 'Console', - 'version' => '1.7.0', + 'version' => '1.9.0', 'url' => 'https://github.com/appwrite/sdk-for-console', 'package' => '', 'enabled' => true, @@ -251,7 +251,7 @@ return [ [ 'key' => 'nodejs', 'name' => 'Node.js', - 'version' => '17.1.0', + 'version' => '17.2.0', 'url' => 'https://github.com/appwrite/sdk-for-node', 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, @@ -377,7 +377,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '16.1.0', + 'version' => '16.2.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, diff --git a/composer.lock b/composer.lock index 29f215a032..d3dc9f30c6 100644 --- a/composer.lock +++ b/composer.lock @@ -4810,16 +4810,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.19", + "version": "0.41.22", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "ae6d44b373ae09f28d8b2dbb781ea3e2491b842d" + "reference": "5c416dcbdae9fce8ad170a6d73ebd817c8f6fe53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ae6d44b373ae09f28d8b2dbb781ea3e2491b842d", - "reference": "ae6d44b373ae09f28d8b2dbb781ea3e2491b842d", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5c416dcbdae9fce8ad170a6d73ebd817c8f6fe53", + "reference": "5c416dcbdae9fce8ad170a6d73ebd817c8f6fe53", "shasum": "" }, "require": { @@ -4855,9 +4855,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/0.41.19" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.22" }, - "time": "2025-07-23T06:33:44+00:00" + "time": "2025-07-24T07:59:05+00:00" }, { "name": "doctrine/annotations", diff --git a/docs/sdks/android/CHANGELOG.md b/docs/sdks/android/CHANGELOG.md index 8406e637b0..38d0c4be2d 100644 --- a/docs/sdks/android/CHANGELOG.md +++ b/docs/sdks/android/CHANGELOG.md @@ -1,8 +1,23 @@ # Change Log +## 8.2.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `gif` support to `ImageFormat` enum +* Add `sequence` support to `Document` model + +## 8.1.0 + +* Add `devKeys` support to `Client` service +* Add `upsertDocument` support to `Databases` service + ## 8.0.0 * Add `token` param to `getFilePreview` and `getFileView` for File tokens usage * Update default `quality` for `getFilePreview` from 0 to -1 * Remove `Gif` from ImageFormat enum -* Remove `search` param from `listExecutions` method \ No newline at end of file +* Remove `search` param from `listExecutions` method + +## 7.0.1 + +* Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests diff --git a/docs/sdks/apple/CHANGELOG.md b/docs/sdks/apple/CHANGELOG.md index bc30d56a4b..f62eb708f1 100644 --- a/docs/sdks/apple/CHANGELOG.md +++ b/docs/sdks/apple/CHANGELOG.md @@ -1,8 +1,36 @@ # Change Log +## 10.2.0 + +* Update sdk to use swift-native doc comments instead of jsdoc styled comments as per [Swift Documentation Comments](https://github.com/swiftlang/swift/blob/main/docs/DocumentationComments.md) +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `gif` support to `ImageFormat` enum +* Remove `Content-Type`, `Content-Length` headers and body from websocket requests + +## 10.1.1 + +* Adds warnings to bulk operation methods +* Fix select Queries by updating internal attributes like id, createdAt, updatedAt etc. to be optional in Document model. +* Fix querying datetime values by properly encoding URLs + +## 10.1.0 + +* Add `devKeys` support to `Client` service +* Add `upsertDocument` support to `Databases` service + ## 10.0.0 * Add `` to doc examples due to the new multi region endpoints * Add `token` param to `getFilePreview` and `getFileView` for File tokens usage * Remove `search` param from `listExecutions` method -* Remove `Gif` from ImageFormat enum \ No newline at end of file +* Remove `Gif` from ImageFormat enum + +## 9.0.1 + +* Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests + +## 9.0.0 + +* Remove redundant titles from method descriptions. +* Add `codable` models +* Ensure response attribute in `AppwriteException` is always string diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index 5b77784063..1972a122e3 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 16.2.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `encrypt` support to string attribute model +* Add `sequence` support to `Document` model + ## 16.1.0 * Add `gif` support to `ImageFormat` enum diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index e94f5d0abf..9a291e24b2 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 17.1.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `gif` support to `ImageFormat` enum +* Add `sequence` support to `Document` model + ## 17.0.2 * Add `gif` support to `ImageFormat` enum diff --git a/docs/sdks/nodejs/CHANGELOG.md b/docs/sdks/nodejs/CHANGELOG.md index d7261b67d5..7d6926dd1d 100644 --- a/docs/sdks/nodejs/CHANGELOG.md +++ b/docs/sdks/nodejs/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 17.2.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Fix autocompletion not working for `Document` model even when generic is passed + ## 17.1.0 * Add `upsertDocument` method diff --git a/docs/sdks/react-native/CHANGELOG.md b/docs/sdks/react-native/CHANGELOG.md index 6ab2975bf2..a15eb1b0f7 100644 --- a/docs/sdks/react-native/CHANGELOG.md +++ b/docs/sdks/react-native/CHANGELOG.md @@ -1,5 +1,11 @@ # Change log +## 0.10.2 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `sequence` support to `Document` model +* Fix autocompletion not working for `Document` model even when generic is passed + ## 0.10.1 * Fix URL based methods like `getFileViewURL`, `getFilePreviewURL` etc. by adding the missing `projectId` to searchParams @@ -28,4 +34,4 @@ ## 0.7.4 * Upgrade dependencies to resolve PlatformConstants error with Expo 53 -* Update doc examples to use new multi-region endpoint \ No newline at end of file +* Update doc examples to use new multi-region endpoint diff --git a/docs/sdks/web/CHANGELOG.md b/docs/sdks/web/CHANGELOG.md index b9875998a9..328ef1d5a8 100644 --- a/docs/sdks/web/CHANGELOG.md +++ b/docs/sdks/web/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 18.2.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `gif` support to `ImageFormat` enum +* Fix undefined `fileParam` error in `chunkedUpload` method +* Fix autocompletion not working for `Document` model even when generic is passed + ## 18.1.1 * Fix using `devKeys` resulting in an error by conditionally removing credentials From 89b9afd066cc374fd3164cf4561ad929fb5b481f Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 24 Jul 2025 13:53:03 +0530 Subject: [PATCH 02/14] update swift --- app/config/platforms.php | 2 +- docs/sdks/swift/CHANGELOG.md | 46 +++++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 3c26d9b72c..2fcb4cc4a8 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -417,7 +417,7 @@ return [ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '10.1.0', + 'version' => '10.2.0', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, diff --git a/docs/sdks/swift/CHANGELOG.md b/docs/sdks/swift/CHANGELOG.md index fa4d35e687..6cb1cca595 100644 --- a/docs/sdks/swift/CHANGELOG.md +++ b/docs/sdks/swift/CHANGELOG.md @@ -1 +1,45 @@ -# Change Log \ No newline at end of file +# Change Log + +## 10.2.0 + +* Update sdk to use swift-native doc comments instead of jsdoc styled comments as per [Swift Documentation Comments](https://github.com/swiftlang/swift/blob/main/docs/DocumentationComments.md) +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `gif` support to `ImageFormat` enum +* Add `sequence` support to `Document` model +* Add `dart38` and `flutter332` support to runtime models + +## 10.1.0 + +* Adds `upsertDocument` method +* Adds warnings to bulk operation methods +* Adds the new `encrypt` attribute +* Adds runtimes: `flutter332` and `dart38` +* Fix `select` Queries by updating internal attributes like `id`, `createdAt`, `updatedAt` etc. to be optional in `Document` model. +* Fix `listCollection` errors by updating `attributes` typing +* Fix querying datetime values by properly encoding URLs + +## 10.0.0 + +* Add `` to doc examples due to the new multi region endpoints +* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. +* Add doc examples, class and methods for new `Sites` service +* Add doc examples, class and methods for new `Tokens` service +* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType` +* Update enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Add `queries` and `search` params to `listMemberships` method +* Remove `search` param from `listExecutions` method + +## 9.0.0 + +* Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests + +## 8.0.0 + +* Remove redundant titles from method descriptions. +* Add `codable` models +* Ensure response attribute in `AppwriteException` is always string + +## 7.0.0 + +* Fix pong response & chunked upload From 2dfd2f44262396c368fafc129bd253fbd1bd9cf7 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 24 Jul 2025 16:11:59 +0530 Subject: [PATCH 03/14] chore: add more changelog --- app/config/platforms.php | 8 ++++---- docs/sdks/cli/CHANGELOG.md | 12 ++++++++++++ docs/sdks/deno/CHANGELOG.md | 11 ++++++++++- docs/sdks/php/CHANGELOG.md | 10 +++++++++- docs/sdks/python/CHANGELOG.md | 29 ++++++++++++++++++++++++++++- 5 files changed, 63 insertions(+), 7 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 2fcb4cc4a8..df13c774cd 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -57,7 +57,7 @@ return [ ] ], [ - 'key' => 'flutter', + 'key' => 'flutter', 'name' => 'Flutter', 'version' => '17.1.0', 'url' => 'https://github.com/appwrite/sdk-for-flutter', @@ -217,7 +217,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '8.2.2', + 'version' => '8.3.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -269,7 +269,7 @@ return [ [ 'key' => 'deno', 'name' => 'Deno', - 'version' => '15.0.0', + 'version' => '15.1.0', 'url' => 'https://github.com/appwrite/sdk-for-deno', 'package' => 'https://deno.land/x/appwrite', 'enabled' => true, @@ -287,7 +287,7 @@ return [ [ 'key' => 'php', 'name' => 'PHP', - 'version' => '15.0.0', + 'version' => '15.1.0', 'url' => 'https://github.com/appwrite/sdk-for-php', 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, diff --git a/docs/sdks/cli/CHANGELOG.md b/docs/sdks/cli/CHANGELOG.md index e32614cad0..8964d059a9 100644 --- a/docs/sdks/cli/CHANGELOG.md +++ b/docs/sdks/cli/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log +## 8.3.0 + +* **Feat:** Add support for `appwrite.config.json` file + * All new projects will be initialized with this configuration file + * Resolves bundler conflicts (e.g., Vite) that incorrectly interpret `.json` files as library imports +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Type generation fixes: + * Fix relationships using the relatedCollection's id instead of name + * Update auto generated comment to show relative path instead of absolute path + +> **Note:** The existing `appwrite.json` file remains fully supported for backward compatibility + ## 8.2.2 * Fix object comparison logic when pushing settings diff --git a/docs/sdks/deno/CHANGELOG.md b/docs/sdks/deno/CHANGELOG.md index e46648db82..893f49d511 100644 --- a/docs/sdks/deno/CHANGELOG.md +++ b/docs/sdks/deno/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 15.1.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `gif` support to `ImageFormat` enum +* Add `dart38` and `flutter332` support to runtime models +* Add `encrypt` support to `StringAttribute` model +* Add `sequence` support to `Document` model +* Add `upsertDocument` support to `Databases` service + ## 15.0.0 * Add `` to doc examples due to the new multi region endpoints @@ -10,4 +19,4 @@ * Updates enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 * Add `token` param to `getFilePreview` and `getFileView` for File tokens usage * Add `queries` and `search` params to `listMemberships` method -* Removes `search` param from `listExecutions` method \ No newline at end of file +* Removes `search` param from `listExecutions` method diff --git a/docs/sdks/php/CHANGELOG.md b/docs/sdks/php/CHANGELOG.md index fa4d35e687..d5a323c4cb 100644 --- a/docs/sdks/php/CHANGELOG.md +++ b/docs/sdks/php/CHANGELOG.md @@ -1 +1,9 @@ -# Change Log \ No newline at end of file +# Change Log + +## 15.1.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `dart38` and `flutter332` support to runtime models +* Add `gif` support to `ImageFormat` enum +* Add `upsertDocument` support to `Databases` service +* Add `sequence` support to `Document` model diff --git a/docs/sdks/python/CHANGELOG.md b/docs/sdks/python/CHANGELOG.md index fa4d35e687..ff63134a20 100644 --- a/docs/sdks/python/CHANGELOG.md +++ b/docs/sdks/python/CHANGELOG.md @@ -1 +1,28 @@ -# Change Log \ No newline at end of file +# Change Log + +## 11.1.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `dart38` and `flutter332` support to runtime models +* Add `gif` support to `ImageFormat` enum +* Add `upsertDocument` support to `Databases` service + +## 11.0.0 + +* Add `` to doc examples due to the new multi region endpoints +* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. +* Add doc examples, class and methods for new `Sites` service +* Add doc examples, class and methods for new `Tokens` service +* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType` +* Update enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Add `queries` and `search` params to `listMemberships` method +* Remove `search` param from `listExecutions` method + +## 10.0.0 + +* Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests + +## 9.0.3 + +* Update sdk to use Numpy-style docstrings From e68acd3f0233c53fb4c98a580e4656ed32f306b3 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 24 Jul 2025 16:47:24 +0530 Subject: [PATCH 04/14] chore: add more changelog --- app/config/platforms.php | 10 +++++----- docs/sdks/dotnet/CHANGELOG.md | 6 ++++++ docs/sdks/go/CHANGELOG.md | 28 +++++++++++++++++++++++++++- docs/sdks/kotlin/CHANGELOG.md | 30 +++++++++++++++++++++++++++++- docs/sdks/ruby/CHANGELOG.md | 31 ++++++++++++++++++++++++++++++- 5 files changed, 97 insertions(+), 8 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index df13c774cd..de514403e3 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -305,7 +305,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '11.0.0', + 'version' => '11.1.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -323,7 +323,7 @@ return [ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '16.0.0', + 'version' => '16.1.0', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -341,7 +341,7 @@ return [ [ 'key' => 'go', 'name' => 'Go', - 'version' => '0.8.0', + 'version' => '0.7.1', 'url' => 'https://github.com/appwrite/sdk-for-go', 'package' => 'https://github.com/appwrite/sdk-for-go', 'enabled' => true, @@ -359,7 +359,7 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.14.0', + 'version' => '0.14.1', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, @@ -395,7 +395,7 @@ return [ [ 'key' => 'kotlin', 'name' => 'Kotlin', - 'version' => '9.0.0', + 'version' => '9.1.0', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, diff --git a/docs/sdks/dotnet/CHANGELOG.md b/docs/sdks/dotnet/CHANGELOG.md index 43c2eb6520..935bd6c8de 100644 --- a/docs/sdks/dotnet/CHANGELOG.md +++ b/docs/sdks/dotnet/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 0.14.1 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `encrypt` support to `StringAttribute` model +* Add `sequence` support to `Document` model + ## 0.14.0 * Refactor from Newtonsoft.Json to System.Text.Json for serialization/deserialization diff --git a/docs/sdks/go/CHANGELOG.md b/docs/sdks/go/CHANGELOG.md index fa4d35e687..0727ce1e2b 100644 --- a/docs/sdks/go/CHANGELOG.md +++ b/docs/sdks/go/CHANGELOG.md @@ -1 +1,27 @@ -# Change Log \ No newline at end of file +# Change Log + +## 0.7.1 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `upsertDocument` support to `Databases` service +* Update doc examples to use correct syntax + +## 0.7.0 + +* Add `` to doc examples due to the new multi region endpoints +* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. +* Add doc examples, class and methods for new `Sites` service +* Add doc examples, class and methods for new `Tokens` service +* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType` +* Update enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Add `queries` and `search` params to `listMemberships` method +* Remove `search` param from `listExecutions` method + +## 0.6.0 + +* Add bulk API methods: `createDocuments`, `deleteDocuments` etc. + +## 0.5.0 + +* Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests diff --git a/docs/sdks/kotlin/CHANGELOG.md b/docs/sdks/kotlin/CHANGELOG.md index fa4d35e687..c7194d5391 100644 --- a/docs/sdks/kotlin/CHANGELOG.md +++ b/docs/sdks/kotlin/CHANGELOG.md @@ -1 +1,29 @@ -# Change Log \ No newline at end of file +# Change Log + +## 9.1.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `dart38` and `flutter332` support to runtime models +* Add `gif` support to `ImageFormat` enum +* Add `encrypt` support to `StringAttribute` model +* Add `sequence` support to `Document` model + +## 9.0.0 + +* Add `` to doc examples due to the new multi region endpoints +* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. +* Add doc examples, class and methods for new `Sites` service +* Add doc examples, class and methods for new `Tokens` service +* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType` +* Update enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Add `queries` and `search` params to `listMemberships` method +* Remove `search` param from `listExecutions` method + +## 8.0.0 + +* Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests + +## 7.0.0 + +* Fix pong response & chunked upload diff --git a/docs/sdks/ruby/CHANGELOG.md b/docs/sdks/ruby/CHANGELOG.md index fa4d35e687..1f2e10beea 100644 --- a/docs/sdks/ruby/CHANGELOG.md +++ b/docs/sdks/ruby/CHANGELOG.md @@ -1 +1,30 @@ -# Change Log \ No newline at end of file +# Change Log + +## 16.1.0 + +* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service +* Add `dart38` and `flutter332` support to runtime models +* Add `gif` support to `ImageFormat` enum +* Add `encrypt` support to `StringAttribute` model +* Add `sequence` support to `Document` model +* Add `upsertDocument` support to `Databases` service + +## 16.0.0 + +* Add `` to doc examples due to the new multi region endpoints +* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. +* Add doc examples, class and methods for new `Sites` service +* Add doc examples, class and methods for new `Tokens` service +* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType` +* Update enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Add `queries` and `search` params to `listMemberships` method +* Remove `search` param from `listExecutions` method + +## 15.0.0 + +* Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests + +## 14.0.0 + +* Fix pong response & chunked upload From 6c5cdfbe853bdab484501e75cf9c4317f647386e Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 24 Jul 2025 17:11:21 +0530 Subject: [PATCH 05/14] chore: update to use angle brackets --- docs/sdks/android/GETTING_STARTED.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sdks/android/GETTING_STARTED.md b/docs/sdks/android/GETTING_STARTED.md index de16f2cc57..447d782b0d 100644 --- a/docs/sdks/android/GETTING_STARTED.md +++ b/docs/sdks/android/GETTING_STARTED.md @@ -18,7 +18,7 @@ In order to capture the Appwrite OAuth callback url, the following activity need - + @@ -34,8 +34,8 @@ import io.appwrite.Client import io.appwrite.services.Account val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID + .setEndpoint("https:///v1") // Your API Endpoint + .setProject("") // Your project ID .setSelfSigned(true) // Remove in production ``` @@ -66,8 +66,8 @@ import io.appwrite.services.Account import io.appwrite.ID val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID + .setEndpoint("https:///v1") // Your API Endpoint + .setProject("") // Your project ID .setSelfSigned(true) // Remove in production val account = Account(client) From 6bd3e6fe96504bb12916fa3d4479dfdca562e46f Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 25 Jul 2025 16:05:16 +0530 Subject: [PATCH 06/14] update version for rn --- app/config/platforms.php | 2 +- composer.lock | 12 ++++++------ docs/sdks/react-native/CHANGELOG.md | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index de514403e3..127100710d 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -134,7 +134,7 @@ return [ [ 'key' => 'react-native', 'name' => 'React Native', - 'version' => '0.10.2', + 'version' => '0.11.0', 'url' => 'https://github.com/appwrite/sdk-for-react-native', 'package' => 'https://npmjs.com/package/react-native-appwrite', 'enabled' => true, diff --git a/composer.lock b/composer.lock index d3dc9f30c6..9ab07d37cc 100644 --- a/composer.lock +++ b/composer.lock @@ -4810,16 +4810,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.22", + "version": "0.41.23", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "5c416dcbdae9fce8ad170a6d73ebd817c8f6fe53" + "reference": "188dff738ff7b9f1f9209b34ac2092b5456b1001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5c416dcbdae9fce8ad170a6d73ebd817c8f6fe53", - "reference": "5c416dcbdae9fce8ad170a6d73ebd817c8f6fe53", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/188dff738ff7b9f1f9209b34ac2092b5456b1001", + "reference": "188dff738ff7b9f1f9209b34ac2092b5456b1001", "shasum": "" }, "require": { @@ -4855,9 +4855,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/0.41.22" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.23" }, - "time": "2025-07-24T07:59:05+00:00" + "time": "2025-07-25T06:47:04+00:00" }, { "name": "doctrine/annotations", diff --git a/docs/sdks/react-native/CHANGELOG.md b/docs/sdks/react-native/CHANGELOG.md index a15eb1b0f7..eda0bca26e 100644 --- a/docs/sdks/react-native/CHANGELOG.md +++ b/docs/sdks/react-native/CHANGELOG.md @@ -1,6 +1,6 @@ # Change log -## 0.10.2 +## 0.11.0 * Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service * Add `sequence` support to `Document` model From eeed9a08ec7afed275884ef5cbeb5cd4d08b1682 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 25 Jul 2025 16:18:52 +0530 Subject: [PATCH 07/14] chore: add docs for nestedType, encode, from and toMap --- docs/sdks/apple/GETTING_STARTED.md | 57 ++++++++++++++++++++++++++++++ docs/sdks/swift/GETTING_STARTED.md | 57 ++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) diff --git a/docs/sdks/apple/GETTING_STARTED.md b/docs/sdks/apple/GETTING_STARTED.md index 6defbc5f00..63c216e08d 100644 --- a/docs/sdks/apple/GETTING_STARTED.md +++ b/docs/sdks/apple/GETTING_STARTED.md @@ -113,6 +113,63 @@ func main() { } ``` +### Type Safety with Models + +The Appwrite Apple SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a `nestedType` parameter that allows you to specify your custom model type for full type safety. + +```swift +struct Book: Codable { + let name: String + let author: String + let releaseYear: String? + let category: String? + let genre: [String]? + let isCheckedOut: Bool +} + +let databases = Databases(client) + +do { + let documents = try await databases.listDocuments( + databaseId: "your-database-id", + collectionId: "your-collection-id", + nestedType: Book.self // Pass in your custom model type + ) + + for book in documents.documents { + print("Book: \(book.name) by \(book.author)") // Now you have full type safety + } +} catch { + print(error.localizedDescription) +} +``` + +**Tip**: You can use the `appwrite types` command to automatically generate model definitions based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). + +### Working with Model Methods + +All Appwrite models come with built-in methods for data conversion and manipulation: + +**`toMap()`** - Converts a model instance to a dictionary format, useful for debugging or manual data manipulation: +```swift +let user = try await account.get() +let userMap = user.toMap() +print(userMap) // Prints all user properties as a dictionary +``` + +**`from(map:)`** - Creates a model instance from a dictionary, useful when working with raw data: +```swift +let userData: [String: Any] = ["$id": "123", "name": "John", "email": "john@example.com"] +let user = User.from(map: userData) +``` + +**`encode(to:)`** - Encodes the model to JSON format (part of Swift's Codable protocol), useful for serialization: +```swift +let user = try await account.get() +let jsonData = try JSONEncoder().encode(user) +let jsonString = String(data: jsonData, encoding: .utf8) +``` + ### Error Handling When an error occurs, the Appwrite Apple SDK throws an `AppwriteError` object with `message` and `code` properties. You can handle any errors in a catch block and present the `message` or `localizedDescription` to the user or handle it yourself based on the provided error information. Below is an example. diff --git a/docs/sdks/swift/GETTING_STARTED.md b/docs/sdks/swift/GETTING_STARTED.md index 49aa51e9b2..251ea371d2 100644 --- a/docs/sdks/swift/GETTING_STARTED.md +++ b/docs/sdks/swift/GETTING_STARTED.md @@ -66,6 +66,63 @@ func main() { } ``` +### Type Safety with Models + +The Appwrite Swift SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a `nestedType` parameter that allows you to specify your custom model type for full type safety. + +```swift +struct Book: Codable { + let name: String + let author: String + let releaseYear: String? + let category: String? + let genre: [String]? + let isCheckedOut: Bool +} + +let databases = Databases(client) + +do { + let documents = try await databases.listDocuments( + databaseId: "your-database-id", + collectionId: "your-collection-id", + nestedType: Book.self // Pass in your custom model type + ) + + for book in documents.documents { + print("Book: \(book.name) by \(book.author)") // Now you have full type safety + } +} catch { + print(error.localizedDescription) +} +``` + +**Tip**: You can use the `appwrite types` command to automatically generate model definitions based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). + +### Working with Model Methods + +All Appwrite models come with built-in methods for data conversion and manipulation: + +**`toMap()`** - Converts a model instance to a dictionary format, useful for debugging or manual data manipulation: +```swift +let user = try await account.get() +let userMap = user.toMap() +print(userMap) // Prints all user properties as a dictionary +``` + +**`from(map:)`** - Creates a model instance from a dictionary, useful when working with raw data: +```swift +let userData: [String: Any] = ["$id": "123", "name": "John", "email": "john@example.com"] +let user = User.from(map: userData) +``` + +**`encode(to:)`** - Encodes the model to JSON format (part of Swift's Codable protocol), useful for serialization: +```swift +let user = try await account.get() +let jsonData = try JSONEncoder().encode(user) +let jsonString = String(data: jsonData, encoding: .utf8) +``` + ### Error Handling When an error occurs, the Appwrite Swift SDK throws an `AppwriteError` object with `message` and `code` properties. You can handle any errors in a catch block and present the `message` or `localizedDescription` to the user or handle it yourself based on the provided error information. Below is an example. From aa91189848622c0c591dc34911828ce36a6bc042 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 25 Jul 2025 17:08:43 +0530 Subject: [PATCH 08/14] add docs for android as well --- docs/sdks/android/GETTING_STARTED.md | 72 ++++++++++++++++++++++++++++ docs/sdks/kotlin/GETTING_STARTED.md | 71 +++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) diff --git a/docs/sdks/android/GETTING_STARTED.md b/docs/sdks/android/GETTING_STARTED.md index 447d782b0d..ec795087f1 100644 --- a/docs/sdks/android/GETTING_STARTED.md +++ b/docs/sdks/android/GETTING_STARTED.md @@ -79,7 +79,79 @@ val user = account.create( ) ``` +### Type Safety with Models + +The Appwrite Android SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a `nestedType` parameter that allows you to specify your custom model type for full type safety. + +```kotlin +data class Book( + val name: String, + val author: String, + val releaseYear: String? = null, + val category: String? = null, + val genre: List? = null, + val isCheckedOut: Boolean +) + +val databases = Databases(client) + +try { + val documents = databases.listDocuments( + databaseId = "your-database-id", + collectionId = "your-collection-id", + nestedType = Book::class.java // Pass in your custom model type + ) + + for (book in documents.documents) { + Log.d("Appwrite", "Book: ${book.name} by ${book.author}") // Now you have full type safety + } +} catch (e: AppwriteException) { + Log.e("Appwrite", e.message ?: "Unknown error") +} +``` + +**Tip**: You can use the `appwrite types` command to automatically generate model definitions based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). + +### Working with Model Methods + +All Appwrite models come with built-in methods for data conversion and manipulation: + +**`toMap()`** - Converts a model instance to a Map format, useful for debugging or manual data manipulation: +```kotlin +val account = Account(client) +val user = account.get() +val userMap = user.toMap() +Log.d("Appwrite", userMap.toString()) // Prints all user properties as a Map +``` + +**`from(map:, nestedType:)`** - Creates a model instance from a Map, useful when working with raw data: +```kotlin +val userData: Map = mapOf( + "\$id" to "123", + "name" to "John", + "email" to "john@example.com" +) +val user = User.from(userData, User::class.java) +``` + +**JSON Serialization** - Models can be easily converted to/from JSON using Gson (which the SDK uses internally): +```kotlin +import com.google.gson.Gson + +val account = Account(client) +val user = account.get() + +// Convert to JSON +val gson = Gson() +val jsonString = gson.toJson(user) +Log.d("Appwrite", "User JSON: $jsonString") + +// Convert from JSON +val userFromJson = gson.fromJson(jsonString, User::class.java) +``` + ### Error Handling + The Appwrite Android SDK raises an `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example. ```kotlin diff --git a/docs/sdks/kotlin/GETTING_STARTED.md b/docs/sdks/kotlin/GETTING_STARTED.md index 5b5ee5f050..71db1af77d 100644 --- a/docs/sdks/kotlin/GETTING_STARTED.md +++ b/docs/sdks/kotlin/GETTING_STARTED.md @@ -57,6 +57,77 @@ suspend fun main() { } ``` +### Type Safety with Models + +The Appwrite Kotlin SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a `nestedType` parameter that allows you to specify your custom model type for full type safety. + +```kotlin +data class Book( + val name: String, + val author: String, + val releaseYear: String? = null, + val category: String? = null, + val genre: List? = null, + val isCheckedOut: Boolean +) + +val databases = Databases(client) + +try { + val documents = databases.listDocuments( + databaseId = "your-database-id", + collectionId = "your-collection-id", + nestedType = Book::class.java // Pass in your custom model type + ) + + for (book in documents.documents) { + Log.d("Appwrite", "Book: ${book.name} by ${book.author}") // Now you have full type safety + } +} catch (e: AppwriteException) { + Log.e("Appwrite", e.message ?: "Unknown error") +} +``` + +**Tip**: You can use the `appwrite types` command to automatically generate model definitions based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). + +### Working with Model Methods + +All Appwrite models come with built-in methods for data conversion and manipulation: + +**`toMap()`** - Converts a model instance to a Map format, useful for debugging or manual data manipulation: +```kotlin +val account = Account(client) +val user = account.get() +val userMap = user.toMap() +Log.d("Appwrite", userMap.toString()) // Prints all user properties as a Map +``` + +**`from(map:, nestedType:)`** - Creates a model instance from a Map, useful when working with raw data: +```kotlin +val userData: Map = mapOf( + "\$id" to "123", + "name" to "John", + "email" to "john@example.com" +) +val user = User.from(userData, User::class.java) +``` + +**JSON Serialization** - Models can be easily converted to/from JSON using Gson (which the SDK uses internally): +```kotlin +import com.google.gson.Gson + +val account = Account(client) +val user = account.get() + +// Convert to JSON +val gson = Gson() +val jsonString = gson.toJson(user) +Log.d("Appwrite", "User JSON: $jsonString") + +// Convert from JSON +val userFromJson = gson.fromJson(jsonString, User::class.java) +``` + ### Error Handling The Appwrite Kotlin SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example. From cf3abd0f6c6d1a8a5c51c35c44f1bb902d5fb030 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Sat, 26 Jul 2025 11:10:24 +0530 Subject: [PATCH 09/14] add java example --- docs/sdks/android/GETTING_STARTED.md | 55 ++++++++++++++++++++++++ docs/sdks/dart/EXAMPLES.md | 62 ---------------------------- docs/sdks/java/CHANGELOG.md | 1 - docs/sdks/kotlin/GETTING_STARTED.md | 55 ++++++++++++++++++++++++ docs/sdks/typescript/CHANGELOG.md | 1 - docs/sdks/web/README.md | 15 ------- 6 files changed, 110 insertions(+), 79 deletions(-) delete mode 100644 docs/sdks/dart/EXAMPLES.md delete mode 100644 docs/sdks/java/CHANGELOG.md delete mode 100644 docs/sdks/typescript/CHANGELOG.md delete mode 100644 docs/sdks/web/README.md diff --git a/docs/sdks/android/GETTING_STARTED.md b/docs/sdks/android/GETTING_STARTED.md index ec795087f1..724cfb4654 100644 --- a/docs/sdks/android/GETTING_STARTED.md +++ b/docs/sdks/android/GETTING_STARTED.md @@ -83,6 +83,7 @@ val user = account.create( The Appwrite Android SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a `nestedType` parameter that allows you to specify your custom model type for full type safety. +**Kotlin:** ```kotlin data class Book( val name: String, @@ -110,6 +111,60 @@ try { } ``` +**Java:** +```java +public class Book { + private String name; + private String author; + private String releaseYear; + private String category; + private List genre; + private boolean isCheckedOut; + + // Constructor + public Book(String name, String author, boolean isCheckedOut) { + this.name = name; + this.author = author; + this.isCheckedOut = isCheckedOut; + } + + // Getters and setters + public String getName() { return name; } + public void setName(String name) { this.name = name; } + + public String getAuthor() { return author; } + public void setAuthor(String author) { this.author = author; } + + public String getReleaseYear() { return releaseYear; } + public void setReleaseYear(String releaseYear) { this.releaseYear = releaseYear; } + + public String getCategory() { return category; } + public void setCategory(String category) { this.category = category; } + + public List getGenre() { return genre; } + public void setGenre(List genre) { this.genre = genre; } + + public boolean isCheckedOut() { return isCheckedOut; } + public void setCheckedOut(boolean checkedOut) { isCheckedOut = checkedOut; } +} + +Databases databases = new Databases(client); + +try { + DocumentList documents = databases.listDocuments( + "your-database-id", + "your-collection-id", + Book.class // Pass in your custom model type + ); + + for (Book book : documents.getDocuments()) { + Log.d("Appwrite", "Book: " + book.getName() + " by " + book.getAuthor()); // Now you have full type safety + } +} catch (AppwriteException e) { + Log.e("Appwrite", e.getMessage() != null ? e.getMessage() : "Unknown error"); +} +``` + **Tip**: You can use the `appwrite types` command to automatically generate model definitions based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). ### Working with Model Methods diff --git a/docs/sdks/dart/EXAMPLES.md b/docs/sdks/dart/EXAMPLES.md deleted file mode 100644 index fc2c6d0996..0000000000 --- a/docs/sdks/dart/EXAMPLES.md +++ /dev/null @@ -1,62 +0,0 @@ -# Examples - -Init your Appwrite client: - -```dart -Client client = Client(); - -client - .setEndpoint('https://localhost/v1') // Your Appwrite Endpoint - .setProject('5e8cf4f46b5e8') // Your project ID - .setSelfSigned() // Remove in production -; -``` - -Create a new user: - -```dart -Users users = Users(client); - -User result = await users.create( - userId: ID.unique(), - email: "email@example.com", - phone: "+123456789", - password: "password", - name: "Walter O'Brien" -); -``` - -Fetch user profile: - -```dart -Users users = Users(client); - -User profile = await users.get( - userId: '[USER_ID]', -); -``` - -Upload File: - -```dart -Storage storage = Storage(client); - -InputFile file = InputFile(path: './path-to-file/image.jpg', filename: 'image.jpg'); - -storage.createFile( - bucketId: '[BUCKET_ID]', - fileId: '[FILE_ID]', // use 'unique()' to automatically generate a unique ID - file: file, - permissions: [ - Permission.read(Role.any()), - ], -) -.then((response) { - print(response); // File uploaded! -}) -.catchError((error) { - print(error.response); -}); -``` - -All examples and API features are available at the [official Appwrite docs](https://appwrite.io/docs) diff --git a/docs/sdks/java/CHANGELOG.md b/docs/sdks/java/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/docs/sdks/java/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/docs/sdks/kotlin/GETTING_STARTED.md b/docs/sdks/kotlin/GETTING_STARTED.md index 71db1af77d..2a36a9deb7 100644 --- a/docs/sdks/kotlin/GETTING_STARTED.md +++ b/docs/sdks/kotlin/GETTING_STARTED.md @@ -61,6 +61,7 @@ suspend fun main() { The Appwrite Kotlin SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a `nestedType` parameter that allows you to specify your custom model type for full type safety. +**Kotlin:** ```kotlin data class Book( val name: String, @@ -88,6 +89,60 @@ try { } ``` +**Java:** +```java +public class Book { + private String name; + private String author; + private String releaseYear; + private String category; + private List genre; + private boolean isCheckedOut; + + // Constructor + public Book(String name, String author, boolean isCheckedOut) { + this.name = name; + this.author = author; + this.isCheckedOut = isCheckedOut; + } + + // Getters and setters + public String getName() { return name; } + public void setName(String name) { this.name = name; } + + public String getAuthor() { return author; } + public void setAuthor(String author) { this.author = author; } + + public String getReleaseYear() { return releaseYear; } + public void setReleaseYear(String releaseYear) { this.releaseYear = releaseYear; } + + public String getCategory() { return category; } + public void setCategory(String category) { this.category = category; } + + public List getGenre() { return genre; } + public void setGenre(List genre) { this.genre = genre; } + + public boolean isCheckedOut() { return isCheckedOut; } + public void setCheckedOut(boolean checkedOut) { isCheckedOut = checkedOut; } +} + +Databases databases = new Databases(client); + +try { + DocumentList documents = databases.listDocuments( + "your-database-id", + "your-collection-id", + Book.class // Pass in your custom model type + ); + + for (Book book : documents.getDocuments()) { + Log.d("Appwrite", "Book: " + book.getName() + " by " + book.getAuthor()); // Now you have full type safety + } +} catch (AppwriteException e) { + Log.e("Appwrite", e.getMessage() != null ? e.getMessage() : "Unknown error"); +} +``` + **Tip**: You can use the `appwrite types` command to automatically generate model definitions based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). ### Working with Model Methods diff --git a/docs/sdks/typescript/CHANGELOG.md b/docs/sdks/typescript/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/docs/sdks/typescript/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/docs/sdks/web/README.md b/docs/sdks/web/README.md deleted file mode 100644 index d1becb4c31..0000000000 --- a/docs/sdks/web/README.md +++ /dev/null @@ -1,15 +0,0 @@ -## Getting Started - -Initialise the Appwrite SDK in your code, and setup your API credentials: - -```js - -// Init your Web SDK -var appwrite = new Appwrite(); - -appwrite - .setEndpoint('http://localhost/v1') // Set only when using self-hosted solution - .setProject('455x34dfkj') // Your Appwrite Project UID -; - -``` From f39fe22e6f2c4e4a91bae6cfc0078154978baaff Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Sat, 26 Jul 2025 11:17:43 +0530 Subject: [PATCH 10/14] chore: add docs in web and node --- docs/sdks/nodejs/GETTING_STARTED.md | 65 ++++++++++++++++++++++++ docs/sdks/web/GETTING_STARTED.md | 79 +++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) diff --git a/docs/sdks/nodejs/GETTING_STARTED.md b/docs/sdks/nodejs/GETTING_STARTED.md index e98400f846..b54f85c51d 100644 --- a/docs/sdks/nodejs/GETTING_STARTED.md +++ b/docs/sdks/nodejs/GETTING_STARTED.md @@ -1,6 +1,7 @@ ## Getting Started ### Init your SDK + Initialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page and your new API secret Key project API keys section. ```js @@ -17,6 +18,7 @@ client ``` ### Make Your First Request + Once your SDK object is set, create any of the Appwrite service objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section. ```js @@ -54,7 +56,70 @@ promise.then(function (response) { }); ``` +### Type Safety with Models + +The Appwrite Node SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a generic type parameter that allows you to specify your custom model type for full type safety. + +**TypeScript:** +```typescript +interface Book { + name: string; + author: string; + releaseYear?: string; + category?: string; + genre?: string[]; + isCheckedOut: boolean; +} + +const databases = new Databases(client); + +try { + const documents = await databases.listDocuments( + 'your-database-id', + 'your-collection-id' + ); + + documents.documents.forEach(book => { + console.log(`Book: ${book.name} by ${book.author}`); // Now you have full type safety + }); +} catch (error) { + console.error('Appwrite error:', error); +} +``` + +**JavaScript (with JSDoc for type hints):** +```javascript +/** + * @typedef {Object} Book + * @property {string} name + * @property {string} author + * @property {string} [releaseYear] + * @property {string} [category] + * @property {string[]} [genre] + * @property {boolean} isCheckedOut + */ + +const databases = new Databases(client); + +try { + /** @type {Models.DocumentList} */ + const documents = await databases.listDocuments( + 'your-database-id', + 'your-collection-id' + ); + + documents.documents.forEach(book => { + console.log(`Book: ${book.name} by ${book.author}`); // Type hints available in IDE + }); +} catch (error) { + console.error('Appwrite error:', error); +} +``` + +**Tip**: You can use the `appwrite types` command to automatically generate TypeScript interfaces based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). + ### Error Handling + The Appwrite Node SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example. ```js diff --git a/docs/sdks/web/GETTING_STARTED.md b/docs/sdks/web/GETTING_STARTED.md index 26aa9470bd..93f8bd4fc8 100644 --- a/docs/sdks/web/GETTING_STARTED.md +++ b/docs/sdks/web/GETTING_STARTED.md @@ -1,11 +1,13 @@ ## Getting Started ### Add your Web Platform + For you to init your SDK and interact with Appwrite services you need to add a web platform to your project. To add a new platform, go to your Appwrite console, choose the project you created in the step before and click the 'Add Platform' button. From the options, choose to add a **Web** platform and add your client app hostname. By adding your hostname to your project platform you are allowing cross-domain communication between your project and the Appwrite API. ### Init your SDK + Initialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page. ```js @@ -19,6 +21,7 @@ client ``` ### Make Your First Request + Once your SDK object is set, access any of the Appwrite services and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section. ```js @@ -55,7 +58,83 @@ account.create(ID.unique(), "email@example.com", "password", "Walter O'Brien") }); ``` +### Type Safety with Models + +The Appwrite Web SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a generic type parameter that allows you to specify your custom model type for full type safety. + +**TypeScript:** +```typescript +interface Book { + name: string; + author: string; + releaseYear?: string; + category?: string; + genre?: string[]; + isCheckedOut: boolean; +} + +const databases = new Databases(client); + +try { + const documents = await databases.listDocuments( + 'your-database-id', + 'your-collection-id' + ); + + documents.documents.forEach(book => { + console.log(`Book: ${book.name} by ${book.author}`); // Now you have full type safety + }); +} catch (error) { + console.error('Appwrite error:', error); +} +``` + +**JavaScript (with JSDoc for type hints):** +```javascript +/** + * @typedef {Object} Book + * @property {string} name + * @property {string} author + * @property {string} [releaseYear] + * @property {string} [category] + * @property {string[]} [genre] + * @property {boolean} isCheckedOut + */ + +const databases = new Databases(client); + +try { + /** @type {Models.DocumentList} */ + const documents = await databases.listDocuments( + 'your-database-id', + 'your-collection-id' + ); + + documents.documents.forEach(book => { + console.log(`Book: ${book.name} by ${book.author}`); // Type hints available in IDE + }); +} catch (error) { + console.error('Appwrite error:', error); +} +``` + +**Tip**: You can use the `appwrite types` command to automatically generate TypeScript interfaces based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). + +### Error Handling + +The Appwrite Web SDK raises an `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching the exception and present the `message` to the user or handle it yourself based on the provided error information. Below is an example. + +```javascript +try { + const user = await account.create(ID.unique(), "email@example.com", "password", "Walter O'Brien"); + console.log('User created:', user); +} catch (error) { + console.error('Appwrite error:', error.message); +} +``` + ### Learn more + You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-web) - 📜 [Appwrite Docs](https://appwrite.io/docs) From 9be01f2ac98642c0bc963d44a5514a5287dded8b Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Sat, 26 Jul 2025 11:24:19 +0530 Subject: [PATCH 11/14] add docs in rn --- docs/sdks/deno/GETTING_STARTED.md | 4 ++ docs/sdks/react-native/GETTING_STARTED.md | 84 ++++++++++++++++++++++- docs/sdks/web/GETTING_STARTED.md | 1 + 3 files changed, 87 insertions(+), 2 deletions(-) diff --git a/docs/sdks/deno/GETTING_STARTED.md b/docs/sdks/deno/GETTING_STARTED.md index 22ea80aa84..5046d61c74 100644 --- a/docs/sdks/deno/GETTING_STARTED.md +++ b/docs/sdks/deno/GETTING_STARTED.md @@ -1,6 +1,7 @@ ## Getting Started ### Init your SDK + Initialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page and your new API secret Key from project's API keys section. ```typescript @@ -26,6 +27,7 @@ console.log(user); ``` ### Full Example + ```typescript import * as sdk from "https://deno.land/x/appwrite/mod.ts"; @@ -44,6 +46,7 @@ console.log(user); ``` ### Error Handling + The Appwrite Deno SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example. ```typescript @@ -57,6 +60,7 @@ try { ``` ### Learn more + You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) diff --git a/docs/sdks/react-native/GETTING_STARTED.md b/docs/sdks/react-native/GETTING_STARTED.md index 9d07eec54a..a5c6f57c46 100644 --- a/docs/sdks/react-native/GETTING_STARTED.md +++ b/docs/sdks/react-native/GETTING_STARTED.md @@ -1,12 +1,13 @@ - ## Getting Started ### Add your Platform + If this is your first time using Appwrite, create an account and create your first project. Then, under **Add a platform**, add a **Android app** or a **Apple app**. You can skip optional steps. #### iOS steps + Add your app **name** and **Bundle ID**. You can find your **Bundle Identifier** in the **General** tab for your app's primary target in XCode. For Expo projects you can set or find it on **app.json** file at your project's root directory. #### Android steps @@ -24,6 +25,7 @@ import 'react-native-url-polyfill/auto' > `cd ios && pod install && cd ..` ### Init your SDK + Initialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page. ```js @@ -39,6 +41,7 @@ client ``` ### Make Your First Request + Once your SDK object is set, access any of the Appwrite services and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section. ```js @@ -55,6 +58,7 @@ account.create(ID.unique(), 'me@example.com', 'password', 'Jane Doe') ``` ### Full Example + ```js import { Client, Account } from 'react-native-appwrite'; // Init your React Native SDK @@ -77,9 +81,85 @@ account.create(ID.unique(), 'me@example.com', 'password', 'Jane Doe') }); ``` +### Type Safety with Models + +The Appwrite React Native SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a generic type parameter that allows you to specify your custom model type for full type safety. + +**TypeScript:** +```typescript +interface Book { + name: string; + author: string; + releaseYear?: string; + category?: string; + genre?: string[]; + isCheckedOut: boolean; +} + +const databases = new Databases(client); + +try { + const documents = await databases.listDocuments( + 'your-database-id', + 'your-collection-id' + ); + + documents.documents.forEach(book => { + console.log(`Book: ${book.name} by ${book.author}`); // Now you have full type safety + }); +} catch (error) { + console.error('Appwrite error:', error); +} +``` + +**JavaScript (with JSDoc for type hints):** +```javascript +/** + * @typedef {Object} Book + * @property {string} name + * @property {string} author + * @property {string} [releaseYear] + * @property {string} [category] + * @property {string[]} [genre] + * @property {boolean} isCheckedOut + */ + +const databases = new Databases(client); + +try { + /** @type {Models.DocumentList} */ + const documents = await databases.listDocuments( + 'your-database-id', + 'your-collection-id' + ); + + documents.documents.forEach(book => { + console.log(`Book: ${book.name} by ${book.author}`); // Type hints available in IDE + }); +} catch (error) { + console.error('Appwrite error:', error); +} +``` + +**Tip**: You can use the `appwrite types` command to automatically generate TypeScript interfaces based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation). + +### Error Handling + +The Appwrite React Native SDK raises an `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching the exception and present the `message` to the user or handle it yourself based on the provided error information. Below is an example. + +```javascript +try { + const user = await account.create(ID.unique(), "email@example.com", "password", "Walter O'Brien"); + console.log('User created:', user); +} catch (error) { + console.error('Appwrite error:', error.message); +} +``` + ### Learn more + You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/quick-starts/react-native) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) -- 🚂 [Appwrite React Native Playground](https://github.com/appwrite/playground-for-react-native) \ No newline at end of file +- 🚂 [Appwrite React Native Playground](https://github.com/appwrite/playground-for-react-native) diff --git a/docs/sdks/web/GETTING_STARTED.md b/docs/sdks/web/GETTING_STARTED.md index 93f8bd4fc8..cc75a3d3e5 100644 --- a/docs/sdks/web/GETTING_STARTED.md +++ b/docs/sdks/web/GETTING_STARTED.md @@ -38,6 +38,7 @@ account.create(ID.unique(), "email@example.com", "password", "Walter O'Brien") ``` ### Full Example + ```js // Init your Web SDK const client = new Client(); From 1f26f98568164a29f3213908f171c79b1926a2ac Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Sun, 27 Jul 2025 10:01:37 +0530 Subject: [PATCH 12/14] chore: update go --- app/config/platforms.php | 2 +- docs/sdks/go/CHANGELOG.md | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 127100710d..ae09c39cac 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -341,7 +341,7 @@ return [ [ 'key' => 'go', 'name' => 'Go', - 'version' => '0.7.1', + 'version' => '0.9.0', 'url' => 'https://github.com/appwrite/sdk-for-go', 'package' => 'https://github.com/appwrite/sdk-for-go', 'enabled' => true, diff --git a/docs/sdks/go/CHANGELOG.md b/docs/sdks/go/CHANGELOG.md index 0727ce1e2b..418c7db5e5 100644 --- a/docs/sdks/go/CHANGELOG.md +++ b/docs/sdks/go/CHANGELOG.md @@ -1,12 +1,12 @@ # Change Log -## 0.7.1 +## 0.9.0 * Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service * Add `upsertDocument` support to `Databases` service * Update doc examples to use correct syntax -## 0.7.0 +## 0.8.0 * Add `` to doc examples due to the new multi region endpoints * Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. @@ -18,6 +18,10 @@ * Add `queries` and `search` params to `listMemberships` method * Remove `search` param from `listExecutions` method +## 0.7.0 + +* Version skipped + ## 0.6.0 * Add bulk API methods: `createDocuments`, `deleteDocuments` etc. @@ -25,3 +29,11 @@ ## 0.5.0 * Fix requests failing by removing `Content-Type` header from `GET` and `HEAD` requests + +## 0.4.0 + +* Fix pong response and chunked upload + +## 0.3.0 + +* Add new push message parameters From f2a3369131e9cd9600f237dc2a07d7333da3b326 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Sun, 27 Jul 2025 10:18:51 +0530 Subject: [PATCH 13/14] chore: use config.json --- .gitignore | 1 - app/config/variables.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 600a6aeb08..369aec6ff5 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,4 @@ app/sdks dev/yasd_init.php .phpunit.result.cache Makefile -appwrite.json /.zed/ \ No newline at end of file diff --git a/app/config/variables.php b/app/config/variables.php index 2f9a5ab41a..71ed13a483 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -827,7 +827,7 @@ return [ ], [ 'name' => '_APP_FUNCTIONS_TIMEOUT', - 'description' => 'The maximum number of seconds allowed as a timeout value when creating a new function. The default value is 900 seconds. This is the global limit, timeout for individual functions are configured in the function\'s settings or in appwrite.json.', + 'description' => 'The maximum number of seconds allowed as a timeout value when creating a new function. The default value is 900 seconds. This is the global limit, timeout for individual functions are configured in the function\'s settings or in appwrite.config.json.', 'introduction' => '0.7.0', 'default' => '900', 'required' => false, @@ -1070,7 +1070,7 @@ return [ 'variables' => [ [ 'name' => '_APP_SITES_TIMEOUT', - 'description' => 'The maximum number of seconds allowed as a timeout value when creating a new site. The default value is 900 seconds. This is the global limit, timeout for individual functions are configured in the sites\'s settings or in appwrite.json.', + 'description' => 'The maximum number of seconds allowed as a timeout value when creating a new site. The default value is 900 seconds. This is the global limit, timeout for individual functions are configured in the sites\'s settings or in appwrite.config.json.', 'introduction' => '1.7.0', 'default' => '900', 'required' => false, From 1f13a0d437678f5e9ed3834efae797f73c472804 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Sun, 27 Jul 2025 10:19:14 +0530 Subject: [PATCH 14/14] fix: gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 369aec6ff5..1d0f0533f2 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ app/sdks dev/yasd_init.php .phpunit.result.cache Makefile +appwrite.config.json /.zed/ \ No newline at end of file