diff --git a/CHANGELOG.md b/CHANGELOG.md
index b57580ef..f3aa24a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Change Log
+## 27.2.0
+
+* Added: `DocumentsDB` and `VectorsDB` services for document and vector database access
+* Added: `userId`, `emailHash` and `name` parameters to `Avatars.getPhoto()`
+* Added: `CLOUDFLARE` and `RESEND` values to `OAuthProvider` enum
+* Added: `AUTO` value to `ImageGravity` enum
+* Fixed: `Client.setEndpoint` and `setEndpointRealtime` are fluent when called from Java
+* Updated: `x-appwrite-response-format` header to `2.0.0`
+
## 27.1.0
* Added: `Realtime.onError`, `onOpen`, and `onClose` lifecycle callbacks
diff --git a/README.md b/README.md
index 62e9d751..e8e30481 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,12 @@


-
+
[](https://travis-ci.com/appwrite/sdk-generator)
[](https://twitter.com/appwrite)
[](https://appwrite.io/discord)
-**This SDK is compatible with Appwrite server version 1.9.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-android/releases).**
+**This SDK targets Appwrite server version 2.0.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-android/releases) when APIs differ.
Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Android SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
@@ -38,7 +38,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:
```groovy
-implementation("io.appwrite:sdk-for-android:27.0.0")
+implementation("io.appwrite:sdk-for-android:27.2.0")
```
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
io.appwrite
sdk-for-android
- 27.0.0
+ 27.2.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 252363de..2239ad56 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -2,8 +2,8 @@ import java.util.Properties
plugins {
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
- id("com.android.library") version "9.3.2" apply false
- id("com.android.application") version "9.3.2" apply false
+ id("com.android.library") version "9.4.0" apply false
+ id("com.android.application") version "9.4.0" apply false
}
version = System.getenv("SDK_VERSION") ?: "0.0.0"
diff --git a/docs/examples/java/avatars/get-initials.md b/docs/examples/java/avatars/get-initials.md
index 1b781b67..08f5bea9 100644
--- a/docs/examples/java/avatars/get-initials.md
+++ b/docs/examples/java/avatars/get-initials.md
@@ -15,7 +15,7 @@ avatars.getInitials(
"", // name (optional)
0, // width (optional)
0, // height (optional)
- "", // background (optional)
+ "FFFFFF", // background (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/avatars/get-photo.md b/docs/examples/java/avatars/get-photo.md
index b1d14dca..2204db78 100644
--- a/docs/examples/java/avatars/get-photo.md
+++ b/docs/examples/java/avatars/get-photo.md
@@ -17,6 +17,9 @@ avatars.getPhoto(
0, // quality (optional)
"png", // output (optional)
"g", // rating (optional)
+ "current()", // userId (optional)
+ "", // emailHash (optional)
+ "", // name (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/databases/decrement-document-attribute.md b/docs/examples/java/databases/decrement-document-attribute.md
index f069abbf..1a2f23e2 100644
--- a/docs/examples/java/databases/decrement-document-attribute.md
+++ b/docs/examples/java/databases/decrement-document-attribute.md
@@ -15,8 +15,8 @@ databases.decrementDocumentAttribute(
"", // databaseId
"", // collectionId
"", // documentId
- "", // attribute
- 0, // value (optional)
+ "", // attribute
+ 1, // value (optional)
0, // min (optional)
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
diff --git a/docs/examples/java/databases/increment-document-attribute.md b/docs/examples/java/databases/increment-document-attribute.md
index c41a9071..fe363592 100644
--- a/docs/examples/java/databases/increment-document-attribute.md
+++ b/docs/examples/java/databases/increment-document-attribute.md
@@ -15,9 +15,9 @@ databases.incrementDocumentAttribute(
"", // databaseId
"", // collectionId
"", // documentId
- "", // attribute
- 0, // value (optional)
- 0, // max (optional)
+ "", // attribute
+ 1, // value (optional)
+ 100, // max (optional)
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/documentsdb/create-document.md b/docs/examples/java/documentsdb/create-document.md
new file mode 100644
index 00000000..77f034d8
--- /dev/null
+++ b/docs/examples/java/documentsdb/create-document.md
@@ -0,0 +1,39 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.Permission;
+import io.appwrite.Role;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.createDocument(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ Map.of(
+ "username", "walter.obrien",
+ "email", "walter.obrien@example.com",
+ "fullName", "Walter O'Brien",
+ "age", 30,
+ "isAdmin", false
+ ), // data
+ List.of(Permission.read(Role.any())), // permissions (optional)
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/create-documents.md b/docs/examples/java/documentsdb/create-documents.md
new file mode 100644
index 00000000..c52433a2
--- /dev/null
+++ b/docs/examples/java/documentsdb/create-documents.md
@@ -0,0 +1,29 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.createDocuments(
+ "", // databaseId
+ "", // collectionId
+ List.of(), // documents
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/create-operations.md b/docs/examples/java/documentsdb/create-operations.md
new file mode 100644
index 00000000..961a5501
--- /dev/null
+++ b/docs/examples/java/documentsdb/create-operations.md
@@ -0,0 +1,35 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.createOperations(
+ "", // transactionId
+ List.of(Map.of(
+ "action", "create",
+ "databaseId", "",
+ "collectionId", "",
+ "documentId", "",
+ "data", Map.of(
+ "name", "Walter O'Brien"
+ )
+ )), // operations (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/create-transaction.md b/docs/examples/java/documentsdb/create-transaction.md
new file mode 100644
index 00000000..da91c5c8
--- /dev/null
+++ b/docs/examples/java/documentsdb/create-transaction.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.createTransaction(
+ 60, // ttl (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/decrement-document-attribute.md b/docs/examples/java/documentsdb/decrement-document-attribute.md
new file mode 100644
index 00000000..f1853ac6
--- /dev/null
+++ b/docs/examples/java/documentsdb/decrement-document-attribute.md
@@ -0,0 +1,32 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.decrementDocumentAttribute(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ "", // attribute
+ 1, // value (optional)
+ 0, // min (optional)
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/delete-document.md b/docs/examples/java/documentsdb/delete-document.md
new file mode 100644
index 00000000..247a63aa
--- /dev/null
+++ b/docs/examples/java/documentsdb/delete-document.md
@@ -0,0 +1,29 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.deleteDocument(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/delete-transaction.md b/docs/examples/java/documentsdb/delete-transaction.md
new file mode 100644
index 00000000..0b0a7616
--- /dev/null
+++ b/docs/examples/java/documentsdb/delete-transaction.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.deleteTransaction(
+ "", // transactionId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/get-document.md b/docs/examples/java/documentsdb/get-document.md
new file mode 100644
index 00000000..7bd66e1e
--- /dev/null
+++ b/docs/examples/java/documentsdb/get-document.md
@@ -0,0 +1,30 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.getDocument(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ List.of(), // queries (optional)
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/get-transaction.md b/docs/examples/java/documentsdb/get-transaction.md
new file mode 100644
index 00000000..12c42243
--- /dev/null
+++ b/docs/examples/java/documentsdb/get-transaction.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.getTransaction(
+ "", // transactionId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/increment-document-attribute.md b/docs/examples/java/documentsdb/increment-document-attribute.md
new file mode 100644
index 00000000..fab214e9
--- /dev/null
+++ b/docs/examples/java/documentsdb/increment-document-attribute.md
@@ -0,0 +1,32 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.incrementDocumentAttribute(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ "", // attribute
+ 1, // value (optional)
+ 100, // max (optional)
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/list-documents.md b/docs/examples/java/documentsdb/list-documents.md
new file mode 100644
index 00000000..0abb6734
--- /dev/null
+++ b/docs/examples/java/documentsdb/list-documents.md
@@ -0,0 +1,31 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.listDocuments(
+ "", // databaseId
+ "", // collectionId
+ List.of(), // queries (optional)
+ "", // transactionId (optional)
+ false, // total (optional)
+ 0, // ttl (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/list-transactions.md b/docs/examples/java/documentsdb/list-transactions.md
new file mode 100644
index 00000000..9b8fcd7b
--- /dev/null
+++ b/docs/examples/java/documentsdb/list-transactions.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.listTransactions(
+ List.of(), // queries (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/update-document.md b/docs/examples/java/documentsdb/update-document.md
new file mode 100644
index 00000000..da8475fa
--- /dev/null
+++ b/docs/examples/java/documentsdb/update-document.md
@@ -0,0 +1,33 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.Permission;
+import io.appwrite.Role;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.updateDocument(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ Map.of("a", "b"), // data (optional)
+ List.of(Permission.read(Role.any())), // permissions (optional)
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/update-transaction.md b/docs/examples/java/documentsdb/update-transaction.md
new file mode 100644
index 00000000..9d95dfcd
--- /dev/null
+++ b/docs/examples/java/documentsdb/update-transaction.md
@@ -0,0 +1,28 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.updateTransaction(
+ "", // transactionId
+ false, // commit (optional)
+ false, // rollback (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/documentsdb/upsert-document.md b/docs/examples/java/documentsdb/upsert-document.md
new file mode 100644
index 00000000..82e90a40
--- /dev/null
+++ b/docs/examples/java/documentsdb/upsert-document.md
@@ -0,0 +1,33 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.Permission;
+import io.appwrite.Role;
+import io.appwrite.services.DocumentsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+DocumentsDB documentsDB = new DocumentsDB(client);
+
+documentsDB.upsertDocument(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ Map.of("a", "b"), // data (optional)
+ List.of(Permission.read(Role.any())), // permissions (optional)
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/storage/create-file.md b/docs/examples/java/storage/create-file.md
index bcc8296b..e441255e 100644
--- a/docs/examples/java/storage/create-file.md
+++ b/docs/examples/java/storage/create-file.md
@@ -19,7 +19,7 @@ storage.createFile(
"", // fileId
InputFile.fromPath("file.png"), // file
List.of(Permission.read(Role.any())), // permissions (optional)
- "", // folder (optional)
+ "photos/2026", // folder (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/storage/get-file-preview.md b/docs/examples/java/storage/get-file-preview.md
index f7282076..3d753c44 100644
--- a/docs/examples/java/storage/get-file-preview.md
+++ b/docs/examples/java/storage/get-file-preview.md
@@ -18,14 +18,14 @@ storage.getFilePreview(
"", // fileId
0, // width (optional)
0, // height (optional)
- ImageGravity.CENTER, // gravity (optional)
+ ImageGravity.AUTO, // gravity (optional)
-1, // quality (optional)
0, // borderWidth (optional)
- "", // borderColor (optional)
+ "FFFFFF", // borderColor (optional)
0, // borderRadius (optional)
0, // opacity (optional)
-360, // rotation (optional)
- "", // background (optional)
+ "FFFFFF", // background (optional)
ImageFormat.JPG, // output (optional)
"", // token (optional)
new CoroutineCallback<>((result, error) -> {
diff --git a/docs/examples/java/tablesdb/decrement-row-column.md b/docs/examples/java/tablesdb/decrement-row-column.md
index 5f9b7ce1..c998b442 100644
--- a/docs/examples/java/tablesdb/decrement-row-column.md
+++ b/docs/examples/java/tablesdb/decrement-row-column.md
@@ -15,8 +15,8 @@ tablesDB.decrementRowColumn(
"", // databaseId
"", // tableId
"", // rowId
- "", // column
- 0, // value (optional)
+ "", // column
+ 1, // value (optional)
0, // min (optional)
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
diff --git a/docs/examples/java/tablesdb/increment-row-column.md b/docs/examples/java/tablesdb/increment-row-column.md
index ae97cdb8..5fb7189e 100644
--- a/docs/examples/java/tablesdb/increment-row-column.md
+++ b/docs/examples/java/tablesdb/increment-row-column.md
@@ -15,9 +15,9 @@ tablesDB.incrementRowColumn(
"", // databaseId
"", // tableId
"", // rowId
- "", // column
- 0, // value (optional)
- 0, // max (optional)
+ "", // column
+ 1, // value (optional)
+ 100, // max (optional)
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/vectorsdb/create-document.md b/docs/examples/java/vectorsdb/create-document.md
new file mode 100644
index 00000000..8a3d7f9e
--- /dev/null
+++ b/docs/examples/java/vectorsdb/create-document.md
@@ -0,0 +1,38 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.Permission;
+import io.appwrite.Role;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.createDocument(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ Map.of(
+ "embeddings", List.of(0.12, -0.55, 0.88, 1.02),
+ "metadata", Map.of(
+ "key", "value"
+ )
+ ), // data
+ List.of(Permission.read(Role.any())), // permissions (optional)
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/create-operations.md b/docs/examples/java/vectorsdb/create-operations.md
new file mode 100644
index 00000000..7e503634
--- /dev/null
+++ b/docs/examples/java/vectorsdb/create-operations.md
@@ -0,0 +1,35 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.createOperations(
+ "", // transactionId
+ List.of(Map.of(
+ "action", "create",
+ "databaseId", "",
+ "collectionId", "",
+ "documentId", "",
+ "data", Map.of(
+ "name", "Walter O'Brien"
+ )
+ )), // operations (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/create-query.md b/docs/examples/java/vectorsdb/create-query.md
new file mode 100644
index 00000000..3f1cfd5c
--- /dev/null
+++ b/docs/examples/java/vectorsdb/create-query.md
@@ -0,0 +1,31 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.createQuery(
+ "", // databaseId
+ "", // collectionId
+ List.of(), // queries (optional)
+ "", // transactionId (optional)
+ false, // total (optional)
+ 0, // ttl (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/create-transaction.md b/docs/examples/java/vectorsdb/create-transaction.md
new file mode 100644
index 00000000..4784fc47
--- /dev/null
+++ b/docs/examples/java/vectorsdb/create-transaction.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.createTransaction(
+ 60, // ttl (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/delete-document.md b/docs/examples/java/vectorsdb/delete-document.md
new file mode 100644
index 00000000..d8067301
--- /dev/null
+++ b/docs/examples/java/vectorsdb/delete-document.md
@@ -0,0 +1,29 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.deleteDocument(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/delete-transaction.md b/docs/examples/java/vectorsdb/delete-transaction.md
new file mode 100644
index 00000000..04b9c4da
--- /dev/null
+++ b/docs/examples/java/vectorsdb/delete-transaction.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.deleteTransaction(
+ "", // transactionId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/get-document.md b/docs/examples/java/vectorsdb/get-document.md
new file mode 100644
index 00000000..15ddf82d
--- /dev/null
+++ b/docs/examples/java/vectorsdb/get-document.md
@@ -0,0 +1,30 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.getDocument(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ List.of(), // queries (optional)
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/get-transaction.md b/docs/examples/java/vectorsdb/get-transaction.md
new file mode 100644
index 00000000..987ca6e7
--- /dev/null
+++ b/docs/examples/java/vectorsdb/get-transaction.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.getTransaction(
+ "", // transactionId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/list-documents.md b/docs/examples/java/vectorsdb/list-documents.md
new file mode 100644
index 00000000..12ef1f0c
--- /dev/null
+++ b/docs/examples/java/vectorsdb/list-documents.md
@@ -0,0 +1,31 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.listDocuments(
+ "", // databaseId
+ "", // collectionId
+ List.of(), // queries (optional)
+ "", // transactionId (optional)
+ false, // total (optional)
+ 0, // ttl (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/list-transactions.md b/docs/examples/java/vectorsdb/list-transactions.md
new file mode 100644
index 00000000..18ef0e55
--- /dev/null
+++ b/docs/examples/java/vectorsdb/list-transactions.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.listTransactions(
+ List.of(), // queries (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/update-document.md b/docs/examples/java/vectorsdb/update-document.md
new file mode 100644
index 00000000..4acb5cce
--- /dev/null
+++ b/docs/examples/java/vectorsdb/update-document.md
@@ -0,0 +1,33 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.Permission;
+import io.appwrite.Role;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.updateDocument(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ Map.of("a", "b"), // data (optional)
+ List.of(Permission.read(Role.any())), // permissions (optional)
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/update-transaction.md b/docs/examples/java/vectorsdb/update-transaction.md
new file mode 100644
index 00000000..a21aad1a
--- /dev/null
+++ b/docs/examples/java/vectorsdb/update-transaction.md
@@ -0,0 +1,28 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.updateTransaction(
+ "", // transactionId
+ false, // commit (optional)
+ false, // rollback (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/vectorsdb/upsert-document.md b/docs/examples/java/vectorsdb/upsert-document.md
new file mode 100644
index 00000000..58ac9a9a
--- /dev/null
+++ b/docs/examples/java/vectorsdb/upsert-document.md
@@ -0,0 +1,33 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.Permission;
+import io.appwrite.Role;
+import io.appwrite.services.VectorsDB;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+VectorsDB vectorsDB = new VectorsDB(client);
+
+vectorsDB.upsertDocument(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ Map.of("a", "b"), // data (optional)
+ List.of(Permission.read(Role.any())), // permissions (optional)
+ "", // transactionId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/kotlin/avatars/get-initials.md b/docs/examples/kotlin/avatars/get-initials.md
index 1cb76a18..31b1f474 100644
--- a/docs/examples/kotlin/avatars/get-initials.md
+++ b/docs/examples/kotlin/avatars/get-initials.md
@@ -13,6 +13,6 @@ val result = avatars.getInitials(
name = "", // (optional)
width = 0, // (optional)
height = 0, // (optional)
- background = "", // (optional)
+ background = "FFFFFF", // (optional)
)
```
diff --git a/docs/examples/kotlin/avatars/get-photo.md b/docs/examples/kotlin/avatars/get-photo.md
index a05805fb..d1127ba6 100644
--- a/docs/examples/kotlin/avatars/get-photo.md
+++ b/docs/examples/kotlin/avatars/get-photo.md
@@ -15,5 +15,8 @@ val result = avatars.getPhoto(
quality = 0, // (optional)
output = "png", // (optional)
rating = "g", // (optional)
+ userId = "current()", // (optional)
+ emailHash = "", // (optional)
+ name = "", // (optional)
)
```
diff --git a/docs/examples/kotlin/databases/decrement-document-attribute.md b/docs/examples/kotlin/databases/decrement-document-attribute.md
index 9ca780fd..c32a6002 100644
--- a/docs/examples/kotlin/databases/decrement-document-attribute.md
+++ b/docs/examples/kotlin/databases/decrement-document-attribute.md
@@ -13,8 +13,8 @@ val result = databases.decrementDocumentAttribute(
databaseId = "",
collectionId = "",
documentId = "",
- attribute = "",
- value = 0, // (optional)
+ attribute = "",
+ value = 1, // (optional)
min = 0, // (optional)
transactionId = "", // (optional)
)
diff --git a/docs/examples/kotlin/databases/increment-document-attribute.md b/docs/examples/kotlin/databases/increment-document-attribute.md
index 20afc996..daaa6d6a 100644
--- a/docs/examples/kotlin/databases/increment-document-attribute.md
+++ b/docs/examples/kotlin/databases/increment-document-attribute.md
@@ -13,9 +13,9 @@ val result = databases.incrementDocumentAttribute(
databaseId = "",
collectionId = "",
documentId = "",
- attribute = "",
- value = 0, // (optional)
- max = 0, // (optional)
+ attribute = "",
+ value = 1, // (optional)
+ max = 100, // (optional)
transactionId = "", // (optional)
)
```
diff --git a/docs/examples/kotlin/documentsdb/create-document.md b/docs/examples/kotlin/documentsdb/create-document.md
new file mode 100644
index 00000000..e2e493f8
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/create-document.md
@@ -0,0 +1,28 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+import io.appwrite.Permission
+import io.appwrite.Role
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.createDocument(
+ databaseId = "",
+ collectionId = "",
+ documentId = "",
+ data = mapOf(
+ "username" to "walter.obrien",
+ "email" to "walter.obrien@example.com",
+ "fullName" to "Walter O'Brien",
+ "age" to 30,
+ "isAdmin" to false
+ ),
+ permissions = listOf(Permission.read(Role.any())), // (optional)
+ transactionId = "", // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/create-documents.md b/docs/examples/kotlin/documentsdb/create-documents.md
new file mode 100644
index 00000000..2923c100
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/create-documents.md
@@ -0,0 +1,18 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.createDocuments(
+ databaseId = "",
+ collectionId = "",
+ documents = listOf(),
+ transactionId = "", // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/create-operations.md b/docs/examples/kotlin/documentsdb/create-operations.md
new file mode 100644
index 00000000..c6258095
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/create-operations.md
@@ -0,0 +1,24 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.createOperations(
+ transactionId = "",
+ operations = listOf(mapOf(
+ "action" to "create",
+ "databaseId" to "",
+ "collectionId" to "",
+ "documentId" to "",
+ "data" to mapOf(
+ "name" to "Walter O'Brien"
+ )
+ )), // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/create-transaction.md b/docs/examples/kotlin/documentsdb/create-transaction.md
new file mode 100644
index 00000000..ad1f0b21
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/create-transaction.md
@@ -0,0 +1,15 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.createTransaction(
+ ttl = 60, // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/decrement-document-attribute.md b/docs/examples/kotlin/documentsdb/decrement-document-attribute.md
new file mode 100644
index 00000000..fdb11fe0
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/decrement-document-attribute.md
@@ -0,0 +1,21 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.decrementDocumentAttribute(
+ databaseId = "",
+ collectionId = "",
+ documentId = "",
+ attribute = "",
+ value = 1, // (optional)
+ min = 0, // (optional)
+ transactionId = "", // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/delete-document.md b/docs/examples/kotlin/documentsdb/delete-document.md
new file mode 100644
index 00000000..648a83ca
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/delete-document.md
@@ -0,0 +1,18 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.deleteDocument(
+ databaseId = "",
+ collectionId = "",
+ documentId = "",
+ transactionId = "", // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/delete-transaction.md b/docs/examples/kotlin/documentsdb/delete-transaction.md
new file mode 100644
index 00000000..d991466f
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/delete-transaction.md
@@ -0,0 +1,15 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.deleteTransaction(
+ transactionId = "",
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/get-document.md b/docs/examples/kotlin/documentsdb/get-document.md
new file mode 100644
index 00000000..1988e002
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/get-document.md
@@ -0,0 +1,19 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.getDocument(
+ databaseId = "",
+ collectionId = "",
+ documentId = "",
+ queries = listOf(), // (optional)
+ transactionId = "", // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/get-transaction.md b/docs/examples/kotlin/documentsdb/get-transaction.md
new file mode 100644
index 00000000..695412e7
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/get-transaction.md
@@ -0,0 +1,15 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.getTransaction(
+ transactionId = "",
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/increment-document-attribute.md b/docs/examples/kotlin/documentsdb/increment-document-attribute.md
new file mode 100644
index 00000000..8286ad44
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/increment-document-attribute.md
@@ -0,0 +1,21 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.incrementDocumentAttribute(
+ databaseId = "",
+ collectionId = "",
+ documentId = "",
+ attribute = "",
+ value = 1, // (optional)
+ max = 100, // (optional)
+ transactionId = "", // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/list-documents.md b/docs/examples/kotlin/documentsdb/list-documents.md
new file mode 100644
index 00000000..a8c1b66b
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/list-documents.md
@@ -0,0 +1,20 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.listDocuments(
+ databaseId = "",
+ collectionId = "",
+ queries = listOf(), // (optional)
+ transactionId = "", // (optional)
+ total = false, // (optional)
+ ttl = 0, // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/list-transactions.md b/docs/examples/kotlin/documentsdb/list-transactions.md
new file mode 100644
index 00000000..46571468
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/list-transactions.md
@@ -0,0 +1,15 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.listTransactions(
+ queries = listOf(), // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/update-document.md b/docs/examples/kotlin/documentsdb/update-document.md
new file mode 100644
index 00000000..69668863
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/update-document.md
@@ -0,0 +1,22 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+import io.appwrite.Permission
+import io.appwrite.Role
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.updateDocument(
+ databaseId = "",
+ collectionId = "",
+ documentId = "",
+ data = mapOf( "a" to "b" ), // (optional)
+ permissions = listOf(Permission.read(Role.any())), // (optional)
+ transactionId = "", // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/update-transaction.md b/docs/examples/kotlin/documentsdb/update-transaction.md
new file mode 100644
index 00000000..78fb3e7b
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/update-transaction.md
@@ -0,0 +1,17 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.updateTransaction(
+ transactionId = "",
+ commit = false, // (optional)
+ rollback = false, // (optional)
+)
+```
diff --git a/docs/examples/kotlin/documentsdb/upsert-document.md b/docs/examples/kotlin/documentsdb/upsert-document.md
new file mode 100644
index 00000000..defc50a2
--- /dev/null
+++ b/docs/examples/kotlin/documentsdb/upsert-document.md
@@ -0,0 +1,22 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.DocumentsDB
+import io.appwrite.Permission
+import io.appwrite.Role
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val documentsDB = DocumentsDB(client)
+
+val result = documentsDB.upsertDocument(
+ databaseId = "",
+ collectionId = "",
+ documentId = "",
+ data = mapOf( "a" to "b" ), // (optional)
+ permissions = listOf(Permission.read(Role.any())), // (optional)
+ transactionId = "", // (optional)
+)
+```
diff --git a/docs/examples/kotlin/storage/create-file.md b/docs/examples/kotlin/storage/create-file.md
index 44d3ac8b..0e095d2d 100644
--- a/docs/examples/kotlin/storage/create-file.md
+++ b/docs/examples/kotlin/storage/create-file.md
@@ -17,6 +17,6 @@ val result = storage.createFile(
fileId = "",
file = InputFile.fromPath("file.png"),
permissions = listOf(Permission.read(Role.any())), // (optional)
- folder = "", // (optional)
+ folder = "photos/2026", // (optional)
)
```
diff --git a/docs/examples/kotlin/storage/get-file-preview.md b/docs/examples/kotlin/storage/get-file-preview.md
index 2bb8cffd..e2d2851d 100644
--- a/docs/examples/kotlin/storage/get-file-preview.md
+++ b/docs/examples/kotlin/storage/get-file-preview.md
@@ -16,14 +16,14 @@ val result = storage.getFilePreview(
fileId = "",
width = 0, // (optional)
height = 0, // (optional)
- gravity = ImageGravity.CENTER, // (optional)
+ gravity = ImageGravity.AUTO, // (optional)
quality = -1, // (optional)
borderWidth = 0, // (optional)
- borderColor = "", // (optional)
+ borderColor = "FFFFFF", // (optional)
borderRadius = 0, // (optional)
opacity = 0, // (optional)
rotation = -360, // (optional)
- background = "", // (optional)
+ background = "FFFFFF", // (optional)
output = ImageFormat.JPG, // (optional)
token = "", // (optional)
)
diff --git a/docs/examples/kotlin/tablesdb/decrement-row-column.md b/docs/examples/kotlin/tablesdb/decrement-row-column.md
index 848eea97..157c3d11 100644
--- a/docs/examples/kotlin/tablesdb/decrement-row-column.md
+++ b/docs/examples/kotlin/tablesdb/decrement-row-column.md
@@ -13,8 +13,8 @@ val result = tablesDB.decrementRowColumn(
databaseId = "",
tableId = "",
rowId = "",
- column = "",
- value = 0, // (optional)
+ column = "",
+ value = 1, // (optional)
min = 0, // (optional)
transactionId = "", // (optional)
)
diff --git a/docs/examples/kotlin/tablesdb/increment-row-column.md b/docs/examples/kotlin/tablesdb/increment-row-column.md
index 85c03791..802c6a2b 100644
--- a/docs/examples/kotlin/tablesdb/increment-row-column.md
+++ b/docs/examples/kotlin/tablesdb/increment-row-column.md
@@ -13,9 +13,9 @@ val result = tablesDB.incrementRowColumn(
databaseId = "",
tableId = "",
rowId = "