diff --git a/CHANGELOG.md b/CHANGELOG.md
index 435676ce..bef16837 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,29 @@
# Change Log
+## 29.0.0
+
+* Breaking: minimum Android SDK raised from 23 to 24 (Android 7.0)
+* Added: `Push` service for MQTT push messages without FCM, plus `PushReceiver` for background handling
+* Added: `Topic` builder for push topics
+* Added: `endpointPush` and `pushClientId` on `Client`, with `setPushEndpoint` and `setPushClientId`
+* Added: `Apps` service for managing OAuth2 apps, keys, secrets and installations
+* Added: `Oauth2` service for using Appwrite as an OAuth2/OIDC provider
+* Added: `Avatars.updatePhoto` and `Avatars.deletePhoto`
+* Added: `duration` parameter to `Account.createEmailPasswordSession`
+* Added: `current` parameter to `Account.deleteSessions`
+* Added: `total` parameter to `Account.listSessions`, `Locale` list methods and `listTransactions`
+* Added: `WEBFLOW` value to `OAuthProvider`
+* Added: `toMap()` and `toJson()` on `Query` and `Operator`
+* Updated: SDK manifest merges Push permissions, a foreground service and a boot receiver into apps
+* Updated: narrower Netty keep rules, raising the R8 obfuscation and optimization scores Google Play reads
+* Updated: added the shaded `hivemq-mqtt-client` dependency for `Push`, with consumer R8 rules
+* Fixed: `Query` and `Operator` serialize correctly under R8 instead of producing `{}`
+* Fixed: Realtime delivers events and error messages under R8
+* Fixed: session cookies saved under R8 stay readable after an app update
+* Fixed: `ID.unique()` and `InputFile.fromFile` no longer crash on Android 7.x
+* Fixed: Kotlin and Java examples now compile
+* Fixed: unsubscribing one of several subscriptions on a topic stops its callback
+
## 28.0.0
* Breaking: removed `Account.listLogs` and the `Log`, `LogList` models
diff --git a/README.md b/README.md
index c8fb25f0..aeffd888 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:28.0.0")
+implementation("io.appwrite:sdk-for-android:29.0.0")
```
### Maven
@@ -49,11 +49,52 @@ Add this to your project's `pom.xml` file:
io.appwrite
sdk-for-android
- 28.0.0
+ 29.0.0
```
+### Code shrinking (R8)
+
+The SDK ships the R8 rules it needs, so no extra configuration is required. Your own classes
+that the SDK fills from JSON (the `nestedType` of documents, rows and preferences, and the
+`payloadType` of Realtime subscriptions) are read by Gson through reflection. Annotate them
+with `@Keep` so R8 keeps their fields:
+
+```kotlin
+@Keep
+data class Note(val title: String, val body: String)
+```
+
+### Push notifications
+
+#### Background delivery
+
+A subscription with `background = true` keeps delivering after the app is backgrounded, its
+process is killed, or the device restarts, until it is unsubscribed or `push.close()` is
+called (do this on sign-out). No service is kept running: a scheduled job and alarm wake the
+app every 15 to 60 seconds to reconnect, and the broker replays what was sent in between
+(`retry = true`). It reconnects with the credential saved at subscribe time, so use a session
+(`client.setSession(...)`), not a short-lived JWT.
+
+When no in-app callback is listening, each message is posted as a notification that opens
+your launch activity with `Push.EXTRA_TOPIC` and `Push.EXTRA_PAYLOAD` in its extras. Set its
+icon with ``
+in your ``. To handle these messages in code, subclass `PushReceiver` and declare
+it with the `io.appwrite.push.MESSAGE` action (see its docs).
+
+Doze delays the scheduled runs. They are more punctual when your app may schedule exact
+alarms (`SCHEDULE_EXACT_ALARM`) or is exempt from battery optimisation; both are your app's
+choice and subject to Google Play policy, and the SDK uses them when granted. For immediate delivery even after a kill and
+during Doze, call `push.setForeground(true)` from the foreground: it adds a foreground service
+with a quiet ongoing notification. If you never enable it, you can remove the service from
+your merged manifest, so the Play Console does not ask you to declare it:
+
+```xml
+
+
+```
+
## Getting Started
diff --git a/docs/examples/java/account/create-email-password-session.md b/docs/examples/java/account/create-email-password-session.md
index fa7d2523..9e254bd2 100644
--- a/docs/examples/java/account/create-email-password-session.md
+++ b/docs/examples/java/account/create-email-password-session.md
@@ -14,6 +14,7 @@ Account account = new Account(client);
account.createEmailPasswordSession(
"email@example.com", // email
"password", // password
+ 60L, // duration (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/account/create-id-token-session.md b/docs/examples/java/account/create-id-token-session.md
index 457b9fee..b7bd83fc 100644
--- a/docs/examples/java/account/create-id-token-session.md
+++ b/docs/examples/java/account/create-id-token-session.md
@@ -17,7 +17,7 @@ account.createIdTokenSession(
"", // idToken
"", // nonce (optional)
"", // accessToken (optional)
- 0, // accessTokenExpiry (optional)
+ 0L, // accessTokenExpiry (optional)
"", // name (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/account/create-jwt.md b/docs/examples/java/account/create-jwt.md
index f405d306..c41c5721 100644
--- a/docs/examples/java/account/create-jwt.md
+++ b/docs/examples/java/account/create-jwt.md
@@ -12,7 +12,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.createJWT(
- 0, // duration (optional)
+ 0L, // duration (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/account/delete-sessions.md b/docs/examples/java/account/delete-sessions.md
index 4b93d19a..e0dce6ca 100644
--- a/docs/examples/java/account/delete-sessions.md
+++ b/docs/examples/java/account/delete-sessions.md
@@ -11,12 +11,16 @@ Client client = new Client(context)
Account account = new Account(client);
-account.deleteSessions(new CoroutineCallback<>((result, error) -> {
- if (error != null) {
- error.printStackTrace();
- return;
- }
+account.deleteSessions(
+ false, // current (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
- Log.d("Appwrite", result.toString());
-}));
```
diff --git a/docs/examples/java/account/list-sessions.md b/docs/examples/java/account/list-sessions.md
index 9e52ea47..5ea50625 100644
--- a/docs/examples/java/account/list-sessions.md
+++ b/docs/examples/java/account/list-sessions.md
@@ -11,12 +11,16 @@ Client client = new Client(context)
Account account = new Account(client);
-account.listSessions(new CoroutineCallback<>((result, error) -> {
- if (error != null) {
- error.printStackTrace();
- return;
- }
+account.listSessions(
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
- Log.d("Appwrite", result.toString());
-}));
```
diff --git a/docs/examples/java/apps/create-installation-token.md b/docs/examples/java/apps/create-installation-token.md
new file mode 100644
index 00000000..e46fc2af
--- /dev/null
+++ b/docs/examples/java/apps/create-installation-token.md
@@ -0,0 +1,27 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.createInstallationToken(
+ "", // appId
+ "", // installationId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/create-key.md b/docs/examples/java/apps/create-key.md
new file mode 100644
index 00000000..729c98fd
--- /dev/null
+++ b/docs/examples/java/apps/create-key.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.createKey(
+ "", // appId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/create-secret.md b/docs/examples/java/apps/create-secret.md
new file mode 100644
index 00000000..8acb44ef
--- /dev/null
+++ b/docs/examples/java/apps/create-secret.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.createSecret(
+ "", // appId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/create.md b/docs/examples/java/apps/create.md
new file mode 100644
index 00000000..88694a94
--- /dev/null
+++ b/docs/examples/java/apps/create.md
@@ -0,0 +1,44 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.create(
+ "", // appId
+ "", // name
+ List.of(), // redirectUris
+ "", // description (optional)
+ "https://example.com", // clientUri (optional)
+ "https://example.com", // logoUri (optional)
+ "https://example.com", // privacyPolicyUrl (optional)
+ "https://example.com", // termsUrl (optional)
+ List.of(), // contacts (optional)
+ "", // tagline (optional)
+ List.of(), // tags (optional)
+ List.of(), // images (optional)
+ "https://example.com", // supportUrl (optional)
+ "https://example.com", // dataDeletionUrl (optional)
+ List.of(), // postLogoutRedirectUris (optional)
+ false, // enabled (optional)
+ "public", // type (optional)
+ false, // deviceFlow (optional)
+ "", // teamId (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/delete-installation.md b/docs/examples/java/apps/delete-installation.md
new file mode 100644
index 00000000..559ab654
--- /dev/null
+++ b/docs/examples/java/apps/delete-installation.md
@@ -0,0 +1,27 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.deleteInstallation(
+ "", // appId
+ "", // installationId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/delete-key.md b/docs/examples/java/apps/delete-key.md
new file mode 100644
index 00000000..312e0be0
--- /dev/null
+++ b/docs/examples/java/apps/delete-key.md
@@ -0,0 +1,27 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.deleteKey(
+ "", // appId
+ "", // keyId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/delete-secret.md b/docs/examples/java/apps/delete-secret.md
new file mode 100644
index 00000000..b21fc759
--- /dev/null
+++ b/docs/examples/java/apps/delete-secret.md
@@ -0,0 +1,27 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.deleteSecret(
+ "", // appId
+ "", // secretId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/delete-tokens.md b/docs/examples/java/apps/delete-tokens.md
new file mode 100644
index 00000000..f873873e
--- /dev/null
+++ b/docs/examples/java/apps/delete-tokens.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.deleteTokens(
+ "", // appId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/delete.md b/docs/examples/java/apps/delete.md
new file mode 100644
index 00000000..0c99520c
--- /dev/null
+++ b/docs/examples/java/apps/delete.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.delete(
+ "", // appId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/get-installation.md b/docs/examples/java/apps/get-installation.md
new file mode 100644
index 00000000..f8cf6b56
--- /dev/null
+++ b/docs/examples/java/apps/get-installation.md
@@ -0,0 +1,27 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.getInstallation(
+ "", // appId
+ "", // installationId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/get-key.md b/docs/examples/java/apps/get-key.md
new file mode 100644
index 00000000..729ccfa6
--- /dev/null
+++ b/docs/examples/java/apps/get-key.md
@@ -0,0 +1,27 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.getKey(
+ "", // appId
+ "", // keyId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/get-secret.md b/docs/examples/java/apps/get-secret.md
new file mode 100644
index 00000000..f4f3c68f
--- /dev/null
+++ b/docs/examples/java/apps/get-secret.md
@@ -0,0 +1,27 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.getSecret(
+ "", // appId
+ "", // secretId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/get.md b/docs/examples/java/apps/get.md
new file mode 100644
index 00000000..0b4c5378
--- /dev/null
+++ b/docs/examples/java/apps/get.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.get(
+ "", // appId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/list-installation-scopes.md b/docs/examples/java/apps/list-installation-scopes.md
new file mode 100644
index 00000000..c09da789
--- /dev/null
+++ b/docs/examples/java/apps/list-installation-scopes.md
@@ -0,0 +1,22 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.listInstallationScopes(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+}));
+```
diff --git a/docs/examples/java/apps/list-installations.md b/docs/examples/java/apps/list-installations.md
new file mode 100644
index 00000000..f83097e1
--- /dev/null
+++ b/docs/examples/java/apps/list-installations.md
@@ -0,0 +1,28 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.listInstallations(
+ "", // appId
+ List.of(), // queries (optional)
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/list-keys.md b/docs/examples/java/apps/list-keys.md
new file mode 100644
index 00000000..7a872751
--- /dev/null
+++ b/docs/examples/java/apps/list-keys.md
@@ -0,0 +1,28 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.listKeys(
+ "", // appId
+ List.of(), // queries (optional)
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/list-o-auth-2-scopes.md b/docs/examples/java/apps/list-o-auth-2-scopes.md
new file mode 100644
index 00000000..d96f8c36
--- /dev/null
+++ b/docs/examples/java/apps/list-o-auth-2-scopes.md
@@ -0,0 +1,22 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.listOAuth2Scopes(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+}));
+```
diff --git a/docs/examples/java/apps/list-secrets.md b/docs/examples/java/apps/list-secrets.md
new file mode 100644
index 00000000..4d823a74
--- /dev/null
+++ b/docs/examples/java/apps/list-secrets.md
@@ -0,0 +1,28 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.listSecrets(
+ "", // appId
+ List.of(), // queries (optional)
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/list.md b/docs/examples/java/apps/list.md
new file mode 100644
index 00000000..31d80daa
--- /dev/null
+++ b/docs/examples/java/apps/list.md
@@ -0,0 +1,27 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.list(
+ List.of(), // queries (optional)
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/update-team.md b/docs/examples/java/apps/update-team.md
new file mode 100644
index 00000000..314c672f
--- /dev/null
+++ b/docs/examples/java/apps/update-team.md
@@ -0,0 +1,27 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.updateTeam(
+ "", // appId
+ "", // teamId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/apps/update.md b/docs/examples/java/apps/update.md
new file mode 100644
index 00000000..e8b51fa9
--- /dev/null
+++ b/docs/examples/java/apps/update.md
@@ -0,0 +1,45 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Apps;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Apps apps = new Apps(client);
+
+apps.update(
+ "", // appId
+ "", // name
+ "", // description (optional)
+ "https://example.com", // clientUri (optional)
+ "https://example.com", // logoUri (optional)
+ "https://example.com", // privacyPolicyUrl (optional)
+ "https://example.com", // termsUrl (optional)
+ List.of(), // contacts (optional)
+ "", // tagline (optional)
+ List.of(), // tags (optional)
+ List.of(), // images (optional)
+ "https://example.com", // supportUrl (optional)
+ "https://example.com", // dataDeletionUrl (optional)
+ false, // enabled (optional)
+ List.of(), // redirectUris (optional)
+ List.of(), // postLogoutRedirectUris (optional)
+ "public", // type (optional)
+ false, // deviceFlow (optional)
+ List.of(), // installationScopes (optional)
+ "https://example.com", // installationRedirectUrl (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/avatars/delete-photo.md b/docs/examples/java/avatars/delete-photo.md
new file mode 100644
index 00000000..cffc010c
--- /dev/null
+++ b/docs/examples/java/avatars/delete-photo.md
@@ -0,0 +1,22 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Avatars;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Avatars avatars = new Avatars(client);
+
+avatars.deletePhoto(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+}));
+```
diff --git a/docs/examples/java/avatars/get-browser.md b/docs/examples/java/avatars/get-browser.md
index f101ad54..626de034 100644
--- a/docs/examples/java/avatars/get-browser.md
+++ b/docs/examples/java/avatars/get-browser.md
@@ -14,9 +14,9 @@ Avatars avatars = new Avatars(client);
avatars.getBrowser(
Browser.AVANT_BROWSER, // code
- 0, // width (optional)
- 0, // height (optional)
- -1, // quality (optional)
+ 0L, // width (optional)
+ 0L, // height (optional)
+ -1L, // quality (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/avatars/get-credit-card.md b/docs/examples/java/avatars/get-credit-card.md
index b12cebc9..f8e114db 100644
--- a/docs/examples/java/avatars/get-credit-card.md
+++ b/docs/examples/java/avatars/get-credit-card.md
@@ -14,9 +14,9 @@ Avatars avatars = new Avatars(client);
avatars.getCreditCard(
CreditCard.AMERICAN_EXPRESS, // code
- 0, // width (optional)
- 0, // height (optional)
- -1, // quality (optional)
+ 0L, // width (optional)
+ 0L, // height (optional)
+ -1L, // quality (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/avatars/get-flag.md b/docs/examples/java/avatars/get-flag.md
index 4d808513..0acd391f 100644
--- a/docs/examples/java/avatars/get-flag.md
+++ b/docs/examples/java/avatars/get-flag.md
@@ -14,9 +14,9 @@ Avatars avatars = new Avatars(client);
avatars.getFlag(
Flag.AFGHANISTAN, // code
- 0, // width (optional)
- 0, // height (optional)
- -1, // quality (optional)
+ 0L, // width (optional)
+ 0L, // height (optional)
+ -1L, // quality (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/avatars/get-image.md b/docs/examples/java/avatars/get-image.md
index a22041f5..38bd4dc8 100644
--- a/docs/examples/java/avatars/get-image.md
+++ b/docs/examples/java/avatars/get-image.md
@@ -13,8 +13,8 @@ Avatars avatars = new Avatars(client);
avatars.getImage(
"https://example.com", // url
- 0, // width (optional)
- 0, // height (optional)
+ 0L, // width (optional)
+ 0L, // height (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/avatars/get-initials.md b/docs/examples/java/avatars/get-initials.md
index 08f5bea9..c22358d2 100644
--- a/docs/examples/java/avatars/get-initials.md
+++ b/docs/examples/java/avatars/get-initials.md
@@ -13,8 +13,8 @@ Avatars avatars = new Avatars(client);
avatars.getInitials(
"", // name (optional)
- 0, // width (optional)
- 0, // height (optional)
+ 0L, // width (optional)
+ 0L, // height (optional)
"FFFFFF", // background (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/avatars/get-photo.md b/docs/examples/java/avatars/get-photo.md
index 2204db78..04769d1c 100644
--- a/docs/examples/java/avatars/get-photo.md
+++ b/docs/examples/java/avatars/get-photo.md
@@ -12,9 +12,9 @@ Client client = new Client(context)
Avatars avatars = new Avatars(client);
avatars.getPhoto(
- 0, // width (optional)
- 0, // height (optional)
- 0, // quality (optional)
+ 0L, // width (optional)
+ 0L, // height (optional)
+ 0L, // quality (optional)
"png", // output (optional)
"g", // rating (optional)
"current()", // userId (optional)
diff --git a/docs/examples/java/avatars/get-qr.md b/docs/examples/java/avatars/get-qr.md
index ad08ab56..b3bbb6b6 100644
--- a/docs/examples/java/avatars/get-qr.md
+++ b/docs/examples/java/avatars/get-qr.md
@@ -13,8 +13,8 @@ Avatars avatars = new Avatars(client);
avatars.getQR(
"", // text
- 1, // size (optional)
- 0, // margin (optional)
+ 1L, // size (optional)
+ 0L, // margin (optional)
false, // download (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/avatars/get-screenshot.md b/docs/examples/java/avatars/get-screenshot.md
index 71f96c5b..82454a65 100644
--- a/docs/examples/java/avatars/get-screenshot.md
+++ b/docs/examples/java/avatars/get-screenshot.md
@@ -18,12 +18,11 @@ Avatars avatars = new Avatars(client);
avatars.getScreenshot(
"https://example.com", // url
Map.of(
- "Authorization", "Bearer token123",
- "X-Custom-Header", "value"
+ "Accept-Language", "en-US,en;q=0.9"
), // headers (optional)
- 1920, // viewportWidth (optional)
- 1080, // viewportHeight (optional)
- 2, // scale (optional)
+ 1920L, // viewportWidth (optional)
+ 1080L, // viewportHeight (optional)
+ 2.0, // scale (optional)
BrowserTheme.LIGHT, // theme (optional)
"Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // userAgent (optional)
true, // fullpage (optional)
@@ -31,13 +30,13 @@ avatars.getScreenshot(
Timezone.AFRICA_ABIDJAN, // timezone (optional)
37.7749, // latitude (optional)
-122.4194, // longitude (optional)
- 100, // accuracy (optional)
+ 100.0, // accuracy (optional)
true, // touch (optional)
BrowserPermission.GEOLOCATION, // permissions (optional)
- 3, // sleep (optional)
- 800, // width (optional)
- 600, // height (optional)
- 85, // quality (optional)
+ 3L, // sleep (optional)
+ 800L, // width (optional)
+ 600L, // height (optional)
+ 85L, // quality (optional)
ImageFormat.JPG, // output (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/avatars/update-photo.md b/docs/examples/java/avatars/update-photo.md
new file mode 100644
index 00000000..8c4d6e90
--- /dev/null
+++ b/docs/examples/java/avatars/update-photo.md
@@ -0,0 +1,27 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.models.InputFile;
+import io.appwrite.services.Avatars;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Avatars avatars = new Avatars(client);
+
+avatars.updatePhoto(
+ InputFile.fromPath("file.png"), // file
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/databases/create-transaction.md b/docs/examples/java/databases/create-transaction.md
index d96c27a0..616838d2 100644
--- a/docs/examples/java/databases/create-transaction.md
+++ b/docs/examples/java/databases/create-transaction.md
@@ -12,7 +12,7 @@ Client client = new Client(context)
Databases databases = new Databases(client);
databases.createTransaction(
- 60, // ttl (optional)
+ 60L, // ttl (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 1a2f23e2..682dadd2 100644
--- a/docs/examples/java/databases/decrement-document-attribute.md
+++ b/docs/examples/java/databases/decrement-document-attribute.md
@@ -16,8 +16,8 @@ databases.decrementDocumentAttribute(
"", // collectionId
"", // documentId
"", // attribute
- 1, // value (optional)
- 0, // min (optional)
+ 1.0, // value (optional)
+ 0.0, // min (optional)
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/databases/increment-document-attribute.md b/docs/examples/java/databases/increment-document-attribute.md
index fe363592..07dfd55c 100644
--- a/docs/examples/java/databases/increment-document-attribute.md
+++ b/docs/examples/java/databases/increment-document-attribute.md
@@ -16,8 +16,8 @@ databases.incrementDocumentAttribute(
"", // collectionId
"", // documentId
"", // attribute
- 1, // value (optional)
- 100, // max (optional)
+ 1.0, // value (optional)
+ 100.0, // max (optional)
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/databases/list-documents.md b/docs/examples/java/databases/list-documents.md
index 8569cb60..8a5a52cb 100644
--- a/docs/examples/java/databases/list-documents.md
+++ b/docs/examples/java/databases/list-documents.md
@@ -17,7 +17,7 @@ databases.listDocuments(
List.of(), // queries (optional)
"", // transactionId (optional)
false, // total (optional)
- 0, // ttl (optional)
+ 0L, // ttl (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/databases/list-transactions.md b/docs/examples/java/databases/list-transactions.md
index ad11c7f7..3e7ca138 100644
--- a/docs/examples/java/databases/list-transactions.md
+++ b/docs/examples/java/databases/list-transactions.md
@@ -13,6 +13,7 @@ Databases databases = new Databases(client);
databases.listTransactions(
List.of(), // queries (optional)
+ false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/documentsdb/create-documents.md b/docs/examples/java/documentsdb/create-documents.md
index c52433a2..ae20335d 100644
--- a/docs/examples/java/documentsdb/create-documents.md
+++ b/docs/examples/java/documentsdb/create-documents.md
@@ -14,7 +14,14 @@ DocumentsDB documentsDB = new DocumentsDB(client);
documentsDB.createDocuments(
"", // databaseId
"", // collectionId
- List.of(), // documents
+ List.of(Map.of(
+ "$id", "example1",
+ "username", "walter.obrien",
+ "email", "walter.obrien@example.com",
+ "fullName", "Walter O'Brien",
+ "age", 30,
+ "isAdmin", false
+ )), // documents
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/documentsdb/create-transaction.md b/docs/examples/java/documentsdb/create-transaction.md
index da91c5c8..ac4a96d8 100644
--- a/docs/examples/java/documentsdb/create-transaction.md
+++ b/docs/examples/java/documentsdb/create-transaction.md
@@ -12,7 +12,7 @@ Client client = new Client(context)
DocumentsDB documentsDB = new DocumentsDB(client);
documentsDB.createTransaction(
- 60, // ttl (optional)
+ 60L, // ttl (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/documentsdb/decrement-document-attribute.md b/docs/examples/java/documentsdb/decrement-document-attribute.md
index f1853ac6..9e19095e 100644
--- a/docs/examples/java/documentsdb/decrement-document-attribute.md
+++ b/docs/examples/java/documentsdb/decrement-document-attribute.md
@@ -16,8 +16,8 @@ documentsDB.decrementDocumentAttribute(
"", // collectionId
"", // documentId
"", // attribute
- 1, // value (optional)
- 0, // min (optional)
+ 1.0, // value (optional)
+ 0.0, // min (optional)
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/documentsdb/increment-document-attribute.md b/docs/examples/java/documentsdb/increment-document-attribute.md
index fab214e9..470abbf8 100644
--- a/docs/examples/java/documentsdb/increment-document-attribute.md
+++ b/docs/examples/java/documentsdb/increment-document-attribute.md
@@ -16,8 +16,8 @@ documentsDB.incrementDocumentAttribute(
"", // collectionId
"", // documentId
"", // attribute
- 1, // value (optional)
- 100, // max (optional)
+ 1.0, // value (optional)
+ 100.0, // max (optional)
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/documentsdb/list-documents.md b/docs/examples/java/documentsdb/list-documents.md
index 0abb6734..f6cfe483 100644
--- a/docs/examples/java/documentsdb/list-documents.md
+++ b/docs/examples/java/documentsdb/list-documents.md
@@ -17,7 +17,7 @@ documentsDB.listDocuments(
List.of(), // queries (optional)
"", // transactionId (optional)
false, // total (optional)
- 0, // ttl (optional)
+ 0L, // ttl (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/documentsdb/list-transactions.md b/docs/examples/java/documentsdb/list-transactions.md
index 9b8fcd7b..ab4974a0 100644
--- a/docs/examples/java/documentsdb/list-transactions.md
+++ b/docs/examples/java/documentsdb/list-transactions.md
@@ -13,6 +13,7 @@ DocumentsDB documentsDB = new DocumentsDB(client);
documentsDB.listTransactions(
List.of(), // queries (optional)
+ false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/graphql/mutation.md b/docs/examples/java/graphql/mutation.md
index 9cc7febe..a8488db1 100644
--- a/docs/examples/java/graphql/mutation.md
+++ b/docs/examples/java/graphql/mutation.md
@@ -12,7 +12,9 @@ Client client = new Client(context)
Graphql graphql = new Graphql(client);
graphql.mutation(
- Map.of("a", "b"), // query
+ Map.of(
+ "query", "mutation { accountUpdateName(name: \"Walter\") { name } }"
+ ), // query
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/graphql/query.md b/docs/examples/java/graphql/query.md
index 25704b00..58e63635 100644
--- a/docs/examples/java/graphql/query.md
+++ b/docs/examples/java/graphql/query.md
@@ -12,7 +12,9 @@ Client client = new Client(context)
Graphql graphql = new Graphql(client);
graphql.query(
- Map.of("a", "b"), // query
+ Map.of(
+ "query", "query { localeGet { ip } }"
+ ), // query
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/locale/list-codes.md b/docs/examples/java/locale/list-codes.md
index 534b1199..181c1b8f 100644
--- a/docs/examples/java/locale/list-codes.md
+++ b/docs/examples/java/locale/list-codes.md
@@ -11,12 +11,16 @@ Client client = new Client(context)
Locale locale = new Locale(client);
-locale.listCodes(new CoroutineCallback<>((result, error) -> {
- if (error != null) {
- error.printStackTrace();
- return;
- }
+locale.listCodes(
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
- Log.d("Appwrite", result.toString());
-}));
```
diff --git a/docs/examples/java/locale/list-continents.md b/docs/examples/java/locale/list-continents.md
index 998a31be..e8a60fca 100644
--- a/docs/examples/java/locale/list-continents.md
+++ b/docs/examples/java/locale/list-continents.md
@@ -11,12 +11,16 @@ Client client = new Client(context)
Locale locale = new Locale(client);
-locale.listContinents(new CoroutineCallback<>((result, error) -> {
- if (error != null) {
- error.printStackTrace();
- return;
- }
+locale.listContinents(
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
- Log.d("Appwrite", result.toString());
-}));
```
diff --git a/docs/examples/java/locale/list-countries-eu.md b/docs/examples/java/locale/list-countries-eu.md
index 5950c990..b6c878fc 100644
--- a/docs/examples/java/locale/list-countries-eu.md
+++ b/docs/examples/java/locale/list-countries-eu.md
@@ -11,12 +11,16 @@ Client client = new Client(context)
Locale locale = new Locale(client);
-locale.listCountriesEU(new CoroutineCallback<>((result, error) -> {
- if (error != null) {
- error.printStackTrace();
- return;
- }
+locale.listCountriesEU(
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
- Log.d("Appwrite", result.toString());
-}));
```
diff --git a/docs/examples/java/locale/list-countries-phones.md b/docs/examples/java/locale/list-countries-phones.md
index 6096758e..3d8bb9eb 100644
--- a/docs/examples/java/locale/list-countries-phones.md
+++ b/docs/examples/java/locale/list-countries-phones.md
@@ -11,12 +11,16 @@ Client client = new Client(context)
Locale locale = new Locale(client);
-locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> {
- if (error != null) {
- error.printStackTrace();
- return;
- }
+locale.listCountriesPhones(
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
- Log.d("Appwrite", result.toString());
-}));
```
diff --git a/docs/examples/java/locale/list-countries.md b/docs/examples/java/locale/list-countries.md
index 140fc48a..3238cf27 100644
--- a/docs/examples/java/locale/list-countries.md
+++ b/docs/examples/java/locale/list-countries.md
@@ -11,12 +11,16 @@ Client client = new Client(context)
Locale locale = new Locale(client);
-locale.listCountries(new CoroutineCallback<>((result, error) -> {
- if (error != null) {
- error.printStackTrace();
- return;
- }
+locale.listCountries(
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
- Log.d("Appwrite", result.toString());
-}));
```
diff --git a/docs/examples/java/locale/list-currencies.md b/docs/examples/java/locale/list-currencies.md
index 0e5273d9..631bb346 100644
--- a/docs/examples/java/locale/list-currencies.md
+++ b/docs/examples/java/locale/list-currencies.md
@@ -11,12 +11,16 @@ Client client = new Client(context)
Locale locale = new Locale(client);
-locale.listCurrencies(new CoroutineCallback<>((result, error) -> {
- if (error != null) {
- error.printStackTrace();
- return;
- }
+locale.listCurrencies(
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
- Log.d("Appwrite", result.toString());
-}));
```
diff --git a/docs/examples/java/locale/list-languages.md b/docs/examples/java/locale/list-languages.md
index e85bd0a1..b0000633 100644
--- a/docs/examples/java/locale/list-languages.md
+++ b/docs/examples/java/locale/list-languages.md
@@ -11,12 +11,16 @@ Client client = new Client(context)
Locale locale = new Locale(client);
-locale.listLanguages(new CoroutineCallback<>((result, error) -> {
- if (error != null) {
- error.printStackTrace();
- return;
- }
+locale.listLanguages(
+ false, // total (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
- Log.d("Appwrite", result.toString());
-}));
```
diff --git a/docs/examples/java/oauth2/approve.md b/docs/examples/java/oauth2/approve.md
new file mode 100644
index 00000000..f2f4a495
--- /dev/null
+++ b/docs/examples/java/oauth2/approve.md
@@ -0,0 +1,28 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.approve(
+ "", // grant_id
+ "", // authorization_details (optional)
+ "", // scope (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/authorize-post.md b/docs/examples/java/oauth2/authorize-post.md
new file mode 100644
index 00000000..99ed6b8e
--- /dev/null
+++ b/docs/examples/java/oauth2/authorize-post.md
@@ -0,0 +1,39 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.authorizePost(
+ "", // client_id (optional)
+ "https://example.com", // redirect_uri (optional)
+ "", // response_type (optional)
+ "", // scope (optional)
+ "", // state (optional)
+ "", // nonce (optional)
+ "", // code_challenge (optional)
+ "s256", // code_challenge_method (optional)
+ "", // prompt (optional)
+ 0L, // max_age (optional)
+ "", // authorization_details (optional)
+ "", // resource (optional)
+ "", // audience (optional)
+ "", // request_uri (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/authorize.md b/docs/examples/java/oauth2/authorize.md
new file mode 100644
index 00000000..62a452c8
--- /dev/null
+++ b/docs/examples/java/oauth2/authorize.md
@@ -0,0 +1,39 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.authorize(
+ "", // client_id (optional)
+ "https://example.com", // redirect_uri (optional)
+ "", // response_type (optional)
+ "", // scope (optional)
+ "", // state (optional)
+ "", // nonce (optional)
+ "", // code_challenge (optional)
+ "s256", // code_challenge_method (optional)
+ "", // prompt (optional)
+ 0L, // max_age (optional)
+ "", // authorization_details (optional)
+ "", // resource (optional)
+ "", // audience (optional)
+ "", // request_uri (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/create-device-authorization.md b/docs/examples/java/oauth2/create-device-authorization.md
new file mode 100644
index 00000000..0b65a1ab
--- /dev/null
+++ b/docs/examples/java/oauth2/create-device-authorization.md
@@ -0,0 +1,30 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.createDeviceAuthorization(
+ "", // client_id (optional)
+ "", // scope (optional)
+ "", // authorization_details (optional)
+ "", // resource (optional)
+ "", // audience (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/create-grant.md b/docs/examples/java/oauth2/create-grant.md
new file mode 100644
index 00000000..a14c3886
--- /dev/null
+++ b/docs/examples/java/oauth2/create-grant.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.createGrant(
+ "", // user_code
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/create-par.md b/docs/examples/java/oauth2/create-par.md
new file mode 100644
index 00000000..e65bdb54
--- /dev/null
+++ b/docs/examples/java/oauth2/create-par.md
@@ -0,0 +1,38 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.createPAR(
+ "", // client_id
+ "https://example.com", // redirect_uri
+ "code", // response_type
+ "", // scope (optional)
+ "", // state (optional)
+ "", // nonce (optional)
+ "", // code_challenge (optional)
+ "s256", // code_challenge_method (optional)
+ "", // prompt (optional)
+ 0L, // max_age (optional)
+ "", // authorization_details (optional)
+ "", // resource (optional)
+ "", // audience (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/create-token.md b/docs/examples/java/oauth2/create-token.md
new file mode 100644
index 00000000..39b6fa25
--- /dev/null
+++ b/docs/examples/java/oauth2/create-token.md
@@ -0,0 +1,35 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.createToken(
+ "", // grant_type
+ "", // code (optional)
+ "", // refresh_token (optional)
+ "", // device_code (optional)
+ "", // client_id (optional)
+ "", // client_secret (optional)
+ "", // code_verifier (optional)
+ "https://example.com", // redirect_uri (optional)
+ "", // resource (optional)
+ "", // audience (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/get-grant.md b/docs/examples/java/oauth2/get-grant.md
new file mode 100644
index 00000000..18068889
--- /dev/null
+++ b/docs/examples/java/oauth2/get-grant.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.getGrant(
+ "", // grant_id
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/list-organizations.md b/docs/examples/java/oauth2/list-organizations.md
new file mode 100644
index 00000000..bbc74a78
--- /dev/null
+++ b/docs/examples/java/oauth2/list-organizations.md
@@ -0,0 +1,28 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.listOrganizations(
+ 1L, // limit (optional)
+ 0L, // offset (optional)
+ "", // search (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/list-projects.md b/docs/examples/java/oauth2/list-projects.md
new file mode 100644
index 00000000..6963583a
--- /dev/null
+++ b/docs/examples/java/oauth2/list-projects.md
@@ -0,0 +1,28 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.listProjects(
+ 1L, // limit (optional)
+ 0L, // offset (optional)
+ "", // search (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/logout-post.md b/docs/examples/java/oauth2/logout-post.md
new file mode 100644
index 00000000..fefd5e92
--- /dev/null
+++ b/docs/examples/java/oauth2/logout-post.md
@@ -0,0 +1,31 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.logoutPost(
+ "", // id_token_hint (optional)
+ "", // logout_hint (optional)
+ "", // client_id (optional)
+ "https://example.com", // post_logout_redirect_uri (optional)
+ "", // state (optional)
+ "", // ui_locales (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/logout.md b/docs/examples/java/oauth2/logout.md
new file mode 100644
index 00000000..ca7739a2
--- /dev/null
+++ b/docs/examples/java/oauth2/logout.md
@@ -0,0 +1,31 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.logout(
+ "", // id_token_hint (optional)
+ "", // logout_hint (optional)
+ "", // client_id (optional)
+ "https://example.com", // post_logout_redirect_uri (optional)
+ "", // state (optional)
+ "", // ui_locales (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/reject.md b/docs/examples/java/oauth2/reject.md
new file mode 100644
index 00000000..90b9b2e2
--- /dev/null
+++ b/docs/examples/java/oauth2/reject.md
@@ -0,0 +1,26 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.reject(
+ "", // grant_id
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/oauth2/revoke.md b/docs/examples/java/oauth2/revoke.md
new file mode 100644
index 00000000..0d680eb1
--- /dev/null
+++ b/docs/examples/java/oauth2/revoke.md
@@ -0,0 +1,29 @@
+```java
+import android.util.Log;
+
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Oauth2;
+
+Client client = new Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject(""); // Your project ID
+
+Oauth2 oauth2 = new Oauth2(client);
+
+oauth2.revoke(
+ "", // token
+ "access_token", // token_type_hint (optional)
+ "", // client_id (optional)
+ "", // client_secret (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ Log.d("Appwrite", result.toString());
+ })
+);
+
+```
diff --git a/docs/examples/java/presences/list.md b/docs/examples/java/presences/list.md
index d66a4161..c2430748 100644
--- a/docs/examples/java/presences/list.md
+++ b/docs/examples/java/presences/list.md
@@ -14,7 +14,7 @@ Presences presences = new Presences(client);
presences.list(
List.of(), // queries (optional)
false, // total (optional)
- 0, // ttl (optional)
+ 0L, // ttl (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 3d753c44..2f1060a1 100644
--- a/docs/examples/java/storage/get-file-preview.md
+++ b/docs/examples/java/storage/get-file-preview.md
@@ -16,15 +16,15 @@ Storage storage = new Storage(client);
storage.getFilePreview(
"", // bucketId
"", // fileId
- 0, // width (optional)
- 0, // height (optional)
+ 0L, // width (optional)
+ 0L, // height (optional)
ImageGravity.AUTO, // gravity (optional)
- -1, // quality (optional)
- 0, // borderWidth (optional)
+ -1L, // quality (optional)
+ 0L, // borderWidth (optional)
"FFFFFF", // borderColor (optional)
- 0, // borderRadius (optional)
- 0, // opacity (optional)
- -360, // rotation (optional)
+ 0L, // borderRadius (optional)
+ 0.0, // opacity (optional)
+ -360L, // rotation (optional)
"FFFFFF", // background (optional)
ImageFormat.JPG, // output (optional)
"", // token (optional)
diff --git a/docs/examples/java/tablesdb/create-transaction.md b/docs/examples/java/tablesdb/create-transaction.md
index 8401bfec..0dab2f0c 100644
--- a/docs/examples/java/tablesdb/create-transaction.md
+++ b/docs/examples/java/tablesdb/create-transaction.md
@@ -12,7 +12,7 @@ Client client = new Client(context)
TablesDB tablesDB = new TablesDB(client);
tablesDB.createTransaction(
- 60, // ttl (optional)
+ 60L, // ttl (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/tablesdb/decrement-row-column.md b/docs/examples/java/tablesdb/decrement-row-column.md
index c998b442..2315f165 100644
--- a/docs/examples/java/tablesdb/decrement-row-column.md
+++ b/docs/examples/java/tablesdb/decrement-row-column.md
@@ -16,8 +16,8 @@ tablesDB.decrementRowColumn(
"", // tableId
"", // rowId
"", // column
- 1, // value (optional)
- 0, // min (optional)
+ 1.0, // value (optional)
+ 0.0, // min (optional)
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/tablesdb/increment-row-column.md b/docs/examples/java/tablesdb/increment-row-column.md
index 5fb7189e..2e9b52ba 100644
--- a/docs/examples/java/tablesdb/increment-row-column.md
+++ b/docs/examples/java/tablesdb/increment-row-column.md
@@ -16,8 +16,8 @@ tablesDB.incrementRowColumn(
"", // tableId
"", // rowId
"", // column
- 1, // value (optional)
- 100, // max (optional)
+ 1.0, // value (optional)
+ 100.0, // max (optional)
"", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/tablesdb/list-rows.md b/docs/examples/java/tablesdb/list-rows.md
index cbf40287..6d3a0a78 100644
--- a/docs/examples/java/tablesdb/list-rows.md
+++ b/docs/examples/java/tablesdb/list-rows.md
@@ -17,7 +17,7 @@ tablesDB.listRows(
List.of(), // queries (optional)
"", // transactionId (optional)
false, // total (optional)
- 0, // ttl (optional)
+ 0L, // ttl (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/tablesdb/list-transactions.md b/docs/examples/java/tablesdb/list-transactions.md
index 9ebb180a..8a04ad9c 100644
--- a/docs/examples/java/tablesdb/list-transactions.md
+++ b/docs/examples/java/tablesdb/list-transactions.md
@@ -13,6 +13,7 @@ TablesDB tablesDB = new TablesDB(client);
tablesDB.listTransactions(
List.of(), // queries (optional)
+ false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/teams/create-membership.md b/docs/examples/java/teams/create-membership.md
index 861aeb62..d7fba7c1 100644
--- a/docs/examples/java/teams/create-membership.md
+++ b/docs/examples/java/teams/create-membership.md
@@ -13,7 +13,7 @@ Teams teams = new Teams(client);
teams.createMembership(
"", // teamId
- List.of(), // roles
+ List.of("editor"), // roles
"email@example.com", // email (optional)
"", // userId (optional)
"+12065550100", // phone (optional)
diff --git a/docs/examples/java/teams/update-membership.md b/docs/examples/java/teams/update-membership.md
index 60231f2c..c4208a83 100644
--- a/docs/examples/java/teams/update-membership.md
+++ b/docs/examples/java/teams/update-membership.md
@@ -14,7 +14,7 @@ Teams teams = new Teams(client);
teams.updateMembership(
"", // teamId
"", // membershipId
- List.of(), // roles
+ List.of("editor"), // roles
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/vectorsdb/create-operations.md b/docs/examples/java/vectorsdb/create-operations.md
index 7e503634..8dd6f0b8 100644
--- a/docs/examples/java/vectorsdb/create-operations.md
+++ b/docs/examples/java/vectorsdb/create-operations.md
@@ -19,7 +19,10 @@ vectorsDB.createOperations(
"collectionId", "",
"documentId", "",
"data", Map.of(
- "name", "Walter O'Brien"
+ "embeddings", List.of(0.12, -0.55, 0.88, 1.02),
+ "metadata", Map.of(
+ "name", "First document"
+ )
)
)), // operations (optional)
new CoroutineCallback<>((result, error) -> {
diff --git a/docs/examples/java/vectorsdb/create-query.md b/docs/examples/java/vectorsdb/create-query.md
index 3f1cfd5c..8c798724 100644
--- a/docs/examples/java/vectorsdb/create-query.md
+++ b/docs/examples/java/vectorsdb/create-query.md
@@ -17,7 +17,7 @@ vectorsDB.createQuery(
List.of(), // queries (optional)
"", // transactionId (optional)
false, // total (optional)
- 0, // ttl (optional)
+ 0L, // ttl (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/vectorsdb/create-transaction.md b/docs/examples/java/vectorsdb/create-transaction.md
index 4784fc47..916f73c1 100644
--- a/docs/examples/java/vectorsdb/create-transaction.md
+++ b/docs/examples/java/vectorsdb/create-transaction.md
@@ -12,7 +12,7 @@ Client client = new Client(context)
VectorsDB vectorsDB = new VectorsDB(client);
vectorsDB.createTransaction(
- 60, // ttl (optional)
+ 60L, // ttl (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/vectorsdb/list-documents.md b/docs/examples/java/vectorsdb/list-documents.md
index 12ef1f0c..49689d36 100644
--- a/docs/examples/java/vectorsdb/list-documents.md
+++ b/docs/examples/java/vectorsdb/list-documents.md
@@ -17,7 +17,7 @@ vectorsDB.listDocuments(
List.of(), // queries (optional)
"", // transactionId (optional)
false, // total (optional)
- 0, // ttl (optional)
+ 0L, // ttl (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/vectorsdb/list-transactions.md b/docs/examples/java/vectorsdb/list-transactions.md
index 18ef0e55..be8905e2 100644
--- a/docs/examples/java/vectorsdb/list-transactions.md
+++ b/docs/examples/java/vectorsdb/list-transactions.md
@@ -13,6 +13,7 @@ VectorsDB vectorsDB = new VectorsDB(client);
vectorsDB.listTransactions(
List.of(), // queries (optional)
+ false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/kotlin/account/create-email-password-session.md b/docs/examples/kotlin/account/create-email-password-session.md
index 6100e483..aaceb65f 100644
--- a/docs/examples/kotlin/account/create-email-password-session.md
+++ b/docs/examples/kotlin/account/create-email-password-session.md
@@ -12,5 +12,6 @@ val account = Account(client)
val result = account.createEmailPasswordSession(
email = "email@example.com",
password = "password",
+ duration = 60, // (optional)
)
```
diff --git a/docs/examples/kotlin/account/delete-sessions.md b/docs/examples/kotlin/account/delete-sessions.md
index ff404dbc..96bbc341 100644
--- a/docs/examples/kotlin/account/delete-sessions.md
+++ b/docs/examples/kotlin/account/delete-sessions.md
@@ -9,5 +9,7 @@ val client = Client(context)
val account = Account(client)
-val result = account.deleteSessions()
+val result = account.deleteSessions(
+ current = false, // (optional)
+)
```
diff --git a/docs/examples/kotlin/account/list-sessions.md b/docs/examples/kotlin/account/list-sessions.md
index 8c261a2d..38e7e556 100644
--- a/docs/examples/kotlin/account/list-sessions.md
+++ b/docs/examples/kotlin/account/list-sessions.md
@@ -9,5 +9,7 @@ val client = Client(context)
val account = Account(client)
-val result = account.listSessions()
+val result = account.listSessions(
+ total = false, // (optional)
+)
```
diff --git a/docs/examples/kotlin/apps/create-installation-token.md b/docs/examples/kotlin/apps/create-installation-token.md
new file mode 100644
index 00000000..6226e775
--- /dev/null
+++ b/docs/examples/kotlin/apps/create-installation-token.md
@@ -0,0 +1,16 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val apps = Apps(client)
+
+val result = apps.createInstallationToken(
+ appId = "",
+ installationId = "",
+)
+```
diff --git a/docs/examples/kotlin/apps/create-key.md b/docs/examples/kotlin/apps/create-key.md
new file mode 100644
index 00000000..d6daef84
--- /dev/null
+++ b/docs/examples/kotlin/apps/create-key.md
@@ -0,0 +1,15 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val apps = Apps(client)
+
+val result = apps.createKey(
+ appId = "",
+)
+```
diff --git a/docs/examples/kotlin/apps/create-secret.md b/docs/examples/kotlin/apps/create-secret.md
new file mode 100644
index 00000000..d9a4c525
--- /dev/null
+++ b/docs/examples/kotlin/apps/create-secret.md
@@ -0,0 +1,15 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val apps = Apps(client)
+
+val result = apps.createSecret(
+ appId = "",
+)
+```
diff --git a/docs/examples/kotlin/apps/create.md b/docs/examples/kotlin/apps/create.md
new file mode 100644
index 00000000..2299c031
--- /dev/null
+++ b/docs/examples/kotlin/apps/create.md
@@ -0,0 +1,33 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val apps = Apps(client)
+
+val result = apps.create(
+ appId = "",
+ name = "",
+ redirectUris = listOf(),
+ description = "", // (optional)
+ clientUri = "https://example.com", // (optional)
+ logoUri = "https://example.com", // (optional)
+ privacyPolicyUrl = "https://example.com", // (optional)
+ termsUrl = "https://example.com", // (optional)
+ contacts = listOf(), // (optional)
+ tagline = "", // (optional)
+ tags = listOf(), // (optional)
+ images = listOf(), // (optional)
+ supportUrl = "https://example.com", // (optional)
+ dataDeletionUrl = "https://example.com", // (optional)
+ postLogoutRedirectUris = listOf(), // (optional)
+ enabled = false, // (optional)
+ type = "public", // (optional)
+ deviceFlow = false, // (optional)
+ teamId = "", // (optional)
+)
+```
diff --git a/docs/examples/kotlin/apps/delete-installation.md b/docs/examples/kotlin/apps/delete-installation.md
new file mode 100644
index 00000000..c07fee53
--- /dev/null
+++ b/docs/examples/kotlin/apps/delete-installation.md
@@ -0,0 +1,16 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val apps = Apps(client)
+
+val result = apps.deleteInstallation(
+ appId = "",
+ installationId = "",
+)
+```
diff --git a/docs/examples/kotlin/apps/delete-key.md b/docs/examples/kotlin/apps/delete-key.md
new file mode 100644
index 00000000..3ad3825a
--- /dev/null
+++ b/docs/examples/kotlin/apps/delete-key.md
@@ -0,0 +1,16 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val apps = Apps(client)
+
+val result = apps.deleteKey(
+ appId = "",
+ keyId = "",
+)
+```
diff --git a/docs/examples/kotlin/apps/delete-secret.md b/docs/examples/kotlin/apps/delete-secret.md
new file mode 100644
index 00000000..ad22d5e0
--- /dev/null
+++ b/docs/examples/kotlin/apps/delete-secret.md
@@ -0,0 +1,16 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val apps = Apps(client)
+
+val result = apps.deleteSecret(
+ appId = "",
+ secretId = "",
+)
+```
diff --git a/docs/examples/kotlin/apps/delete-tokens.md b/docs/examples/kotlin/apps/delete-tokens.md
new file mode 100644
index 00000000..e8d89009
--- /dev/null
+++ b/docs/examples/kotlin/apps/delete-tokens.md
@@ -0,0 +1,15 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val apps = Apps(client)
+
+val result = apps.deleteTokens(
+ appId = "",
+)
+```
diff --git a/docs/examples/kotlin/apps/delete.md b/docs/examples/kotlin/apps/delete.md
new file mode 100644
index 00000000..412b55f6
--- /dev/null
+++ b/docs/examples/kotlin/apps/delete.md
@@ -0,0 +1,15 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val apps = Apps(client)
+
+val result = apps.delete(
+ appId = "",
+)
+```
diff --git a/docs/examples/kotlin/apps/get-installation.md b/docs/examples/kotlin/apps/get-installation.md
new file mode 100644
index 00000000..288f21d6
--- /dev/null
+++ b/docs/examples/kotlin/apps/get-installation.md
@@ -0,0 +1,16 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+
+val apps = Apps(client)
+
+val result = apps.getInstallation(
+ appId = "",
+ installationId = "",
+)
+```
diff --git a/docs/examples/kotlin/apps/get-key.md b/docs/examples/kotlin/apps/get-key.md
new file mode 100644
index 00000000..8af73116
--- /dev/null
+++ b/docs/examples/kotlin/apps/get-key.md
@@ -0,0 +1,16 @@
+```kotlin
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Apps
+
+val client = Client(context)
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("