diff --git a/CHANGELOG.md b/CHANGELOG.md
index ed8c1769..6b22d7e5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,10 +1,16 @@
# Change Log
+## 25.1.0
+
+* Added: Email metadata fields to `User` (`emailCanonical`, `emailIsFree`, `emailIsDisposable`, `emailIsCorporate`, `emailIsCanonical`).
+* Added: `Membership.userAccessedAt` field.
+* Updated: Requests now send an explicit `accept` header matching each endpoint's response type.
+
## 25.0.0
* Breaking: `avatars.getScreenshot` `theme` parameter now uses the `BrowserTheme` enum
* Breaking: Removed generic type parameters from `presences` service methods
-* Added: `BrowserTheme` enum
+* Replaced: `BrowserTheme` enum
* Updated: `Presence` model is now concrete and adds a `metadata` field
## 24.1.1
diff --git a/README.md b/README.md
index fadaf5f7..74bd3178 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:
```groovy
-implementation("io.appwrite:sdk-for-android:25.0.0")
+implementation("io.appwrite:sdk-for-android:25.1.0")
```
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
io.appwrite
sdk-for-android
- 25.0.0
+ 25.1.0
```
diff --git a/docs/examples/java/account/update-password.md b/docs/examples/java/account/update-password.md
index 075a869b..93562d57 100644
--- a/docs/examples/java/account/update-password.md
+++ b/docs/examples/java/account/update-password.md
@@ -11,7 +11,7 @@ Account account = new Account(client);
account.updatePassword(
"", // password
- "password", // oldPassword (optional)
+ "", // oldPassword (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/kotlin/account/update-password.md b/docs/examples/kotlin/account/update-password.md
index ce9ae904..dd8a06b8 100644
--- a/docs/examples/kotlin/account/update-password.md
+++ b/docs/examples/kotlin/account/update-password.md
@@ -11,6 +11,6 @@ val account = Account(client)
val result = account.updatePassword(
password = "",
- oldPassword = "password", // (optional)
+ oldPassword = "", // (optional)
)
```
diff --git a/library/src/main/java/io/appwrite/Client.kt b/library/src/main/java/io/appwrite/Client.kt
index f43ec95a..f51628d0 100644
--- a/library/src/main/java/io/appwrite/Client.kt
+++ b/library/src/main/java/io/appwrite/Client.kt
@@ -94,7 +94,7 @@ class Client @JvmOverloads constructor(
"x-sdk-name" to "Android",
"x-sdk-platform" to "client",
"x-sdk-language" to "android",
- "x-sdk-version" to "25.0.0",
+ "x-sdk-version" to "25.1.0",
"x-appwrite-response-format" to "1.9.5"
)
config = mutableMapOf()
@@ -113,7 +113,6 @@ class Client @JvmOverloads constructor(
*/
fun setProject(value: String): Client {
config["project"] = value
- addHeader("x-appwrite-project", value)
return this
}
@@ -366,7 +365,10 @@ class Client @JvmOverloads constructor(
suspend fun ping(): String {
val apiPath = "/ping"
val apiParams = mutableMapOf()
- val apiHeaders = mutableMapOf("content-type" to "application/json")
+ val apiHeaders = mutableMapOf(
+ "content-type" to "application/json",
+ "X-Appwrite-Project" to config["project"].orEmpty(),
+ )
return call(
"GET",
diff --git a/library/src/main/java/io/appwrite/models/Membership.kt b/library/src/main/java/io/appwrite/models/Membership.kt
index eb13be3b..afcbdf77 100644
--- a/library/src/main/java/io/appwrite/models/Membership.kt
+++ b/library/src/main/java/io/appwrite/models/Membership.kt
@@ -85,6 +85,12 @@ data class Membership(
@SerializedName("mfa")
val mfa: Boolean,
+ /**
+ * Most recent access date in ISO 8601 format. Show this attribute by toggling membership privacy in the Console.
+ */
+ @SerializedName("userAccessedAt")
+ val userAccessedAt: String,
+
/**
* User list of roles
*/
@@ -106,6 +112,7 @@ data class Membership(
"joined" to joined as Any,
"confirm" to confirm as Any,
"mfa" to mfa as Any,
+ "userAccessedAt" to userAccessedAt as Any,
"roles" to roles as Any,
)
@@ -128,6 +135,7 @@ data class Membership(
joined = map["joined"] as String,
confirm = map["confirm"] as Boolean,
mfa = map["mfa"] as Boolean,
+ userAccessedAt = map["userAccessedAt"] as String,
roles = map["roles"] as List,
)
}
diff --git a/library/src/main/java/io/appwrite/models/User.kt b/library/src/main/java/io/appwrite/models/User.kt
index a76d61f0..ff66ba72 100644
--- a/library/src/main/java/io/appwrite/models/User.kt
+++ b/library/src/main/java/io/appwrite/models/User.kt
@@ -91,6 +91,36 @@ data class User(
@SerializedName("emailVerification")
val emailVerification: Boolean,
+ /**
+ * Canonical form of the user email address.
+ */
+ @SerializedName("emailCanonical")
+ var emailCanonical: String?,
+
+ /**
+ * Whether the user email is from a free email provider.
+ */
+ @SerializedName("emailIsFree")
+ var emailIsFree: Boolean?,
+
+ /**
+ * Whether the user email is from a disposable email provider.
+ */
+ @SerializedName("emailIsDisposable")
+ var emailIsDisposable: Boolean?,
+
+ /**
+ * Whether the user email is from a corporate domain.
+ */
+ @SerializedName("emailIsCorporate")
+ var emailIsCorporate: Boolean?,
+
+ /**
+ * Whether the user email is in its canonical form.
+ */
+ @SerializedName("emailIsCanonical")
+ var emailIsCanonical: Boolean?,
+
/**
* Phone verification status.
*/
@@ -149,6 +179,11 @@ data class User(
"email" to email as Any,
"phone" to phone as Any,
"emailVerification" to emailVerification as Any,
+ "emailCanonical" to emailCanonical as Any,
+ "emailIsFree" to emailIsFree as Any,
+ "emailIsDisposable" to emailIsDisposable as Any,
+ "emailIsCorporate" to emailIsCorporate as Any,
+ "emailIsCanonical" to emailIsCanonical as Any,
"phoneVerification" to phoneVerification as Any,
"mfa" to mfa as Any,
"prefs" to prefs.toMap() as Any,
@@ -174,6 +209,11 @@ data class User(
email: String,
phone: String,
emailVerification: Boolean,
+ emailCanonical: String?,
+ emailIsFree: Boolean?,
+ emailIsDisposable: Boolean?,
+ emailIsCorporate: Boolean?,
+ emailIsCanonical: Boolean?,
phoneVerification: Boolean,
mfa: Boolean,
prefs: Preferences