diff --git a/README.md b/README.md
index bddbe28..5786e19 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square)
![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square)
-![Version](https://img.shields.io/badge/api%20version-1.6.0-blue.svg?style=flat-square)
+![Version](https://img.shields.io/badge/api%20version-1.6.1-blue.svg?style=flat-square)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
@@ -39,7 +39,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:
```groovy
-implementation("io.appwrite:sdk-for-kotlin:6.1.0")
+implementation("io.appwrite:sdk-for-kotlin:6.2.0")
```
### Maven
@@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file:
io.appwrite
sdk-for-kotlin
- 6.1.0
+ 6.2.0
```
diff --git a/docs/examples/java/databases/update-string-attribute.md b/docs/examples/java/databases/update-string-attribute.md
index 75be9e0..2d69006 100644
--- a/docs/examples/java/databases/update-string-attribute.md
+++ b/docs/examples/java/databases/update-string-attribute.md
@@ -15,7 +15,7 @@ databases.updateStringAttribute(
"", // key
false, // required
"", // default
- 0, // size (optional)
+ 1, // size (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/messaging/create-push.md b/docs/examples/java/messaging/create-push.md
index 934f1fa..56c7a60 100644
--- a/docs/examples/java/messaging/create-push.md
+++ b/docs/examples/java/messaging/create-push.md
@@ -11,8 +11,8 @@ Messaging messaging = new Messaging(client);
messaging.createPush(
"", // messageId
- "", // title
- "", // body
+ "", // title (optional)
+ "", // body (optional)
listOf(), // topics (optional)
listOf(), // users (optional)
listOf(), // targets (optional)
@@ -23,9 +23,12 @@ messaging.createPush(
"", // sound (optional)
"", // color (optional)
"", // tag (optional)
- "", // badge (optional)
+ 0, // badge (optional)
false, // draft (optional)
"", // scheduledAt (optional)
+ false, // contentAvailable (optional)
+ false, // critical (optional)
+ MessagePriority.NORMAL, // priority (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/messaging/update-push.md b/docs/examples/java/messaging/update-push.md
index ef04203..bb8c3c8 100644
--- a/docs/examples/java/messaging/update-push.md
+++ b/docs/examples/java/messaging/update-push.md
@@ -26,6 +26,9 @@ messaging.updatePush(
0, // badge (optional)
false, // draft (optional)
"", // scheduledAt (optional)
+ false, // contentAvailable (optional)
+ false, // critical (optional)
+ MessagePriority.NORMAL, // priority (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/kotlin/databases/update-string-attribute.md b/docs/examples/kotlin/databases/update-string-attribute.md
index a37d456..32e17be 100644
--- a/docs/examples/kotlin/databases/update-string-attribute.md
+++ b/docs/examples/kotlin/databases/update-string-attribute.md
@@ -15,6 +15,6 @@ val response = databases.updateStringAttribute(
key = "",
required = false,
default = "",
- size = 0, // optional
+ size = 1, // optional
newKey = "" // optional
)
diff --git a/docs/examples/kotlin/messaging/create-push.md b/docs/examples/kotlin/messaging/create-push.md
index 6a95f63..f92a49d 100644
--- a/docs/examples/kotlin/messaging/create-push.md
+++ b/docs/examples/kotlin/messaging/create-push.md
@@ -11,8 +11,8 @@ val messaging = Messaging(client)
val response = messaging.createPush(
messageId = "",
- title = "",
- body = "",
+ title = "", // optional
+ body = "", // optional
topics = listOf(), // optional
users = listOf(), // optional
targets = listOf(), // optional
@@ -23,7 +23,10 @@ val response = messaging.createPush(
sound = "", // optional
color = "", // optional
tag = "", // optional
- badge = "", // optional
+ badge = 0, // optional
draft = false, // optional
- scheduledAt = "" // optional
+ scheduledAt = "", // optional
+ contentAvailable = false, // optional
+ critical = false, // optional
+ priority = "normal" // optional
)
diff --git a/docs/examples/kotlin/messaging/update-push.md b/docs/examples/kotlin/messaging/update-push.md
index d91694e..0ba72c4 100644
--- a/docs/examples/kotlin/messaging/update-push.md
+++ b/docs/examples/kotlin/messaging/update-push.md
@@ -25,5 +25,8 @@ val response = messaging.updatePush(
tag = "", // optional
badge = 0, // optional
draft = false, // optional
- scheduledAt = "" // optional
+ scheduledAt = "", // optional
+ contentAvailable = false, // optional
+ critical = false, // optional
+ priority = "normal" // optional
)
diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt
index 8c18320..c8ff8d9 100644
--- a/src/main/kotlin/io/appwrite/Client.kt
+++ b/src/main/kotlin/io/appwrite/Client.kt
@@ -57,11 +57,11 @@ class Client @JvmOverloads constructor(
init {
headers = mutableMapOf(
"content-type" to "application/json",
- "user-agent" to "AppwriteKotlinSDK/6.1.0 ${System.getProperty("http.agent")}",
+ "user-agent" to "AppwriteKotlinSDK/6.2.0 ${System.getProperty("http.agent")}",
"x-sdk-name" to "Kotlin",
"x-sdk-platform" to "server",
"x-sdk-language" to "kotlin",
- "x-sdk-version" to "6.1.0",
+ "x-sdk-version" to "6.2.0",
"x-appwrite-response-format" to "1.6.0",
)
diff --git a/src/main/kotlin/io/appwrite/enums/ImageFormat.kt b/src/main/kotlin/io/appwrite/enums/ImageFormat.kt
index c6a3b0f..25eea90 100644
--- a/src/main/kotlin/io/appwrite/enums/ImageFormat.kt
+++ b/src/main/kotlin/io/appwrite/enums/ImageFormat.kt
@@ -12,7 +12,9 @@ enum class ImageFormat(val value: String) {
@SerializedName("png")
PNG("png"),
@SerializedName("webp")
- WEBP("webp");
+ WEBP("webp"),
+ @SerializedName("avif")
+ AVIF("avif");
override fun toString() = value
}
\ No newline at end of file
diff --git a/src/main/kotlin/io/appwrite/enums/MessagePriority.kt b/src/main/kotlin/io/appwrite/enums/MessagePriority.kt
new file mode 100644
index 0000000..6218c1e
--- /dev/null
+++ b/src/main/kotlin/io/appwrite/enums/MessagePriority.kt
@@ -0,0 +1,12 @@
+package io.appwrite.enums
+
+import com.google.gson.annotations.SerializedName
+
+enum class MessagePriority(val value: String) {
+ @SerializedName("normal")
+ NORMAL("normal"),
+ @SerializedName("high")
+ HIGH("high");
+
+ override fun toString() = value
+}
\ No newline at end of file
diff --git a/src/main/kotlin/io/appwrite/enums/Runtime.kt b/src/main/kotlin/io/appwrite/enums/Runtime.kt
index 02691dc..c19f52b 100644
--- a/src/main/kotlin/io/appwrite/enums/Runtime.kt
+++ b/src/main/kotlin/io/appwrite/enums/Runtime.kt
@@ -15,6 +15,8 @@ enum class Runtime(val value: String) {
NODE_20_0("node-20.0"),
@SerializedName("node-21.0")
NODE_21_0("node-21.0"),
+ @SerializedName("node-22")
+ NODE_22("node-22"),
@SerializedName("php-8.0")
PHP_8_0("php-8.0"),
@SerializedName("php-8.1")
@@ -43,8 +45,18 @@ enum class Runtime(val value: String) {
PYTHON_3_12("python-3.12"),
@SerializedName("python-ml-3.11")
PYTHON_ML_3_11("python-ml-3.11"),
+ @SerializedName("deno-1.21")
+ DENO_1_21("deno-1.21"),
+ @SerializedName("deno-1.24")
+ DENO_1_24("deno-1.24"),
+ @SerializedName("deno-1.35")
+ DENO_1_35("deno-1.35"),
@SerializedName("deno-1.40")
DENO_1_40("deno-1.40"),
+ @SerializedName("deno-1.46")
+ DENO_1_46("deno-1.46"),
+ @SerializedName("deno-2.0")
+ DENO_2_0("deno-2.0"),
@SerializedName("dart-2.15")
DART_2_15("dart-2.15"),
@SerializedName("dart-2.16")
@@ -59,12 +71,14 @@ enum class Runtime(val value: String) {
DART_3_1("dart-3.1"),
@SerializedName("dart-3.3")
DART_3_3("dart-3.3"),
- @SerializedName("dotnet-3.1")
- DOTNET_3_1("dotnet-3.1"),
+ @SerializedName("dart-3.5")
+ DART_3_5("dart-3.5"),
@SerializedName("dotnet-6.0")
DOTNET_6_0("dotnet-6.0"),
@SerializedName("dotnet-7.0")
DOTNET_7_0("dotnet-7.0"),
+ @SerializedName("dotnet-8.0")
+ DOTNET_8_0("dotnet-8.0"),
@SerializedName("java-8.0")
JAVA_8_0("java-8.0"),
@SerializedName("java-11.0")
@@ -75,26 +89,38 @@ enum class Runtime(val value: String) {
JAVA_18_0("java-18.0"),
@SerializedName("java-21.0")
JAVA_21_0("java-21.0"),
+ @SerializedName("java-22")
+ JAVA_22("java-22"),
@SerializedName("swift-5.5")
SWIFT_5_5("swift-5.5"),
@SerializedName("swift-5.8")
SWIFT_5_8("swift-5.8"),
@SerializedName("swift-5.9")
SWIFT_5_9("swift-5.9"),
+ @SerializedName("swift-5.10")
+ SWIFT_5_10("swift-5.10"),
@SerializedName("kotlin-1.6")
KOTLIN_1_6("kotlin-1.6"),
@SerializedName("kotlin-1.8")
KOTLIN_1_8("kotlin-1.8"),
@SerializedName("kotlin-1.9")
KOTLIN_1_9("kotlin-1.9"),
+ @SerializedName("kotlin-2.0")
+ KOTLIN_2_0("kotlin-2.0"),
@SerializedName("cpp-17")
CPP_17("cpp-17"),
@SerializedName("cpp-20")
CPP_20("cpp-20"),
@SerializedName("bun-1.0")
BUN_1_0("bun-1.0"),
+ @SerializedName("bun-1.1")
+ BUN_1_1("bun-1.1"),
@SerializedName("go-1.23")
- GO_1_23("go-1.23");
+ GO_1_23("go-1.23"),
+ @SerializedName("static-1")
+ STATIC_1("static-1"),
+ @SerializedName("flutter-3.24")
+ FLUTTER_3_24("flutter-3.24");
override fun toString() = value
}
\ No newline at end of file
diff --git a/src/main/kotlin/io/appwrite/models/AttributeBoolean.kt b/src/main/kotlin/io/appwrite/models/AttributeBoolean.kt
index 55962c4..2f8477c 100644
--- a/src/main/kotlin/io/appwrite/models/AttributeBoolean.kt
+++ b/src/main/kotlin/io/appwrite/models/AttributeBoolean.kt
@@ -43,6 +43,18 @@ data class AttributeBoolean(
@SerializedName("array")
var array: Boolean?,
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ @SerializedName("\$createdAt")
+ val createdAt: String,
+
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ @SerializedName("\$updatedAt")
+ val updatedAt: String,
+
/**
* Default value for attribute when not provided. Cannot be set when attribute is required.
*/
@@ -57,6 +69,8 @@ data class AttributeBoolean(
"error" to error as Any,
"required" to required as Any,
"array" to array as Any,
+ "\$createdAt" to createdAt as Any,
+ "\$updatedAt" to updatedAt as Any,
"default" to default as Any,
)
@@ -72,6 +86,8 @@ data class AttributeBoolean(
error = map["error"] as String,
required = map["required"] as Boolean,
array = map["array"] as? Boolean?,
+ createdAt = map["\$createdAt"] as String,
+ updatedAt = map["\$updatedAt"] as String,
default = map["default"] as? Boolean?,
)
}
diff --git a/src/main/kotlin/io/appwrite/models/AttributeDatetime.kt b/src/main/kotlin/io/appwrite/models/AttributeDatetime.kt
index 0a54b9d..8ae71ef 100644
--- a/src/main/kotlin/io/appwrite/models/AttributeDatetime.kt
+++ b/src/main/kotlin/io/appwrite/models/AttributeDatetime.kt
@@ -43,6 +43,18 @@ data class AttributeDatetime(
@SerializedName("array")
var array: Boolean?,
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ @SerializedName("\$createdAt")
+ val createdAt: String,
+
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ @SerializedName("\$updatedAt")
+ val updatedAt: String,
+
/**
* ISO 8601 format.
*/
@@ -63,6 +75,8 @@ data class AttributeDatetime(
"error" to error as Any,
"required" to required as Any,
"array" to array as Any,
+ "\$createdAt" to createdAt as Any,
+ "\$updatedAt" to updatedAt as Any,
"format" to format as Any,
"default" to default as Any,
)
@@ -79,6 +93,8 @@ data class AttributeDatetime(
error = map["error"] as String,
required = map["required"] as Boolean,
array = map["array"] as? Boolean?,
+ createdAt = map["\$createdAt"] as String,
+ updatedAt = map["\$updatedAt"] as String,
format = map["format"] as String,
default = map["default"] as? String?,
)
diff --git a/src/main/kotlin/io/appwrite/models/AttributeEmail.kt b/src/main/kotlin/io/appwrite/models/AttributeEmail.kt
index b7b0fbf..87bd1b3 100644
--- a/src/main/kotlin/io/appwrite/models/AttributeEmail.kt
+++ b/src/main/kotlin/io/appwrite/models/AttributeEmail.kt
@@ -43,6 +43,18 @@ data class AttributeEmail(
@SerializedName("array")
var array: Boolean?,
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ @SerializedName("\$createdAt")
+ val createdAt: String,
+
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ @SerializedName("\$updatedAt")
+ val updatedAt: String,
+
/**
* String format.
*/
@@ -63,6 +75,8 @@ data class AttributeEmail(
"error" to error as Any,
"required" to required as Any,
"array" to array as Any,
+ "\$createdAt" to createdAt as Any,
+ "\$updatedAt" to updatedAt as Any,
"format" to format as Any,
"default" to default as Any,
)
@@ -79,6 +93,8 @@ data class AttributeEmail(
error = map["error"] as String,
required = map["required"] as Boolean,
array = map["array"] as? Boolean?,
+ createdAt = map["\$createdAt"] as String,
+ updatedAt = map["\$updatedAt"] as String,
format = map["format"] as String,
default = map["default"] as? String?,
)
diff --git a/src/main/kotlin/io/appwrite/models/AttributeEnum.kt b/src/main/kotlin/io/appwrite/models/AttributeEnum.kt
index db002d1..c8af621 100644
--- a/src/main/kotlin/io/appwrite/models/AttributeEnum.kt
+++ b/src/main/kotlin/io/appwrite/models/AttributeEnum.kt
@@ -43,11 +43,23 @@ data class AttributeEnum(
@SerializedName("array")
var array: Boolean?,
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ @SerializedName("\$createdAt")
+ val createdAt: String,
+
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ @SerializedName("\$updatedAt")
+ val updatedAt: String,
+
/**
* Array of elements in enumerated type.
*/
@SerializedName("elements")
- val elements: List,
+ val elements: List,
/**
* String format.
@@ -69,6 +81,8 @@ data class AttributeEnum(
"error" to error as Any,
"required" to required as Any,
"array" to array as Any,
+ "\$createdAt" to createdAt as Any,
+ "\$updatedAt" to updatedAt as Any,
"elements" to elements as Any,
"format" to format as Any,
"default" to default as Any,
@@ -86,7 +100,9 @@ data class AttributeEnum(
error = map["error"] as String,
required = map["required"] as Boolean,
array = map["array"] as? Boolean?,
- elements = map["elements"] as List,
+ createdAt = map["\$createdAt"] as String,
+ updatedAt = map["\$updatedAt"] as String,
+ elements = map["elements"] as List,
format = map["format"] as String,
default = map["default"] as? String?,
)
diff --git a/src/main/kotlin/io/appwrite/models/AttributeFloat.kt b/src/main/kotlin/io/appwrite/models/AttributeFloat.kt
index 7c6250e..0e8d549 100644
--- a/src/main/kotlin/io/appwrite/models/AttributeFloat.kt
+++ b/src/main/kotlin/io/appwrite/models/AttributeFloat.kt
@@ -43,6 +43,18 @@ data class AttributeFloat(
@SerializedName("array")
var array: Boolean?,
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ @SerializedName("\$createdAt")
+ val createdAt: String,
+
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ @SerializedName("\$updatedAt")
+ val updatedAt: String,
+
/**
* Minimum value to enforce for new documents.
*/
@@ -69,6 +81,8 @@ data class AttributeFloat(
"error" to error as Any,
"required" to required as Any,
"array" to array as Any,
+ "\$createdAt" to createdAt as Any,
+ "\$updatedAt" to updatedAt as Any,
"min" to min as Any,
"max" to max as Any,
"default" to default as Any,
@@ -86,6 +100,8 @@ data class AttributeFloat(
error = map["error"] as String,
required = map["required"] as Boolean,
array = map["array"] as? Boolean?,
+ createdAt = map["\$createdAt"] as String,
+ updatedAt = map["\$updatedAt"] as String,
min = (map["min"] as? Number)?.toDouble(),
max = (map["max"] as? Number)?.toDouble(),
default = (map["default"] as? Number)?.toDouble(),
diff --git a/src/main/kotlin/io/appwrite/models/AttributeInteger.kt b/src/main/kotlin/io/appwrite/models/AttributeInteger.kt
index eb35f58..327bd9f 100644
--- a/src/main/kotlin/io/appwrite/models/AttributeInteger.kt
+++ b/src/main/kotlin/io/appwrite/models/AttributeInteger.kt
@@ -43,6 +43,18 @@ data class AttributeInteger(
@SerializedName("array")
var array: Boolean?,
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ @SerializedName("\$createdAt")
+ val createdAt: String,
+
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ @SerializedName("\$updatedAt")
+ val updatedAt: String,
+
/**
* Minimum value to enforce for new documents.
*/
@@ -69,6 +81,8 @@ data class AttributeInteger(
"error" to error as Any,
"required" to required as Any,
"array" to array as Any,
+ "\$createdAt" to createdAt as Any,
+ "\$updatedAt" to updatedAt as Any,
"min" to min as Any,
"max" to max as Any,
"default" to default as Any,
@@ -86,6 +100,8 @@ data class AttributeInteger(
error = map["error"] as String,
required = map["required"] as Boolean,
array = map["array"] as? Boolean?,
+ createdAt = map["\$createdAt"] as String,
+ updatedAt = map["\$updatedAt"] as String,
min = (map["min"] as? Number)?.toLong(),
max = (map["max"] as? Number)?.toLong(),
default = (map["default"] as? Number)?.toLong(),
diff --git a/src/main/kotlin/io/appwrite/models/AttributeIp.kt b/src/main/kotlin/io/appwrite/models/AttributeIp.kt
index 0deab91..b366ff2 100644
--- a/src/main/kotlin/io/appwrite/models/AttributeIp.kt
+++ b/src/main/kotlin/io/appwrite/models/AttributeIp.kt
@@ -43,6 +43,18 @@ data class AttributeIp(
@SerializedName("array")
var array: Boolean?,
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ @SerializedName("\$createdAt")
+ val createdAt: String,
+
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ @SerializedName("\$updatedAt")
+ val updatedAt: String,
+
/**
* String format.
*/
@@ -63,6 +75,8 @@ data class AttributeIp(
"error" to error as Any,
"required" to required as Any,
"array" to array as Any,
+ "\$createdAt" to createdAt as Any,
+ "\$updatedAt" to updatedAt as Any,
"format" to format as Any,
"default" to default as Any,
)
@@ -79,6 +93,8 @@ data class AttributeIp(
error = map["error"] as String,
required = map["required"] as Boolean,
array = map["array"] as? Boolean?,
+ createdAt = map["\$createdAt"] as String,
+ updatedAt = map["\$updatedAt"] as String,
format = map["format"] as String,
default = map["default"] as? String?,
)
diff --git a/src/main/kotlin/io/appwrite/models/AttributeRelationship.kt b/src/main/kotlin/io/appwrite/models/AttributeRelationship.kt
index e65f577..a03def7 100644
--- a/src/main/kotlin/io/appwrite/models/AttributeRelationship.kt
+++ b/src/main/kotlin/io/appwrite/models/AttributeRelationship.kt
@@ -43,6 +43,18 @@ data class AttributeRelationship(
@SerializedName("array")
var array: Boolean?,
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ @SerializedName("\$createdAt")
+ val createdAt: String,
+
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ @SerializedName("\$updatedAt")
+ val updatedAt: String,
+
/**
* The ID of the related collection.
*/
@@ -87,6 +99,8 @@ data class AttributeRelationship(
"error" to error as Any,
"required" to required as Any,
"array" to array as Any,
+ "\$createdAt" to createdAt as Any,
+ "\$updatedAt" to updatedAt as Any,
"relatedCollection" to relatedCollection as Any,
"relationType" to relationType as Any,
"twoWay" to twoWay as Any,
@@ -107,6 +121,8 @@ data class AttributeRelationship(
error = map["error"] as String,
required = map["required"] as Boolean,
array = map["array"] as? Boolean?,
+ createdAt = map["\$createdAt"] as String,
+ updatedAt = map["\$updatedAt"] as String,
relatedCollection = map["relatedCollection"] as String,
relationType = map["relationType"] as String,
twoWay = map["twoWay"] as Boolean,
diff --git a/src/main/kotlin/io/appwrite/models/AttributeString.kt b/src/main/kotlin/io/appwrite/models/AttributeString.kt
index 898c2b3..efae2ba 100644
--- a/src/main/kotlin/io/appwrite/models/AttributeString.kt
+++ b/src/main/kotlin/io/appwrite/models/AttributeString.kt
@@ -43,6 +43,18 @@ data class AttributeString(
@SerializedName("array")
var array: Boolean?,
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ @SerializedName("\$createdAt")
+ val createdAt: String,
+
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ @SerializedName("\$updatedAt")
+ val updatedAt: String,
+
/**
* Attribute size.
*/
@@ -63,6 +75,8 @@ data class AttributeString(
"error" to error as Any,
"required" to required as Any,
"array" to array as Any,
+ "\$createdAt" to createdAt as Any,
+ "\$updatedAt" to updatedAt as Any,
"size" to size as Any,
"default" to default as Any,
)
@@ -79,6 +93,8 @@ data class AttributeString(
error = map["error"] as String,
required = map["required"] as Boolean,
array = map["array"] as? Boolean?,
+ createdAt = map["\$createdAt"] as String,
+ updatedAt = map["\$updatedAt"] as String,
size = (map["size"] as Number).toLong(),
default = map["default"] as? String?,
)
diff --git a/src/main/kotlin/io/appwrite/models/AttributeUrl.kt b/src/main/kotlin/io/appwrite/models/AttributeUrl.kt
index 53b5434..d29ba7e 100644
--- a/src/main/kotlin/io/appwrite/models/AttributeUrl.kt
+++ b/src/main/kotlin/io/appwrite/models/AttributeUrl.kt
@@ -43,6 +43,18 @@ data class AttributeUrl(
@SerializedName("array")
var array: Boolean?,
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ @SerializedName("\$createdAt")
+ val createdAt: String,
+
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ @SerializedName("\$updatedAt")
+ val updatedAt: String,
+
/**
* String format.
*/
@@ -63,6 +75,8 @@ data class AttributeUrl(
"error" to error as Any,
"required" to required as Any,
"array" to array as Any,
+ "\$createdAt" to createdAt as Any,
+ "\$updatedAt" to updatedAt as Any,
"format" to format as Any,
"default" to default as Any,
)
@@ -79,6 +93,8 @@ data class AttributeUrl(
error = map["error"] as String,
required = map["required"] as Boolean,
array = map["array"] as? Boolean?,
+ createdAt = map["\$createdAt"] as String,
+ updatedAt = map["\$updatedAt"] as String,
format = map["format"] as String,
default = map["default"] as? String?,
)
diff --git a/src/main/kotlin/io/appwrite/models/Bucket.kt b/src/main/kotlin/io/appwrite/models/Bucket.kt
index 25891cd..9faeb35 100644
--- a/src/main/kotlin/io/appwrite/models/Bucket.kt
+++ b/src/main/kotlin/io/appwrite/models/Bucket.kt
@@ -29,7 +29,7 @@ data class Bucket(
* Bucket permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
*/
@SerializedName("\$permissions")
- val permissions: List,
+ val permissions: List,
/**
* Whether file-level security is enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).
@@ -59,7 +59,7 @@ data class Bucket(
* Allowed file extensions.
*/
@SerializedName("allowedFileExtensions")
- val allowedFileExtensions: List,
+ val allowedFileExtensions: List,
/**
* Compression algorithm choosen for compression. Will be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd).
@@ -104,12 +104,12 @@ data class Bucket(
id = map["\$id"] as String,
createdAt = map["\$createdAt"] as String,
updatedAt = map["\$updatedAt"] as String,
- permissions = map["\$permissions"] as List,
+ permissions = map["\$permissions"] as List,
fileSecurity = map["fileSecurity"] as Boolean,
name = map["name"] as String,
enabled = map["enabled"] as Boolean,
maximumFileSize = (map["maximumFileSize"] as Number).toLong(),
- allowedFileExtensions = map["allowedFileExtensions"] as List,
+ allowedFileExtensions = map["allowedFileExtensions"] as List,
compression = map["compression"] as String,
encryption = map["encryption"] as Boolean,
antivirus = map["antivirus"] as Boolean,
diff --git a/src/main/kotlin/io/appwrite/models/Collection.kt b/src/main/kotlin/io/appwrite/models/Collection.kt
index bf4699d..56b7b41 100644
--- a/src/main/kotlin/io/appwrite/models/Collection.kt
+++ b/src/main/kotlin/io/appwrite/models/Collection.kt
@@ -29,7 +29,7 @@ data class Collection(
* Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
*/
@SerializedName("\$permissions")
- val permissions: List,
+ val permissions: List,
/**
* Database ID.
@@ -90,7 +90,7 @@ data class Collection(
id = map["\$id"] as String,
createdAt = map["\$createdAt"] as String,
updatedAt = map["\$updatedAt"] as String,
- permissions = map["\$permissions"] as List,
+ permissions = map["\$permissions"] as List,
databaseId = map["databaseId"] as String,
name = map["name"] as String,
enabled = map["enabled"] as Boolean,
diff --git a/src/main/kotlin/io/appwrite/models/Document.kt b/src/main/kotlin/io/appwrite/models/Document.kt
index 5a7d371..01204de 100644
--- a/src/main/kotlin/io/appwrite/models/Document.kt
+++ b/src/main/kotlin/io/appwrite/models/Document.kt
@@ -41,7 +41,7 @@ data class Document(
* Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
*/
@SerializedName("\$permissions")
- val permissions: List,
+ val permissions: List,
/**
* Additional properties
@@ -66,7 +66,7 @@ data class Document(
databaseId: String,
createdAt: String,
updatedAt: String,
- permissions: List,
+ permissions: List,
data: Map
) = Document