diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8406e63..38d0c4b 100644
--- a/CHANGELOG.md
+++ b/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/README.md b/README.md
index 6bfc46c..745f21c 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@


-
+
[](https://travis-ci.com/appwrite/sdk-generator)
[](https://twitter.com/appwrite)
[](https://appwrite.io/discord)
@@ -38,7 +38,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:
```groovy
-implementation("io.appwrite:sdk-for-android:8.1.0")
+implementation("io.appwrite:sdk-for-android:8.2.0")
```
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
io.appwrite
sdk-for-android
- 8.1.0
+ 8.2.0
```
diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md
index 7fb129b..4804d75 100644
--- a/docs/examples/java/databases/create-document.md
+++ b/docs/examples/java/databases/create-document.md
@@ -4,9 +4,7 @@ import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
- .setSession("") // The user session to authenticate with
- .setKey("") //
- .setJWT(""); // Your secret JSON Web Token
+ .setProject(""); // Your project ID
Databases databases = new Databases(client);
diff --git a/docs/examples/java/databases/decrement-document-attribute.md b/docs/examples/java/databases/decrement-document-attribute.md
new file mode 100644
index 0000000..de6a4ab
--- /dev/null
+++ b/docs/examples/java/databases/decrement-document-attribute.md
@@ -0,0 +1,27 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Databases;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Databases databases = new Databases(client);
+
+databases.decrementDocumentAttribute(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ "", // attribute
+ 0, // value (optional)
+ 0, // min (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
diff --git a/docs/examples/java/databases/increment-document-attribute.md b/docs/examples/java/databases/increment-document-attribute.md
new file mode 100644
index 0000000..94ffa9d
--- /dev/null
+++ b/docs/examples/java/databases/increment-document-attribute.md
@@ -0,0 +1,27 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Databases;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Databases databases = new Databases(client);
+
+databases.incrementDocumentAttribute(
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ "", // attribute
+ 0, // value (optional)
+ 0, // max (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md
index 0bafb31..849a636 100644
--- a/docs/examples/kotlin/databases/create-document.md
+++ b/docs/examples/kotlin/databases/create-document.md
@@ -4,9 +4,7 @@ import io.appwrite.services.Databases
val client = Client(context)
.setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
- .setSession("") // The user session to authenticate with
- .setKey("") //
- .setJWT("") // Your secret JSON Web Token
+ .setProject("") // Your project ID
val databases = Databases(client)
diff --git a/docs/examples/kotlin/databases/decrement-document-attribute.md b/docs/examples/kotlin/databases/decrement-document-attribute.md
new file mode 100644
index 0000000..c500fa8
--- /dev/null
+++ b/docs/examples/kotlin/databases/decrement-document-attribute.md
@@ -0,0 +1,18 @@
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Databases
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val databases = Databases(client)
+
+val result = databases.decrementDocumentAttribute(
+ databaseId = "",
+ collectionId = "",
+ documentId = "",
+ attribute = "",
+ value = 0, // (optional)
+ min = 0, // (optional)
+)
\ No newline at end of file
diff --git a/docs/examples/kotlin/databases/increment-document-attribute.md b/docs/examples/kotlin/databases/increment-document-attribute.md
new file mode 100644
index 0000000..0ae6b02
--- /dev/null
+++ b/docs/examples/kotlin/databases/increment-document-attribute.md
@@ -0,0 +1,18 @@
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Databases
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val databases = Databases(client)
+
+val result = databases.incrementDocumentAttribute(
+ databaseId = "",
+ collectionId = "",
+ documentId = "",
+ attribute = "",
+ value = 0, // (optional)
+ max = 0, // (optional)
+)
\ No newline at end of file
diff --git a/library/src/main/java/io/appwrite/Client.kt b/library/src/main/java/io/appwrite/Client.kt
index 5f12d7f..bf0480f 100644
--- a/library/src/main/java/io/appwrite/Client.kt
+++ b/library/src/main/java/io/appwrite/Client.kt
@@ -87,7 +87,7 @@ class Client @JvmOverloads constructor(
"x-sdk-name" to "Android",
"x-sdk-platform" to "client",
"x-sdk-language" to "android",
- "x-sdk-version" to "8.1.0",
+ "x-sdk-version" to "8.2.0",
"x-appwrite-response-format" to "1.7.0"
)
config = mutableMapOf()
diff --git a/library/src/main/java/io/appwrite/enums/ImageFormat.kt b/library/src/main/java/io/appwrite/enums/ImageFormat.kt
index c3dea06..8e74806 100644
--- a/library/src/main/java/io/appwrite/enums/ImageFormat.kt
+++ b/library/src/main/java/io/appwrite/enums/ImageFormat.kt
@@ -14,7 +14,9 @@ enum class ImageFormat(val value: String) {
@SerializedName("heic")
HEIC("heic"),
@SerializedName("avif")
- AVIF("avif");
+ AVIF("avif"),
+ @SerializedName("gif")
+ GIF("gif");
override fun toString() = value
}
\ No newline at end of file
diff --git a/library/src/main/java/io/appwrite/models/Document.kt b/library/src/main/java/io/appwrite/models/Document.kt
index 01204de..c0dfe61 100644
--- a/library/src/main/java/io/appwrite/models/Document.kt
+++ b/library/src/main/java/io/appwrite/models/Document.kt
@@ -13,6 +13,12 @@ data class Document(
@SerializedName("\$id")
val id: String,
+ /**
+ * Document automatically incrementing ID.
+ */
+ @SerializedName("\$sequence")
+ val sequence: Long,
+
/**
* Collection ID.
*/
@@ -51,6 +57,7 @@ data class Document(
) {
fun toMap(): Map = mapOf(
"\$id" to id as Any,
+ "\$sequence" to sequence as Any,
"\$collectionId" to collectionId as Any,
"\$databaseId" to databaseId as Any,
"\$createdAt" to createdAt as Any,
@@ -62,6 +69,7 @@ data class Document(
companion object {
operator fun invoke(
id: String,
+ sequence: Long,
collectionId: String,
databaseId: String,
createdAt: String,
@@ -70,6 +78,7 @@ data class Document(
data: Map
) = Document