diff --git a/README.md b/README.md
index e0b45f4..b9997e1 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,11 @@


-
+
[](https://twitter.com/appwrite)
[](https://appwrite.io/discord)
-**This SDK is compatible with Appwrite server version 1.6.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/releases).**
+**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/releases).**
> This is the Kotlin SDK for integrating with Appwrite from your Kotlin server-side code. If you're looking for the Android SDK you should check [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android)
@@ -39,7 +39,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:
```groovy
-implementation("io.appwrite:sdk-for-kotlin:8.0.0")
+implementation("io.appwrite:sdk-for-kotlin:9.0.0")
```
### Maven
@@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file:
io.appwrite
sdk-for-kotlin
- 8.0.0
+ 9.0.0
```
diff --git a/docs/examples/java/avatars/get-browser.md b/docs/examples/java/avatars/get-browser.md
index c87d5e9..9c3433e 100644
--- a/docs/examples/java/avatars/get-browser.md
+++ b/docs/examples/java/avatars/get-browser.md
@@ -14,7 +14,7 @@ avatars.getBrowser(
Browser.AVANT_BROWSER, // code
0, // width (optional)
0, // height (optional)
- 0, // quality (optional)
+ -1, // 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 ddb53a6..6904638 100644
--- a/docs/examples/java/avatars/get-credit-card.md
+++ b/docs/examples/java/avatars/get-credit-card.md
@@ -14,7 +14,7 @@ avatars.getCreditCard(
CreditCard.AMERICAN_EXPRESS, // code
0, // width (optional)
0, // height (optional)
- 0, // quality (optional)
+ -1, // 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 aadf426..159dcdc 100644
--- a/docs/examples/java/avatars/get-flag.md
+++ b/docs/examples/java/avatars/get-flag.md
@@ -14,7 +14,7 @@ avatars.getFlag(
Flag.AFGHANISTAN, // code
0, // width (optional)
0, // height (optional)
- 0, // quality (optional)
+ -1, // quality (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md
index 5231be3..368b816 100644
--- a/docs/examples/java/databases/create-document.md
+++ b/docs/examples/java/databases/create-document.md
@@ -4,8 +4,9 @@ import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
- .setProject("") // Your project ID
- .setSession(""); // The user session to authenticate with
+ .setSession("") // The user session to authenticate with
+ .setKey("") // Your secret API key
+ .setJWT(""); // Your secret JSON Web Token
Databases databases = new Databases(client);
diff --git a/docs/examples/java/databases/create-documents.md b/docs/examples/java/databases/create-documents.md
new file mode 100644
index 0000000..d816af3
--- /dev/null
+++ b/docs/examples/java/databases/create-documents.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Databases;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setKey(""); // Your secret API key
+
+Databases databases = new Databases(client);
+
+databases.createDocuments(
+ "", // databaseId
+ "", // collectionId
+ listOf(), // documents
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/databases/create-index.md b/docs/examples/java/databases/create-index.md
index f3faec7..fe2d9bf 100644
--- a/docs/examples/java/databases/create-index.md
+++ b/docs/examples/java/databases/create-index.md
@@ -17,6 +17,7 @@ databases.createIndex(
IndexType.KEY, // type
listOf(), // attributes
listOf(), // orders (optional)
+ listOf(), // lengths (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/databases/delete-documents.md b/docs/examples/java/databases/delete-documents.md
new file mode 100644
index 0000000..e8394b1
--- /dev/null
+++ b/docs/examples/java/databases/delete-documents.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Databases;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Databases databases = new Databases(client);
+
+databases.deleteDocuments(
+ "", // databaseId
+ "", // collectionId
+ listOf(), // queries (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/databases/update-documents.md b/docs/examples/java/databases/update-documents.md
new file mode 100644
index 0000000..b4138b4
--- /dev/null
+++ b/docs/examples/java/databases/update-documents.md
@@ -0,0 +1,26 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Databases;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Databases databases = new Databases(client);
+
+databases.updateDocuments(
+ "", // databaseId
+ "", // collectionId
+ mapOf( "a" to "b" ), // data (optional)
+ listOf(), // queries (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/databases/upsert-documents.md b/docs/examples/java/databases/upsert-documents.md
new file mode 100644
index 0000000..e2f2a46
--- /dev/null
+++ b/docs/examples/java/databases/upsert-documents.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Databases;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Databases databases = new Databases(client);
+
+databases.upsertDocuments(
+ "", // databaseId
+ "", // collectionId
+ listOf(), // documents (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/functions/create-build.md b/docs/examples/java/functions/create-duplicate-deployment.md
similarity index 94%
rename from docs/examples/java/functions/create-build.md
rename to docs/examples/java/functions/create-duplicate-deployment.md
index a3f6cc5..6b9d9a1 100644
--- a/docs/examples/java/functions/create-build.md
+++ b/docs/examples/java/functions/create-duplicate-deployment.md
@@ -9,7 +9,7 @@ Client client = new Client()
Functions functions = new Functions(client);
-functions.createBuild(
+functions.createDuplicateDeployment(
"", // functionId
"", // deploymentId
"", // buildId (optional)
diff --git a/docs/examples/java/functions/create-template-deployment.md b/docs/examples/java/functions/create-template-deployment.md
new file mode 100644
index 0000000..53b5a9a
--- /dev/null
+++ b/docs/examples/java/functions/create-template-deployment.md
@@ -0,0 +1,28 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Functions;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Functions functions = new Functions(client);
+
+functions.createTemplateDeployment(
+ "", // functionId
+ "", // repository
+ "", // owner
+ "", // rootDirectory
+ "", // version
+ false, // activate (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/functions/create-variable.md b/docs/examples/java/functions/create-variable.md
index df2bb8e..70764fb 100644
--- a/docs/examples/java/functions/create-variable.md
+++ b/docs/examples/java/functions/create-variable.md
@@ -13,6 +13,7 @@ functions.createVariable(
"", // functionId
"", // key
"", // value
+ false, // secret (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/functions/create-vcs-deployment.md b/docs/examples/java/functions/create-vcs-deployment.md
new file mode 100644
index 0000000..9274cd8
--- /dev/null
+++ b/docs/examples/java/functions/create-vcs-deployment.md
@@ -0,0 +1,27 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Functions;
+import io.appwrite.enums.VCSDeploymentType;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Functions functions = new Functions(client);
+
+functions.createVcsDeployment(
+ "", // functionId
+ VCSDeploymentType.BRANCH, // type
+ "", // reference
+ false, // activate (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/functions/create.md b/docs/examples/java/functions/create.md
index 7137e40..7187128 100644
--- a/docs/examples/java/functions/create.md
+++ b/docs/examples/java/functions/create.md
@@ -28,10 +28,6 @@ functions.create(
"", // providerBranch (optional)
false, // providerSilentMode (optional)
"", // providerRootDirectory (optional)
- "", // templateRepository (optional)
- "", // templateOwner (optional)
- "", // templateRootDirectory (optional)
- "", // templateVersion (optional)
"", // specification (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
diff --git a/docs/examples/java/functions/get-deployment-download.md b/docs/examples/java/functions/get-deployment-download.md
index e2a0748..d522b12 100644
--- a/docs/examples/java/functions/get-deployment-download.md
+++ b/docs/examples/java/functions/get-deployment-download.md
@@ -12,6 +12,7 @@ Functions functions = new Functions(client);
functions.getDeploymentDownload(
"", // functionId
"", // deploymentId
+ DeploymentDownloadType.SOURCE, // type (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/functions/list-executions.md b/docs/examples/java/functions/list-executions.md
index 7a2ff91..25a9af8 100644
--- a/docs/examples/java/functions/list-executions.md
+++ b/docs/examples/java/functions/list-executions.md
@@ -12,7 +12,6 @@ Functions functions = new Functions(client);
functions.listExecutions(
"", // functionId
listOf(), // queries (optional)
- "", // search (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/functions/update-deployment-build.md b/docs/examples/java/functions/update-deployment-status.md
similarity index 95%
rename from docs/examples/java/functions/update-deployment-build.md
rename to docs/examples/java/functions/update-deployment-status.md
index 5fc416b..8755fd9 100644
--- a/docs/examples/java/functions/update-deployment-build.md
+++ b/docs/examples/java/functions/update-deployment-status.md
@@ -9,7 +9,7 @@ Client client = new Client()
Functions functions = new Functions(client);
-functions.updateDeploymentBuild(
+functions.updateDeploymentStatus(
"", // functionId
"", // deploymentId
new CoroutineCallback<>((result, error) -> {
diff --git a/docs/examples/java/functions/update-deployment.md b/docs/examples/java/functions/update-function-deployment.md
similarity index 94%
rename from docs/examples/java/functions/update-deployment.md
rename to docs/examples/java/functions/update-function-deployment.md
index b83e001..b88e87c 100644
--- a/docs/examples/java/functions/update-deployment.md
+++ b/docs/examples/java/functions/update-function-deployment.md
@@ -9,7 +9,7 @@ Client client = new Client()
Functions functions = new Functions(client);
-functions.updateDeployment(
+functions.updateFunctionDeployment(
"", // functionId
"", // deploymentId
new CoroutineCallback<>((result, error) -> {
diff --git a/docs/examples/java/functions/update-variable.md b/docs/examples/java/functions/update-variable.md
index d2bf6db..3a2b281 100644
--- a/docs/examples/java/functions/update-variable.md
+++ b/docs/examples/java/functions/update-variable.md
@@ -14,6 +14,7 @@ functions.updateVariable(
"", // variableId
"", // key
"", // value (optional)
+ false, // secret (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/sites/create-deployment.md b/docs/examples/java/sites/create-deployment.md
new file mode 100644
index 0000000..f370f80
--- /dev/null
+++ b/docs/examples/java/sites/create-deployment.md
@@ -0,0 +1,29 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.models.InputFile;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.createDeployment(
+ "", // siteId
+ InputFile.fromPath("file.png"), // code
+ false, // activate
+ "", // installCommand (optional)
+ "", // buildCommand (optional)
+ "", // outputDirectory (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/create-duplicate-deployment.md b/docs/examples/java/sites/create-duplicate-deployment.md
new file mode 100644
index 0000000..35e43b8
--- /dev/null
+++ b/docs/examples/java/sites/create-duplicate-deployment.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.createDuplicateDeployment(
+ "", // siteId
+ "", // deploymentId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/create-template-deployment.md b/docs/examples/java/sites/create-template-deployment.md
new file mode 100644
index 0000000..63aba4a
--- /dev/null
+++ b/docs/examples/java/sites/create-template-deployment.md
@@ -0,0 +1,28 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.createTemplateDeployment(
+ "", // siteId
+ "", // repository
+ "", // owner
+ "", // rootDirectory
+ "", // version
+ false, // activate (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/create-variable.md b/docs/examples/java/sites/create-variable.md
new file mode 100644
index 0000000..c77bec3
--- /dev/null
+++ b/docs/examples/java/sites/create-variable.md
@@ -0,0 +1,26 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.createVariable(
+ "", // siteId
+ "", // key
+ "", // value
+ false, // secret (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/create-vcs-deployment.md b/docs/examples/java/sites/create-vcs-deployment.md
new file mode 100644
index 0000000..754eb26
--- /dev/null
+++ b/docs/examples/java/sites/create-vcs-deployment.md
@@ -0,0 +1,27 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+import io.appwrite.enums.VCSDeploymentType;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.createVcsDeployment(
+ "", // siteId
+ VCSDeploymentType.BRANCH, // type
+ "", // reference
+ false, // activate (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/create.md b/docs/examples/java/sites/create.md
new file mode 100644
index 0000000..19664ec
--- /dev/null
+++ b/docs/examples/java/sites/create.md
@@ -0,0 +1,42 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+import io.appwrite.enums.Framework;
+import io.appwrite.enums.BuildRuntime;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.create(
+ "", // siteId
+ "", // name
+ .ANALOG, // framework
+ .NODE_14_5, // buildRuntime
+ false, // enabled (optional)
+ false, // logging (optional)
+ 1, // timeout (optional)
+ "", // installCommand (optional)
+ "", // buildCommand (optional)
+ "", // outputDirectory (optional)
+ .STATIC, // adapter (optional)
+ "", // installationId (optional)
+ "", // fallbackFile (optional)
+ "", // providerRepositoryId (optional)
+ "", // providerBranch (optional)
+ false, // providerSilentMode (optional)
+ "", // providerRootDirectory (optional)
+ "", // specification (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/delete-deployment.md b/docs/examples/java/sites/delete-deployment.md
new file mode 100644
index 0000000..97c08ab
--- /dev/null
+++ b/docs/examples/java/sites/delete-deployment.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.deleteDeployment(
+ "", // siteId
+ "", // deploymentId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/delete-log.md b/docs/examples/java/sites/delete-log.md
new file mode 100644
index 0000000..d718937
--- /dev/null
+++ b/docs/examples/java/sites/delete-log.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.deleteLog(
+ "", // siteId
+ "", // logId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/delete-variable.md b/docs/examples/java/sites/delete-variable.md
new file mode 100644
index 0000000..4e2b3ab
--- /dev/null
+++ b/docs/examples/java/sites/delete-variable.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.deleteVariable(
+ "", // siteId
+ "", // variableId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/delete.md b/docs/examples/java/sites/delete.md
new file mode 100644
index 0000000..fd07bb2
--- /dev/null
+++ b/docs/examples/java/sites/delete.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.delete(
+ "", // siteId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/get-deployment-download.md b/docs/examples/java/sites/get-deployment-download.md
new file mode 100644
index 0000000..5875c72
--- /dev/null
+++ b/docs/examples/java/sites/get-deployment-download.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.getDeploymentDownload(
+ "", // siteId
+ "", // deploymentId
+ DeploymentDownloadType.SOURCE, // type (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/get-deployment.md b/docs/examples/java/sites/get-deployment.md
new file mode 100644
index 0000000..6af859b
--- /dev/null
+++ b/docs/examples/java/sites/get-deployment.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.getDeployment(
+ "", // siteId
+ "", // deploymentId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/get-log.md b/docs/examples/java/sites/get-log.md
new file mode 100644
index 0000000..d33f2a6
--- /dev/null
+++ b/docs/examples/java/sites/get-log.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.getLog(
+ "", // siteId
+ "", // logId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/get-variable.md b/docs/examples/java/sites/get-variable.md
new file mode 100644
index 0000000..1c8df0c
--- /dev/null
+++ b/docs/examples/java/sites/get-variable.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.getVariable(
+ "", // siteId
+ "", // variableId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/get.md b/docs/examples/java/sites/get.md
new file mode 100644
index 0000000..660cad3
--- /dev/null
+++ b/docs/examples/java/sites/get.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.get(
+ "", // siteId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/list-deployments.md b/docs/examples/java/sites/list-deployments.md
new file mode 100644
index 0000000..8bcec54
--- /dev/null
+++ b/docs/examples/java/sites/list-deployments.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.listDeployments(
+ "", // siteId
+ listOf(), // queries (optional)
+ "", // search (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/list-frameworks.md b/docs/examples/java/sites/list-frameworks.md
new file mode 100644
index 0000000..df59717
--- /dev/null
+++ b/docs/examples/java/sites/list-frameworks.md
@@ -0,0 +1,19 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.listFrameworks(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+}));
diff --git a/docs/examples/java/sites/list-logs.md b/docs/examples/java/sites/list-logs.md
new file mode 100644
index 0000000..3532882
--- /dev/null
+++ b/docs/examples/java/sites/list-logs.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.listLogs(
+ "", // siteId
+ listOf(), // queries (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/list-specifications.md b/docs/examples/java/sites/list-specifications.md
new file mode 100644
index 0000000..caad732
--- /dev/null
+++ b/docs/examples/java/sites/list-specifications.md
@@ -0,0 +1,19 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.listSpecifications(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+}));
diff --git a/docs/examples/java/sites/list-variables.md b/docs/examples/java/sites/list-variables.md
new file mode 100644
index 0000000..f2a38b7
--- /dev/null
+++ b/docs/examples/java/sites/list-variables.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.listVariables(
+ "", // siteId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/list.md b/docs/examples/java/sites/list.md
new file mode 100644
index 0000000..39a1c06
--- /dev/null
+++ b/docs/examples/java/sites/list.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.list(
+ listOf(), // queries (optional)
+ "", // search (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/update-deployment-status.md b/docs/examples/java/sites/update-deployment-status.md
new file mode 100644
index 0000000..8dc3041
--- /dev/null
+++ b/docs/examples/java/sites/update-deployment-status.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.updateDeploymentStatus(
+ "", // siteId
+ "", // deploymentId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/update-site-deployment.md b/docs/examples/java/sites/update-site-deployment.md
new file mode 100644
index 0000000..edbda7c
--- /dev/null
+++ b/docs/examples/java/sites/update-site-deployment.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.updateSiteDeployment(
+ "", // siteId
+ "", // deploymentId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/update-variable.md b/docs/examples/java/sites/update-variable.md
new file mode 100644
index 0000000..9735ae3
--- /dev/null
+++ b/docs/examples/java/sites/update-variable.md
@@ -0,0 +1,27 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.updateVariable(
+ "", // siteId
+ "", // variableId
+ "", // key
+ "", // value (optional)
+ false, // secret (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/sites/update.md b/docs/examples/java/sites/update.md
new file mode 100644
index 0000000..9a8b577
--- /dev/null
+++ b/docs/examples/java/sites/update.md
@@ -0,0 +1,41 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Sites;
+import io.appwrite.enums.Framework;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Sites sites = new Sites(client);
+
+sites.update(
+ "", // siteId
+ "", // name
+ .ANALOG, // framework
+ false, // enabled (optional)
+ false, // logging (optional)
+ 1, // timeout (optional)
+ "", // installCommand (optional)
+ "", // buildCommand (optional)
+ "", // outputDirectory (optional)
+ .NODE_14_5, // buildRuntime (optional)
+ .STATIC, // adapter (optional)
+ "", // fallbackFile (optional)
+ "", // installationId (optional)
+ "", // providerRepositoryId (optional)
+ "", // providerBranch (optional)
+ false, // providerSilentMode (optional)
+ "", // providerRootDirectory (optional)
+ "", // specification (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/storage/get-file-download.md b/docs/examples/java/storage/get-file-download.md
index d0399f9..edda260 100644
--- a/docs/examples/java/storage/get-file-download.md
+++ b/docs/examples/java/storage/get-file-download.md
@@ -12,6 +12,7 @@ Storage storage = new Storage(client);
storage.getFileDownload(
"", // bucketId
"", // fileId
+ "", // token (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 dd7c09d..1a0ab59 100644
--- a/docs/examples/java/storage/get-file-preview.md
+++ b/docs/examples/java/storage/get-file-preview.md
@@ -15,7 +15,7 @@ storage.getFilePreview(
0, // width (optional)
0, // height (optional)
ImageGravity.CENTER, // gravity (optional)
- 0, // quality (optional)
+ -1, // quality (optional)
0, // borderWidth (optional)
"", // borderColor (optional)
0, // borderRadius (optional)
@@ -23,6 +23,7 @@ storage.getFilePreview(
-360, // rotation (optional)
"", // background (optional)
ImageFormat.JPG, // output (optional)
+ "", // token (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/storage/get-file-view.md b/docs/examples/java/storage/get-file-view.md
index 1de4ae0..178e507 100644
--- a/docs/examples/java/storage/get-file-view.md
+++ b/docs/examples/java/storage/get-file-view.md
@@ -12,6 +12,7 @@ Storage storage = new Storage(client);
storage.getFileView(
"", // bucketId
"", // fileId
+ "", // token (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/java/tokens/create-file-token.md b/docs/examples/java/tokens/create-file-token.md
new file mode 100644
index 0000000..6996641
--- /dev/null
+++ b/docs/examples/java/tokens/create-file-token.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Tokens;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Tokens tokens = new Tokens(client);
+
+tokens.createFileToken(
+ "", // bucketId
+ "", // fileId
+ "", // expire (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/tokens/delete.md b/docs/examples/java/tokens/delete.md
new file mode 100644
index 0000000..bf1874d
--- /dev/null
+++ b/docs/examples/java/tokens/delete.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Tokens;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Tokens tokens = new Tokens(client);
+
+tokens.delete(
+ "", // tokenId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/tokens/get.md b/docs/examples/java/tokens/get.md
new file mode 100644
index 0000000..c55563c
--- /dev/null
+++ b/docs/examples/java/tokens/get.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Tokens;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Tokens tokens = new Tokens(client);
+
+tokens.get(
+ "", // tokenId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/tokens/list.md b/docs/examples/java/tokens/list.md
new file mode 100644
index 0000000..a59e9f5
--- /dev/null
+++ b/docs/examples/java/tokens/list.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Tokens;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Tokens tokens = new Tokens(client);
+
+tokens.list(
+ "", // bucketId
+ "", // fileId
+ listOf(), // queries (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/tokens/update.md b/docs/examples/java/tokens/update.md
new file mode 100644
index 0000000..2a44f2d
--- /dev/null
+++ b/docs/examples/java/tokens/update.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Tokens;
+
+Client client = new Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey(""); // Your secret API key
+
+Tokens tokens = new Tokens(client);
+
+tokens.update(
+ "", // tokenId
+ "", // expire (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/users/list-memberships.md b/docs/examples/java/users/list-memberships.md
index dc03be2..d0cee13 100644
--- a/docs/examples/java/users/list-memberships.md
+++ b/docs/examples/java/users/list-memberships.md
@@ -11,6 +11,8 @@ Users users = new Users(client);
users.listMemberships(
"", // userId
+ listOf(), // queries (optional)
+ "", // search (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
diff --git a/docs/examples/kotlin/avatars/get-browser.md b/docs/examples/kotlin/avatars/get-browser.md
index e9b95c9..f289205 100644
--- a/docs/examples/kotlin/avatars/get-browser.md
+++ b/docs/examples/kotlin/avatars/get-browser.md
@@ -14,5 +14,5 @@ val result = avatars.getBrowser(
code = Browser.AVANT_BROWSER,
width = 0, // optional
height = 0, // optional
- quality = 0 // optional
+ quality = -1 // optional
)
diff --git a/docs/examples/kotlin/avatars/get-credit-card.md b/docs/examples/kotlin/avatars/get-credit-card.md
index 8554dbd..1fd00a2 100644
--- a/docs/examples/kotlin/avatars/get-credit-card.md
+++ b/docs/examples/kotlin/avatars/get-credit-card.md
@@ -14,5 +14,5 @@ val result = avatars.getCreditCard(
code = CreditCard.AMERICAN_EXPRESS,
width = 0, // optional
height = 0, // optional
- quality = 0 // optional
+ quality = -1 // optional
)
diff --git a/docs/examples/kotlin/avatars/get-flag.md b/docs/examples/kotlin/avatars/get-flag.md
index 011a729..a16aefc 100644
--- a/docs/examples/kotlin/avatars/get-flag.md
+++ b/docs/examples/kotlin/avatars/get-flag.md
@@ -14,5 +14,5 @@ val result = avatars.getFlag(
code = Flag.AFGHANISTAN,
width = 0, // optional
height = 0, // optional
- quality = 0 // optional
+ quality = -1 // optional
)
diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md
index 695fdbd..93da01e 100644
--- a/docs/examples/kotlin/databases/create-document.md
+++ b/docs/examples/kotlin/databases/create-document.md
@@ -4,8 +4,9 @@ import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
- .setProject("") // Your project ID
.setSession("") // The user session to authenticate with
+ .setKey("") // Your secret API key
+ .setJWT("") // Your secret JSON Web Token
val databases = Databases(client)
diff --git a/docs/examples/kotlin/databases/create-documents.md b/docs/examples/kotlin/databases/create-documents.md
new file mode 100644
index 0000000..01692c6
--- /dev/null
+++ b/docs/examples/kotlin/databases/create-documents.md
@@ -0,0 +1,15 @@
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Databases
+
+val client = Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setKey("") // Your secret API key
+
+val databases = Databases(client)
+
+val response = databases.createDocuments(
+ databaseId = "",
+ collectionId = "",
+ documents = listOf()
+)
diff --git a/docs/examples/kotlin/databases/create-index.md b/docs/examples/kotlin/databases/create-index.md
index 7ada0f7..da777ac 100644
--- a/docs/examples/kotlin/databases/create-index.md
+++ b/docs/examples/kotlin/databases/create-index.md
@@ -16,5 +16,6 @@ val response = databases.createIndex(
key = "",
type = IndexType.KEY,
attributes = listOf(),
- orders = listOf() // optional
+ orders = listOf(), // optional
+ lengths = listOf() // optional
)
diff --git a/docs/examples/kotlin/databases/delete-documents.md b/docs/examples/kotlin/databases/delete-documents.md
new file mode 100644
index 0000000..c4caa63
--- /dev/null
+++ b/docs/examples/kotlin/databases/delete-documents.md
@@ -0,0 +1,16 @@
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Databases
+
+val client = Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey("") // Your secret API key
+
+val databases = Databases(client)
+
+val response = databases.deleteDocuments(
+ databaseId = "",
+ collectionId = "",
+ queries = listOf() // optional
+)
diff --git a/docs/examples/kotlin/databases/update-documents.md b/docs/examples/kotlin/databases/update-documents.md
new file mode 100644
index 0000000..9d6c2b5
--- /dev/null
+++ b/docs/examples/kotlin/databases/update-documents.md
@@ -0,0 +1,17 @@
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Databases
+
+val client = Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey("") // Your secret API key
+
+val databases = Databases(client)
+
+val response = databases.updateDocuments(
+ databaseId = "",
+ collectionId = "",
+ data = mapOf( "a" to "b" ), // optional
+ queries = listOf() // optional
+)
diff --git a/docs/examples/kotlin/databases/upsert-documents.md b/docs/examples/kotlin/databases/upsert-documents.md
new file mode 100644
index 0000000..7459b38
--- /dev/null
+++ b/docs/examples/kotlin/databases/upsert-documents.md
@@ -0,0 +1,16 @@
+import io.appwrite.Client
+import io.appwrite.coroutines.CoroutineCallback
+import io.appwrite.services.Databases
+
+val client = Client()
+ .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("") // Your project ID
+ .setKey("") // Your secret API key
+
+val databases = Databases(client)
+
+val response = databases.upsertDocuments(
+ databaseId = "",
+ collectionId = "",
+ documents = listOf() // optional
+)
diff --git a/docs/examples/kotlin/functions/create-build.md b/docs/examples/kotlin/functions/create-duplicate-deployment.md
similarity index 90%
rename from docs/examples/kotlin/functions/create-build.md
rename to docs/examples/kotlin/functions/create-duplicate-deployment.md
index f835d93..a3395f1 100644
--- a/docs/examples/kotlin/functions/create-build.md
+++ b/docs/examples/kotlin/functions/create-duplicate-deployment.md
@@ -9,7 +9,7 @@ val client = Client()
val functions = Functions(client)
-val response = functions.createBuild(
+val response = functions.createDuplicateDeployment(
functionId = "",
deploymentId = "